nightly robot dev-23.04.x #4577
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: robot-nightly | |
run-name: nightly robot ${{ github.head_ref || github.ref_name }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '.github/workflows/robot-nightly.yml' | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
dispatch-to-maintained-branches: | |
if: ${{ github.event_name == 'schedule' && github.ref_name == 'develop' }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- run: | | |
gh workflow run robot-nightly.yml -r "dev-23.04.x" | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
get-version: | |
uses: ./.github/workflows/get-version.yml | |
veracode-analysis: | |
needs: [get-version] | |
uses: ./.github/workflows/veracode-analysis.yml | |
with: | |
module_name: centreon-collect | |
major_version: ${{ needs.get-version.outputs.version }} | |
minor_version: ${{ needs.get-version.outputs.patch }} | |
img_version: ${{ needs.get-version.outputs.img_version }} | |
secrets: | |
veracode_api_id: ${{ secrets.VERACODE_API_ID_COLL }} | |
veracode_api_key: ${{ secrets.VERACODE_API_KEY_COLL }} | |
veracode_srcclr_token: ${{ secrets.VERACODE_SRCCLR_TOKEN }} | |
docker_registry_id: ${{ secrets.DOCKER_REGISTRY_ID }} | |
docker_registry_passwd: ${{ secrets.DOCKER_REGISTRY_PASSWD }} | |
package: | |
needs: [get-version] | |
uses: ./.github/workflows/package-collect.yml | |
with: | |
version: ${{ needs.get-version.outputs.version }}.${{ needs.get-version.outputs.patch }} | |
img_version: ${{ needs.get-version.outputs.img_version }} | |
release: ${{ needs.get-version.outputs.release }} | |
commit_hash: ${{ github.sha }} | |
secrets: inherit | |
robot-test: | |
needs: [get-version, package] | |
strategy: | |
matrix: | |
include: | |
- distrib: el9 | |
image: centreon-collect-alma9-test | |
database_type: mariadb | |
test_group_name: robot_test-mariadb-el9-amd64 | |
- distrib: el9 | |
image: centreon-collect-mysql-alma9-test | |
database_type: mysql | |
test_group_name: robot_test-mysql-el9-amd64 | |
name: robot test ${{ matrix.test_group_name }} | |
uses: ./.github/workflows/robot-test.yml | |
with: | |
image: ${{ matrix.image }} | |
full_name: ${{ matrix.image }}:${{ needs.get-version.outputs.test_img_version }} | |
distrib: ${{ matrix.distrib }} | |
database_type: ${{ matrix.database_type }} | |
test_group_name: ${{matrix.test_group_name}} | |
secrets: | |
registry_username: ${{ secrets.DOCKER_REGISTRY_ID }} | |
registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} | |
deliver-rpm: | |
if: ${{ contains(fromJson('["unstable"]'), needs.get-version.outputs.stability) }} | |
needs: [robot-test, get-version] | |
runs-on: [self-hosted, common] | |
strategy: | |
matrix: | |
distrib: [el8, el9] | |
name: deliver ${{ matrix.distrib }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Publish RPM packages | |
uses: ./.github/actions/delivery | |
with: | |
module_name: collect | |
distrib: ${{ matrix.distrib }} | |
version: ${{ needs.get-version.outputs.version }} | |
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
cache_key: cache-${{ github.sha }}-rpmbuild-centreon-collect-${{ matrix.distrib }}-${{ github.head_ref || github.ref_name }} | |
stability: ${{ needs.get-version.outputs.stability }} | |
release_type: ${{ needs.get-version.outputs.release_type }} | |
release_cloud: ${{ needs.get-version.outputs.release_cloud }} | |
deliver-deb: | |
if: ${{ contains(fromJson('["unstable"]'), needs.get-version.outputs.stability) }} | |
needs: [robot-test, get-version] | |
runs-on: [self-hosted, common] | |
strategy: | |
matrix: | |
distrib: [bullseye] | |
name: deliver ${{ matrix.distrib }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Publish DEB packages | |
uses: ./.github/actions/delivery | |
with: | |
module_name: collect | |
distrib: ${{ matrix.distrib }} | |
version: ${{ needs.get-version.outputs.version }} | |
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
cache_key: cache-${{ github.sha }}-debbuild-centreon-collect-${{ matrix.distrib }}-${{ github.head_ref || github.ref_name }} | |
stability: ${{ needs.get-version.outputs.stability }} | |
release_type: ${{ needs.get-version.outputs.release_type }} | |
release_cloud: ${{ needs.get-version.outputs.release_cloud }} |