generated from navikt/bidrag-stonad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #239 from navikt/github_workflow2
Oppdater github workflow og fiks swagger annotering
- Loading branch information
Showing
14 changed files
with
126 additions
and
37 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ | |
.settings/ | ||
.vscode/ | ||
.DS_Store | ||
*nais-secrets* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: "3.9" | ||
services: | ||
database: | ||
image: postgres:latest | ||
ports: | ||
- "5455:5432" | ||
environment: | ||
POSTGRES_USER: cloudsqliamuser | ||
POSTGRES_PASSWORD: admin | ||
POSTGRES_DB: bidrag-grunnlag | ||
volumes: | ||
- db:/var/lib/postgresql/data | ||
volumes: | ||
db: | ||
driver: local | ||
storage: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
kubectl config use dev-gcp | ||
kubectl exec -n=bidrag --tty deployment/bidrag-grunnlag printenv | grep -E 'AZURE_|_URL|SCOPE' > src/test/resources/application-lokal-nais-secrets.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/test/kotlin/no/nav/bidrag/grunnlag/BidragGrunnlagLokalNais.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package no.nav.bidrag.grunnlag | ||
|
||
import no.nav.security.token.support.spring.api.EnableJwtTokenValidation | ||
import no.nav.security.token.support.spring.test.EnableMockOAuth2Server | ||
import org.springframework.boot.SpringApplication | ||
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration | ||
import org.springframework.boot.autoconfigure.SpringBootApplication | ||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration | ||
import org.springframework.context.annotation.ComponentScan | ||
import org.springframework.context.annotation.FilterType | ||
import org.springframework.context.annotation.Profile | ||
|
||
@SpringBootApplication | ||
@EnableJwtTokenValidation(ignore = ["org.springdoc", "org.springframework"]) | ||
@ComponentScan(excludeFilters = [ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = [BidragGrunnlag::class])]) | ||
@Profile("lokal-nais") | ||
class BidragGrunnlagLokalNais | ||
|
||
fun main(args: Array<String>) { | ||
val app = SpringApplication(BidragGrunnlagLokalNais::class.java) | ||
app.setAdditionalProfiles("lokal-nais", "lokal-nais-secrets") | ||
app.run(*args) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
server.port: 8086 | ||
spring: | ||
flyway: | ||
enabled: true | ||
locations: classpath:/db/migration | ||
datasource: | ||
url: jdbc:postgresql://localhost:${DB_PORT:5455}/${DB_DATABASE:bidrag-grunnlag}?user=${DB_USERNAME:cloudsqliamuser}&password=${DB_PASSWORD:admin} | ||
type: com.zaxxer.hikari.HikariDataSource | ||
kafka: | ||
bootstrap-servers: ${KAFKA_BROKERS} | ||
properties: | ||
security.protocol: PLAINTEXT | ||
consumer: | ||
enableAutoCommit: false | ||
listener: | ||
ackMode: RECORD |