Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh(ci): migrate runners to arc v2 (#2147) #2149

Merged
merged 3 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@ jobs:

- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.7.1/scripts/download-actionlint.bash)
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.7.7/scripts/download-actionlint.bash)
shell: bash

- name: Check workflow files
env:
SHELLCHECK_OPTS: "--severity=error"
run: |
${{ steps.get_actionlint.outputs.executable }} \
-ignore 'label "ubuntu-24.04" is unknown' \
-ignore 'label "(common|collect|collect-arm64)" is unknown' \
-ignore 'label "veracode" is unknown' \
-ignore 'label "centreon-(ubuntu-22.04|common|collect|collect-arm64)" is unknown' \
-ignore '"github.head_ref" is potentially untrusted' \
-pyflakes= \
-color
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/centreon-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
only_cma: "OFF"
- distrib: jammy
only_cma: "ON"
runs-on: [self-hosted, collect]
runs-on: centreon-collect
env:
SCCACHE_PATH: "/usr/bin/sccache"
SCCACHE_BUCKET: "centreon-github-sccache"
Expand Down Expand Up @@ -265,53 +265,53 @@ jobs:
- image: packaging-centreon-collect-vcpkg-alma8
distrib: el8
package_extension: rpm
runner: [self-hosted, collect]
runner: centreon-collect
arch: amd64
only_robot_cma: false
- image: packaging-centreon-collect-vcpkg-alma9
distrib: el9
package_extension: rpm
runner: [self-hosted, collect]
runner: centreon-collect
arch: amd64
only_robot_cma: false
- image: packaging-centreon-collect-vcpkg-bullseye
distrib: bullseye
package_extension: deb
runner: [self-hosted, collect]
runner: centreon-collect
arch: amd64
only_robot_cma: true
- image: packaging-centreon-collect-vcpkg-bullseye-arm64
distrib: bullseye
package_extension: deb
runner: [self-hosted, collect-arm64]
runner: centreon-collect-arm64
arch: arm64
only_robot_cma: true
- image: packaging-centreon-collect-vcpkg-bookworm
distrib: bookworm
package_extension: deb
runner: [self-hosted, collect]
runner: centreon-collect
arch: amd64
only_robot_cma: false
- image: packaging-centreon-collect-vcpkg-bookworm-arm64
distrib: bookworm
package_extension: deb
runner: [self-hosted, collect-arm64]
runner: centreon-collect-arm64
arch: arm64
only_robot_cma: false
- image: packaging-centreon-collect-vcpkg-jammy
distrib: jammy
package_extension: deb
runner: [self-hosted, collect]
runner: centreon-collect
arch: amd64
only_robot_cma: true
- image: packaging-centreon-collect-vcpkg-jammy-arm64
distrib: jammy
package_extension: deb
runner: [self-hosted, collect-arm64]
runner: centreon-collect-arm64
arch: arm64
only_robot_cma: true

name: package ${{ matrix.distrib }} ${{ contains(toJson(matrix.runner), 'arm') && ' arm' || '' }}
name: package ${{ matrix.distrib }} ${{ contains(matrix.runner, 'arm') && ' arm' || '' }}

uses: ./.github/workflows/package-collect.yml

Expand All @@ -330,7 +330,7 @@ jobs:
image: ${{ matrix.image }}
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
runner: ${{ toJSON(matrix.runner) }}
runner: ${{ matrix.runner }}
arch: ${{ matrix.arch }}
is_nightly: ${{ needs.get-environment.outputs.is_nightly }}
only_robot_cma: ${{ matrix.only_robot_cma }}
Expand Down Expand Up @@ -532,7 +532,7 @@ jobs:
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}

deliver-sources:
runs-on: [self-hosted, common]
runs-on: centreon-common
needs: [get-environment, package]
if: |
github.event_name != 'workflow_dispatch' &&
Expand Down Expand Up @@ -568,7 +568,7 @@ jobs:
github.repository == 'centreon/centreon-collect'

needs: [get-environment, robot-test]
runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
include:
Expand Down Expand Up @@ -619,7 +619,7 @@ jobs:
(needs.get-environment.outputs.is_cloud == 'false' || needs.get-environment.outputs.stability == 'unstable')

needs: [get-environment, robot-test]
runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
include:
Expand Down Expand Up @@ -685,7 +685,7 @@ jobs:
! contains(needs.*.result, 'cancelled') &&
github.repository == 'centreon/centreon-collect'

runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
distrib: [el8, el9, bookworm]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/centreon-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
stability: ${{ needs.get-environment.outputs.stability }}

deliver-rpm:
runs-on: [self-hosted, common]
runs-on: centreon-common
needs: [get-environment, package]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
is_cloud: ${{ needs.get-environment.outputs.is_cloud }}

deliver-deb:
runs-on: [self-hosted, common]
runs-on: centreon-common
needs: [get-environment, package]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
! contains(needs.*.result, 'cancelled') &&
github.repository == 'centreon/centreon-collect'

runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
distrib: [el8, el9, bookworm]
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/docker-collect-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,39 @@ jobs:
fail-fast: false
matrix:
include:
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: alma9
database: mariadb
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: alma9
database: mysql
dockerfile: centreon-collect-mysql-alma9-test
image: centreon-collect-mysql-alma9-test
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: bookworm
database: mariadb
- runner: [self-hosted, collect-arm64]
- runner: centreon-collect-arm64
distrib: bookworm
database: mariadb
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: bullseye
database: mariadb
- runner: [self-hosted, collect-arm64]
- runner: centreon-collect-arm64
distrib: bullseye
database: mariadb
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: jammy
database: mariadb
- runner: [self-hosted, collect-arm64]
- runner: centreon-collect-arm64
distrib: jammy
database: mariadb

runs-on: ${{ matrix.runner }}

name: build image ${{ matrix.database }} ${{ matrix.distrib }} ${{ contains(toJson(matrix.runner), 'arm') && ' arm' || '' }}
name: build image ${{ matrix.database }} ${{ matrix.distrib }} ${{ contains(matrix.runner, 'arm') && ' arm' || '' }}

env:
IMAGE_NAME: centreon-collect-${{ matrix.database }}-${{ matrix.distrib }}${{ contains(toJson(matrix.runner), 'arm') && '-arm64' || '' }}-test
IMAGE_NAME: centreon-collect-${{ matrix.database }}-${{ matrix.distrib }}${{ contains(matrix.runner, 'arm') && '-arm64' || '' }}-test

steps:
- name: Checkout sources
Expand Down Expand Up @@ -101,8 +101,8 @@ jobs:
context: .
build-args: |
"REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}"
"TRIPLET=${{ contains(toJson(matrix.runner), 'arm') && 'arm64-linux' || 'x64-linux' }}"
platforms: ${{ contains(toJson(matrix.runner), 'arm') && 'linux/arm64' || 'linux/amd64' }}
"TRIPLET=${{ contains(matrix.runner, 'arm') && 'arm64-linux' || 'x64-linux' }}"
platforms: ${{ contains(matrix.runner, 'arm') && 'linux/arm64' || 'linux/amd64' }}
pull: true
push: true
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ needs.get-environment.outputs.test_img_version }}
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/docker-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ jobs:
fail-fast: false
matrix:
include:
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: alma8
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: alma9
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: bookworm
- runner: [self-hosted, collect-arm64]
- runner: centreon-collect-arm64
distrib: bookworm
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: bullseye
- runner: [self-hosted, collect-arm64]
- runner: centreon-collect-arm64
distrib: bullseye
- runner: [self-hosted, collect]
- runner: centreon-collect
distrib: jammy
- runner: [self-hosted, collect-arm64]
- runner: centreon-collect-arm64
distrib: jammy

runs-on: ${{ matrix.runner }}

name: build docker image ${{ matrix.distrib }} ${{ contains(toJson(matrix.runner), 'arm') && ' arm' || '' }}
name: build docker image ${{ matrix.distrib }} ${{ contains(matrix.runner, 'arm') && ' arm' || '' }}

env:
IMAGE_BASE_NAME: packaging-centreon-collect
IMAGE_SUFFIX: ${{ contains(toJson(matrix.runner), 'arm') && '-arm64' || '' }}
IMAGE_SUFFIX: ${{ contains(matrix.runner, 'arm') && '-arm64' || '' }}

steps:
- name: Checkout sources
Expand Down Expand Up @@ -87,8 +87,8 @@ jobs:
target: centreon_collect_packaging
build-args: |
"REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}"
"TRIPLET=${{ contains(toJson(matrix.runner), 'arm') && 'arm64-linux' || 'x64-linux' }}"
platforms: ${{ contains(toJson(matrix.runner), 'arm') && 'linux/arm64' || 'linux/amd64' }}
"TRIPLET=${{ contains(matrix.runner, 'arm') && 'arm64-linux' || 'x64-linux' }}"
platforms: ${{ contains(matrix.runner, 'arm') && 'linux/arm64' || 'linux/amd64' }}
pull: true
push: true
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ env.IMAGE_BASE_NAME }}-${{ matrix.distrib }}${{ env.IMAGE_SUFFIX }}:${{ needs.get-environment.outputs.packaging_img_version }}
Expand All @@ -105,8 +105,8 @@ jobs:
target: centreon_collect_packaging_vcpkg
build-args: |
"REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}"
"TRIPLET=${{ contains(toJson(matrix.runner), 'arm') && 'arm64-linux' || 'x64-linux' }}"
platforms: ${{ contains(toJson(matrix.runner), 'arm') && 'linux/arm64' || 'linux/amd64' }}
"TRIPLET=${{ contains(matrix.runner, 'arm') && 'arm64-linux' || 'x64-linux' }}"
platforms: ${{ contains(matrix.runner, 'arm') && 'linux/arm64' || 'linux/amd64' }}
pull: false
push: true
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ env.IMAGE_BASE_NAME }}-vcpkg-${{ matrix.distrib }}${{ env.IMAGE_SUFFIX }}:${{ needs.get-environment.outputs.packaging_img_version }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gorgone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- package_extension: deb
image: unit-tests-bullseye-arm64
distrib: bullseye-arm64
runner_name: ["self-hosted", "collect-arm64"]
runner_name: centreon-collect-arm64
- package_extension: deb
image: unit-tests-bookworm
distrib: bookworm
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
retention-days: 1

deliver-sources:
runs-on: [self-hosted, common]
runs-on: centreon-common
needs: [get-environment, package]
if: |
github.event_name != 'workflow_dispatch' &&
Expand All @@ -339,7 +339,7 @@ jobs:
token_download_centreon_com: ${{ secrets.TOKEN_DOWNLOAD_CENTREON_COM }}

deliver-rpm:
runs-on: [self-hosted, common]
runs-on: centreon-common
needs: [get-environment, unit-test-perl, robot-test-gorgone, changes]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
Expand Down Expand Up @@ -370,7 +370,7 @@ jobs:
is_cloud: ${{ needs.get-environment.outputs.is_cloud }}

deliver-deb:
runs-on: [self-hosted, common]
runs-on: centreon-common
needs: [get-environment, unit-test-perl, robot-test-gorgone, changes]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
Expand Down Expand Up @@ -411,7 +411,7 @@ jobs:
! contains(needs.*.result, 'cancelled') &&
github.repository == 'centreon/centreon-collect'

runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
distrib: [el8, el9, bookworm]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/libzmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
include:
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled') &&
(needs.get-environment.outputs.is_cloud == 'false' || needs.get-environment.outputs.stability == 'unstable')
runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
include:
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled') &&
github.repository == 'centreon/centreon-collect'
runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
distrib: [el8, el9, bookworm]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lua-curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
image: packaging-centreon-collect-bookworm-arm64
distrib: bookworm
lua_version: 5.3
runner: ["self-hosted", "collect-arm64"]
runner: centreon-collect-arm64
arch: arm64

runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled') &&
github.repository == 'centreon/centreon-collect'
runs-on: [self-hosted, common]
runs-on: centreon-common
strategy:
matrix:
distrib: [el8, el9, bookworm]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ on:
required: true
jobs:
package:
runs-on: ${{ fromJSON(inputs.runner) }}
runs-on: ${{ inputs.runner }}

env:
SCCACHE_PATH: "/usr/bin/sccache"
Expand Down
Loading