Release 20260400 #238
This file contains hidden or 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: docker-builder-unit-tests | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - develop | |
| paths: | |
| - ".github/workflows/docker-builder-unit-tests.yml" | |
| - ".github/docker/unit-tests/*" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/docker-builder-unit-tests.yml" | |
| - ".github/docker/unit-tests/*" | |
| jobs: | |
| dependency-scan: | |
| uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main | |
| get-environment: | |
| needs: [dependency-scan] | |
| uses: ./.github/workflows/get-environment.yml | |
| dockerize: | |
| needs: [get-environment] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| needs.get-environment.outputs.stability != 'stable' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| dockerfile: alma8 | |
| image: alma8 | |
| - runner: ubuntu-24.04 | |
| dockerfile: alma9 | |
| image: alma9 | |
| - runner: ubuntu-24.04 | |
| dockerfile: alma10 | |
| image: alma10 | |
| - runner: ubuntu-24.04 | |
| dockerfile: bullseye | |
| image: bullseye | |
| - runner: ubuntu-24.04-arm | |
| dockerfile: bullseye | |
| image: bullseye-arm64 | |
| - runner: ubuntu-24.04 | |
| dockerfile: bookworm | |
| image: bookworm | |
| - runner: ubuntu-24.04 | |
| dockerfile: trixie | |
| image: trixie | |
| - runner: ubuntu-24.04 | |
| dockerfile: jammy | |
| image: jammy | |
| - runner: ubuntu-24.04 | |
| dockerfile: noble | |
| image: noble | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Login to Registry | |
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 | |
| with: | |
| registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }} | |
| username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }} | |
| password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }} | |
| - name: Login to proxy registry | |
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 | |
| with: | |
| registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }} | |
| username: ${{ secrets.HARBOR_CENTREON_PUSH_USERNAME }} | |
| password: ${{ secrets.HARBOR_CENTREON_PUSH_TOKEN }} | |
| - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 | |
| - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2 | |
| with: | |
| file: .github/docker/unit-tests/Dockerfile.unit-tests-${{ matrix.dockerfile }} | |
| context: . | |
| build-args: "REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}" | |
| pull: true | |
| push: true | |
| tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/unit-tests-${{ matrix.image }}:latest | |
| set-skip-label: | |
| needs: [get-environment, dockerize] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| ! cancelled() && | |
| ! contains(needs.*.result, 'failure') && | |
| ! contains(needs.*.result, 'cancelled') | |
| uses: ./.github/workflows/set-pull-request-skip-label.yml |