Test for euxConsumer deserialisering med spring object mapper (#696) #199
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: deploy-dev | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
- ".gitignore" | |
- "LICENCE" | |
- "CODEOWNERS" | |
branches: | |
- master | |
permissions: | |
contents: write | |
packages: write | |
env: | |
docker_image: docker.pkg.github.com/${{ github.repository }}/melosys-eessi:${{ github.sha }} | |
jobs: | |
build: | |
name: Build, deploy to q2, and make draft release | |
runs-on: ubuntu-latest | |
environment: dev-fss-q2:teammelosys | |
steps: | |
- name: Checkout latest code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: deploy new Unleash Apikey to ${{github.event.inputs.environment}} | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-fss | |
RESOURCE: nais/unleash-apitoken.yml | |
VARS: nais/vars-q2.json | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Setup Maven | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build and Run tests | |
run: mvn clean package -B -e -U | |
- name: pre-deploy | |
uses: navikt/digihot-deploy/actions/pre-deploy@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and publish Docker image | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
docker build --tag ${docker_image} . | |
docker login docker.pkg.github.com -u ${GITHUB_REPOSITORY} -p ${GITHUB_TOKEN} | |
docker push ${docker_image} | |
- name: Deploy til dev (Q2) | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-fss | |
RESOURCE: nais/nais.yml | |
VAR: image=${{ env.docker_image }} | |
VARS: nais/vars-q2.json | |
- name: post-deploy | |
uses: navikt/digihot-deploy/actions/post-deploy@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: draft release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION_TAG }} | |
name: ${{ env.APPLICATION }} ${{ env.VERSION_TAG }} | |
body: ${{ env.CHANGE_LOG }} | |
draft: true | |
prerelease: false | |
- run: | | |
echo "COMMIT_MSG=$(git log --format=%s -n 1)" >> $GITHUB_ENV | |
- name: Slack Notification (deploy success) | |
if: success() | |
uses: rtCamp/[email protected] | |
env: | |
SLACK_COLOR: good | |
SLACK_USERNAME: Github Actions | |
SLACK_ICON: https://github.com/github.png?size=48 | |
SLACK_TITLE: ':clap: melosys-eessi ble deployet til dev :rocket:' | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_MESSAGE: ${{ env.COMMIT_MSG }} | |
- name: Slack Notification (deploy failure) | |
if: failure() | |
uses: rtCamp/[email protected] | |
env: | |
SLACK_COLOR: danger | |
SLACK_USERNAME: Github Actions | |
SLACK_ICON: https://github.com/github.png?size=48 | |
SLACK_TITLE: ':crying_cat_face: melosys-eessi kunne ikke deployes til dev!' | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_MESSAGE: ${{ env.COMMIT_MSG }} |