Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-christophe81 committed Oct 24, 2023
1 parent c117c9d commit 9666600
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 32 deletions.
50 changes: 24 additions & 26 deletions .github/workflows/docker-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,42 @@ jobs:
- runner: collect
dockerfile: centreon-collect-alma8
image: centreon-collect-alma8
dockerfile-test: no-dokerfile
image-test:
tag: ${{ needs.get-version.outputs.img_version }}
- runner: collect
dockerfile: centreon-collect-alma9
image: centreon-collect-alma9
dockerfile-test: centreon-collect-alma9-test
image-test: centreon-collect-alma9-test
tag: ${{ needs.get-version.outputs.img_version }}
- runner: collect
dockerfile: centreon-collect-alma9-test
image: centreon-collect-alma9-test
tag: ${{ needs.get-version.outputs.test_img_version }}
- runner: collect
dockerfile: centreon-collect-mysql-alma9
image: centreon-collect-mysql-alma9
dockerfile-test: centreon-collect-mysql-alma9-test
image-test: centreon-collect-mysql-alma9-test
tag: ${{ needs.get-version.outputs.img_version }}
- runner: collect
dockerfile: centreon-collect-mysql-alma9-test
image: centreon-collect-mysql-alma9-test
tag: ${{ needs.get-version.outputs.test_img_version }}
- runner: collect
dockerfile: centreon-collect-debian-bullseye
image: centreon-collect-debian-bullseye
dockerfile-test: centreon-collect-debian-bullseye-test
image-test: centreon-collect-debian-bullseye-test
tag: ${{ needs.get-version.outputs.img_version }}
- runner: collect
dockerfile: centreon-collect-debian-bullseye-test
image: centreon-collect-debian-bullseye-test
tag: ${{ needs.get-version.outputs.test_img_version }}
- runner: collect-arm64
dockerfile: centreon-collect-debian-bullseye
image: centreon-collect-debian-bullseye-arm64
dockerfile-test: centreon-collect-debian-bullseye-test
image-test: centreon-collect-debian-bullseye-arm64-test
tag: ${{ needs.get-version.outputs.img_version }}
- runner: collect-arm64
dockerfile: centreon-collect-debian-bullseye-test
image: centreon-collect-debian-bullseye-arm64-test
tag: ${{ needs.get-version.outputs.test_img_version }}

runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.runner)) }}


name: build container ${{ matrix.image }}

steps:
Expand All @@ -78,19 +88,7 @@ jobs:

- uses: docker/setup-buildx-action@v2

- name: Build Test image
if: ${{startsWith(matrix.dockerfile-test, 'centreon-collect')}}
uses: docker/build-push-action@v3
with:
file: .github/docker/Dockerfile.${{ matrix.dockerfile-test }}
context: .
build-args: "REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}"
platforms: ${{ contains(matrix.runner, 'arm') && 'linux/arm64' || 'linux/amd64' }}
pull: true
push: true
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image-test }}:${{ needs.get-version.outputs.test_img_version }}

- name: Build Package image
- name: Build image ${{ matrix.image }}:${{ matrix.tag }}
uses: docker/build-push-action@v3
with:
file: .github/docker/Dockerfile.${{ matrix.dockerfile }}
Expand All @@ -99,5 +97,5 @@ jobs:
platforms: ${{ contains(matrix.runner, 'arm') && 'linux/arm64' || 'linux/amd64' }}
pull: true
push: true
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:${{ needs.get-version.outputs.img_version }}

tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:${{ matrix.tag }}

8 changes: 2 additions & 6 deletions .github/workflows/robot-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ on:


jobs:
get-version:
uses: ./.github/workflows/get-version.yml

test-image-to-cache:
needs: [get-version]
runs-on: ${{ contains(inputs.image, 'arm') && fromJson('["self-hosted", "collect-arm64"]') || 'ubuntu-22.04' }}
steps:
- name: Checkout sources
Expand Down Expand Up @@ -74,7 +70,7 @@ jobs:
- name: image to cache
uses: actions/cache/save@v3
with:
path: /tmp/${{inputs.image}}
path: /tmp/${{inputs.image}}
key: ${{inputs.image_test}}

robot-test-list:
Expand All @@ -94,7 +90,7 @@ jobs:
echo "features=$(grep -Rl '*** Test Cases ***' . | grep '.robot' | sed -e "s#^./##" | sort | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
robot-test:
needs: [robot-test-list, get-version]
needs: [robot-test-list]
runs-on: ${{ contains(inputs.image, 'arm') && fromJson('["self-hosted", "collect-arm64"]') || 'ubuntu-22.04' }}

strategy:
Expand Down

0 comments on commit 9666600

Please sign in to comment.