Skip to content

Commit

Permalink
Bump vtp til java 17 (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
espenwaaga authored Nov 2, 2021
1 parent a1ee336 commit 7ce5834
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .github/.m2/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
<servers>
<server>
<id>github</id>
<username>${env.GITHUB_USERNAME}</username>
<username>x-access-token</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
<server>
<id>legacy-avhengigheter</id>
<username>${env.GITHUB_USERNAME}</username>
<username>x-access-token</username>
<password>${env.GITHUB_PASSWORD}</password>
</server>
</servers>
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set cache key
run: |
echo "CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
echo "PREVIOUS_CACHE_KEY=$(expr $(date +%V) - 1)" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ env.CACHE_KEY }}
restore-keys: |
${{ runner.os }}-maven-${{ env.PREVIOUS_CACHE_KEY }}
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
java-version: 16
check-latest: true
cache: 'maven'

- name: Set build version
run: |
Expand All @@ -31,5 +23,4 @@ jobs:
echo "Building $BUILD_VERSION"
mvn package --batch-mode --settings .github/.m2/settings.xml --file pom.xml -Dchangelist= -Dsha1=-${BUILD_VERSION}
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} # Må ha PAT pga avhengighet til private repo: navikt/legacy-avhengigheter
15 changes: 3 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set cache key
run: |
echo "CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
echo "PREVIOUS_CACHE_KEY=$(expr $(date +%V) - 1)" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ env.CACHE_KEY }}
restore-keys: |
${{ runner.os }}-maven-${{ env.PREVIOUS_CACHE_KEY }}
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
java-version: 16
check-latest: true
cache: 'maven'

- name: Set build version
run: |
Expand All @@ -38,7 +30,6 @@ jobs:
echo "Deployed artifacts"
echo "TAG=${BUILD_VERSION}" >> $GITHUB_ENV
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} # Må ha PAT pga avhengighet til private repo: navikt/legacy-avhengigheter

- name: Release Drafter
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/release-kontrakt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
java-version: 16

- name: Set cache key
run: |
echo "CACHE_KEY=$(expr $(date +%V) - 1 + 1)-${{ github.event.pull_request.number }}" >> $GITHUB_ENV
echo "PREVIOUS_CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ env.CACHE_KEY }}
restore-keys: |
${{ runner.os }}-maven-${{ env.PREVIOUS_CACHE_KEY }}
check-latest: true
cache: 'maven'

- name: Publish artifacts
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
17
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM navikt/java:16
FROM navikt/java:17

LABEL org.opencontainers.image.source=https://github.com/navikt/vtp

Expand All @@ -14,5 +14,4 @@ ENV JAVA_OPTS="-Dlogback.configurationFile=logback.xml \
-XX:MaxRAMPercentage=75.0 \
-XX:+PrintFlagsFinal \
-Dfile.encoding=UTF8 \
-Duser.timezone=Europe/Oslo \
--illegal-access=permit"
-Duser.timezone=Europe/Oslo"
4 changes: 2 additions & 2 deletions mocks/pdl-mock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<dependency>
<groupId>io.github.kobylynskyi</groupId>
<artifactId>graphql-codegen-maven-plugin</artifactId>
<version>5.2.0</version>
<version>${graphql-codegen-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>com.distelli.graphql</groupId>
Expand All @@ -55,7 +55,7 @@
<plugin>
<groupId>io.github.kobylynskyi</groupId>
<artifactId>graphql-codegen-maven-plugin</artifactId>
<version>5.2.0</version>
<version>${graphql-codegen-maven-plugin.version}</version>
<executions>
<execution>
<goals>
Expand Down
2 changes: 1 addition & 1 deletion mocks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java-extended-scalars</artifactId>
<version>16.0.1</version>
<version>17.0</version>
<exclusions>
<exclusion>
<groupId>com.squareup.okhttp3</groupId>
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<java.version>16</java.version>
<java.version>17</java.version>

<kafka.version>2.8.0</kafka.version>
<avro.version>1.11.0</avro.version>
Expand All @@ -44,6 +44,7 @@
<okonomistotte.versjon>2.0_20190412163011_bb51d0e</okonomistotte.versjon>
<swagger.version>1.6.3</swagger.version>
<graphql-java.version>0.0.0-2021-05-17T23-49-29-83942204</graphql-java.version>
<graphql-codegen-maven-plugin.version>5.3.0</graphql-codegen-maven-plugin.version>
<ch.qos.logback.version>1.2.6</ch.qos.logback.version>
<mockito.version>3.12.4</mockito.version>
<jupiter.version>5.8.1</jupiter.version>
Expand Down

0 comments on commit 7ce5834

Please sign in to comment.