Skip to content

Commit 16e886c

Browse files
committed
Debugging
1 parent 7884660 commit 16e886c

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/dp-inntekt-api-deploy.yaml renamed to .github/workflows/deploy.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,22 @@ jobs:
1919
distribution: temurin
2020
java-version: 17
2121

22+
- uses: gradle/[email protected]
2223
- uses: gradle/[email protected]
24+
id: build
25+
env:
26+
DEPENDENCY_GRAPH_INCLUDE_CONFIGURATIONS: compileClasspath|runtimeClasspath
27+
ORG_GRADLE_PROJECT_githubUser: x-access-token
28+
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
2329
with:
24-
arguments: build
30+
dependency-graph: generate-and-submit
31+
arguments: --configuration-cache build
32+
2533
- uses: nais/docker-build-push@v0
2634
name: docker-build-push
2735
id: docker-build-push
2836
with:
37+
byosbom: dependency-graph-reports/build_and_deploy-build.json
2938
team: teamdagpenger
3039
tag: latest
3140
push_image: true # optional, default true

dp-inntekt-api/src/main/kotlin/no/nav/dagpenger/inntekt/db/Postgres.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ fun migrate(config: InntektApiConfig): Int {
1717
locations = config.database.flywayLocations,
1818
)
1919
}
20+
2021
else ->
2122
hikariDataSourceWithVaultIntegration(config, Role.ADMIN).use {
2223
migrate(
@@ -59,7 +60,9 @@ fun migrate(
5960
dataSource: HikariDataSource,
6061
initSql: String = "",
6162
locations: List<String> = listOf("db/migration"),
62-
): Int = Flyway.configure().locations(*locations.toTypedArray()).dataSource(dataSource).initSql(initSql).load().migrate().migrations.size
63+
): Int =
64+
Flyway.configure().validateMigrationNaming(true).locations(*locations.toTypedArray()).dataSource(dataSource)
65+
.initSql(initSql).load().migrate().migrations.size
6366

6467
fun clean(dataSource: HikariDataSource) =
6568
Flyway.configure().cleanDisabled(

0 commit comments

Comments
 (0)