getDN kan være null #707
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 and deploy provider, cpa, payload & send-in" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev/** | |
env: | |
"IMAGE_EBMS": "ghcr.io/${{ github.repository }}/ebms-provider:${{ github.sha }}" | |
"IMAGE_CPA": "ghcr.io/${{ github.repository }}/cpa-repo:${{ github.sha }}" | |
"IMAGE_PAYLOAD": "ghcr.io/${{ github.repository }}/ebms-payload:${{ github.sha }}" | |
jobs: | |
build: | |
name: "build" | |
runs-on: "ubuntu-20.04" | |
permissions: | |
packages: write | |
repository-projects: write | |
contents: write | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-java@v3" | |
with: | |
"java-version": "21" | |
"distribution": "temurin" | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/wrapper | |
~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: "Build and tests" | |
run: ./gradlew test build | |
env: | |
ORG_GRADLE_PROJECT_githubUser: x-access-token | |
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish artifacts | |
run: ./gradlew ebxml-processing-model:publish | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_USERNAME: x-access-token | |
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to GitHub Packages Docker Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Build and push ebms-provider Docker image" | |
id: "docker-build-push-ebms-provider" | |
run: "docker build ebms-provider --pull --tag ${IMAGE_EBMS} -f Dockerfile && docker push ${IMAGE_EBMS}" | |
- name: "Build and push cpa-repo Docker image" | |
id: "docker-build-push-cpa-repo" | |
run: "docker build cpa-repo --pull --tag ${IMAGE_CPA} -f Dockerfile && docker push ${IMAGE_CPA}" | |
- name: "Build and push ebms-payload Docker image" | |
id: "docker-build-push-ebms-payload" | |
run: "docker build ebms-payload --pull --tag ${IMAGE_PAYLOAD} -f Dockerfile && docker push ${IMAGE_PAYLOAD}" | |
deploy-processor: | |
name: "Deploy ebms provider to dev" | |
needs: "build" | |
runs-on: "ubuntu-20.04" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Deploy to DEV" | |
uses: "nais/deploy/actions/deploy@v1" | |
env: | |
APIKEY: "${{ secrets.NAIS_DEPLOY_APIKEY }}" | |
CLUSTER: "dev-fss" | |
RESOURCE: ".nais/ebms-provider-dev.yaml" | |
IMAGE: ${{env.IMAGE_EBMS}} | |
TELEMETRY: ${{ steps.docker-build-push-ebms-provider.outputs.telemetry }} | |
deploy-cpa-repo: | |
name: "Deploy cpa-repo to dev" | |
needs: "build" | |
runs-on: "ubuntu-20.04" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Deploy to DEV" | |
uses: "nais/deploy/actions/deploy@v1" | |
env: | |
APIKEY: "${{ secrets.NAIS_DEPLOY_APIKEY }}" | |
CLUSTER: "dev-fss" | |
RESOURCE: ".nais/cpa-repo-dev.yaml" | |
IMAGE: ${{env.IMAGE_CPA}} | |
TELEMETRY: ${{ steps.docker-build-push-cpa-repo.outputs.telemetry }} | |
deploy-ebms-payload: | |
name: "Deploy ebms-payload to dev" | |
needs: "build" | |
runs-on: "ubuntu-20.04" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Deploy to DEV" | |
uses: "nais/deploy/actions/deploy@v1" | |
env: | |
APIKEY: "${{ secrets.NAIS_DEPLOY_APIKEY }}" | |
CLUSTER: "dev-fss" | |
RESOURCE: ".nais/ebms-payload-dev.yaml" | |
IMAGE: ${{env.IMAGE_PAYLOAD}} | |
TELEMETRY: ${{ steps.docker-build-push-ebms-payload.outputs.telemetry }} |