Skip to content

Commit

Permalink
add sda-doa to build_pr_container.yaml to build doa pr image and run …
Browse files Browse the repository at this point in the history
…doa integration test
  • Loading branch information
Parisa68 committed Feb 20, 2025
1 parent 5218110 commit c650166
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build_pr_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,47 @@ jobs:
sarif_file: 'inbox-results.sarif'
category: sftp-inbox


- name: create maven settings.xml
uses: s4u/maven-settings-action@v3.0.0
with:
servers: |
[{
"id":"github-fega-norway",
"username": "${{github.actor}}",
"password": "${{ secrets.GITHUB_TOKEN }}"
}]
- name: Copy settings.xml to sda-doa root
shell: bash
run: cp /home/runner/.m2/settings.xml ./sda-doa/settings.xml

- name: Build container for sda-doa
uses: docker/build-push-action@v6
with:
context: ./sda-doa
push: true
tags: |
ghcr.io/${{ github.repository }}:sha-${{ github.sha }}-doa
ghcr.io/${{ github.repository }}:PR${{ github.event.number }}-doa
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
org.opencontainers.image.revision=${{ github.sha }}
- name: Run Trivy vulnerability scanner on doa
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_SKIP_DB_UPDATE: true
TRIVY_SKIP_JAVA_DB_UPDATE: true
with:
image-ref: ghcr.io/${{ github.repository }}:sha-${{ github.sha }}-doa
format: "sarif"
hide-progress: true
ignore-unfixed: true
output: 'inbox-results.sarif'
severity: "CRITICAL,HIGH"

rabbitmq:
needs:
- build_go_images
Expand Down Expand Up @@ -248,6 +289,35 @@ jobs:
run: docker compose -f .github/integration/sda-sync-integration.yml run integration_test
if: steps.changes.outputs.sync == 'true' || steps.changes.outputs.sync-api == 'true'

sda-doa:
needs:
- build_java_images
- build_server_images
runs-on: ubuntu-latest
strategy:
matrix:
storage: [s3, posix]
steps:
- name: Check out code
uses: actions/checkout@v4

- name: create maven settings.xml
uses: s4u/maven-settings-action@v3.0.0
with:
servers: |
[{
"id":"github-fega-norway",
"username": "${{github.actor}}",
"password": "${{ secrets.GITHUB_TOKEN }}"
}]
- name: Copy settings.xml to sda-doa root
shell: bash
run: cp /home/runner/.m2/settings.xml ./sda-doa/settings.xml

- name: Test sda-doa for ${{ matrix.storage }} storage
run: docker compose -f .github/integration/sda-doa-${{ matrix.storage }}-outbox.yml run integration_test

chart:
needs:
- build_go_images
Expand Down

0 comments on commit c650166

Please sign in to comment.