Bump the all-dependencies group with 12 updates #797
Workflow file for this run
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
name: Build | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened, ready_for_review ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
IMAGE: ghcr.io/navikt/familie-tilbake:${{ github.sha }} | |
jobs: | |
build-jar-docker: | |
if: github.event.pull_request.draft == false | |
name: Bygg app/image, push til github | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Bygg med maven u/test | |
env: | |
SONAR_PROJECTKEY: ${{ secrets.SONAR_PROJECTKEY }} | |
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }} | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn -B --no-transfer-progress package verify -Dmaven.test.skip=true --settings .m2/maven-settings.xml -DtrimStackTrace=false --file pom.xml -Dchangelist= -Dsha1=-$TIMESTAMP-$(echo $GITHUB_SHA | cut -c1-7) | |
- name: Bygg Docker image | |
run: | | |
docker build -t $IMAGE . | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Docker image | |
run: docker push $IMAGE | |
run-junit: | |
if: github.event.pull_request.draft == false | |
name: Kjøre junit tester | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Bygg (dependabot) | |
if: github.actor == 'dependabot[bot]' | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn verify --settings .m2/maven-settings.xml --file pom.xml | |
- name: Bygg med maven + sonar | |
if: github.actor != 'dependabot[bot]' | |
env: | |
SONAR_PROJECTKEY: ${{ secrets.SONAR_PROJECTKEY }} | |
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }} | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn -B --no-transfer-progress package --settings .m2/maven-settings.xml -DtrimStackTrace=false --file pom.xml -Dchangelist= -Dsha1=-$TIMESTAMP-$(echo $GITHUB_SHA | cut -c1-7) | |
run-e2e: | |
if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' | |
name: Kjør e2e tester | |
runs-on: ubuntu-latest | |
needs: build-jar-docker | |
steps: | |
- name: Login to Github Package Registry | |
env: | |
DOCKER_USERNAME: x-access-token | |
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin docker.pkg.github.com | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout e2e tests | |
if: "!contains(github.event.head_commit.message, 'e2e skip')" | |
uses: actions/checkout@v4 | |
with: | |
ref: "main" | |
repository: navikt/familie-tilbake-e2e | |
token: ${{ secrets.READER_TOKEN }} | |
path: tilbake-e2e | |
- name: Setter riktig familie-tilbake versjon i e2e tester | |
if: "!contains(github.event.head_commit.message, 'e2e skip')" | |
run: sed -i 's/familie-tilbake:latest/familie-tilbake:'$GITHUB_SHA'/g' tilbake-e2e/e2e/docker-compose.yml | |
- name: Set up Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Start alle apper (e2e) | |
env: | |
INTEGRASJONER_CLIENT_ID: ${{ secrets.INTEGRASJONER_CLIENT_ID }} | |
INTEGRASJONER_CLIENT_SECRET: ${{ secrets.INTEGRASJONER_CLIENT_SECRET }} | |
INTEGRASJONER_INFOTRYGD_KS_SCOPE: ${{ secrets.INTEGRASJONER_INFOTRYGD_KS_SCOPE }} | |
INTEGRASJONER_AAD_GRAPH_SCOPE: ${{ secrets.INTEGRASJONER_AAD_GRAPH_SCOPE }} | |
TILBAKE_CLIENT_ID: ${{ secrets.TILBAKE_CLIENT_ID }} | |
TILBAKE_CLIENT_SECRET: ${{ secrets.TILBAKE_CLIENT_SECRET }} | |
TILBAKE_FRONTEND_CLIENT_ID: ${{ secrets.TILBAKE_FRONTEND_CLIENT_ID }} | |
INTEGRASJONER_SCOPE: ${{ secrets.INTEGRASJONER_SCOPE }} | |
HISTORIKK_CLIENT_ID: ${{ secrets.HISTORIKK_CLIENT_ID }} | |
HISTORIKK_CLIENT_SECRET: ${{ secrets.HISTORIKK_CLIENT_SECRET }} | |
if: "!contains(github.event.head_commit.message, 'e2e skip')" | |
run: cd tilbake-e2e/e2e; ./e2e.sh | |
- name: Kjør tester (e2e) | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TILBAKE_CLIENT_ID: ${{ secrets.TILBAKE_CLIENT_ID }} | |
TILBAKE_CLIENT_SECRET: ${{ secrets.TILBAKE_CLIENT_SECRET }} | |
HISTORIKK_CLIENT_ID: ${{ secrets.HISTORIKK_CLIENT_ID }} | |
HISTORIKK_CLIENT_SECRET: ${{ secrets.HISTORIKK_CLIENT_SECRET }} | |
if: "!contains(github.event.head_commit.message, 'e2e skip')" | |
run: cd tilbake-e2e/autotest; mvn -B --no-transfer-progress --settings .m2/maven-settings.xml -Dtest="**" test | |
- name: Samle Docker-logs ved feil | |
if: failure() | |
uses: jwalton/gh-docker-logs@v2 | |
with: | |
dest: './logs' | |
- name: Tar logs | |
if: failure() | |
run: tar cvzf ./logs.tgz ./logs | |
- name: Laste opp logs til GitHub | |
uses: actions/upload-artifact@master | |
if: failure() | |
with: | |
name: docker-logs-${{ github.run_number }}.tgz | |
path: ./logs.tgz | |
retention-days: 2 |