centreon-plugins/.github/workflows/plugin-delivery.yml

152 lines
4.4 KiB
YAML
Raw Normal View History

2023-01-10 15:03:40 +01:00
on:
workflow_call:
inputs:
version:
description: The package version
type: string
required: true
release:
description: The package release
type: string
required: true
2023-01-10 15:03:40 +01:00
stability:
description: The package stability (stable, testing, unstable)
type: string
required: true
secrets:
nexus_username:
2023-01-10 15:03:40 +01:00
required: true
nexus_password:
2023-01-10 15:03:40 +01:00
required: true
update_repo_path:
description: "The update repo script path"
required: true
cloudfront_id:
description: "The cloudfront ID for repo url"
required: true
yum_repo_address:
description: "The legacy yum repo address"
required: true
yum_repo_key:
description: "The repo key"
required: true
artifactory_token:
description: "The artifactory token"
required: true
token_download_centreon_com:
description: "The token to call download.centreon.com api"
required: true
2023-01-10 15:03:40 +01:00
jobs:
deliver-sources:
runs-on: [self-hosted, common]
if: ${{ contains(fromJson('["stable"]'), inputs.stability) }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/cache/restore@v3
with:
path: ./build/
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
fail-on-cache-miss: true
- name: Deliver sources
uses: ./.github/actions/release-sources
with:
bucket_directory: centreon-plugins
module_directory: build
module_name: centreon-plugins
version: ${{ inputs.version }}
release: ${{ inputs.release }}
token_download_centreon_com: ${{ secrets.token_download_centreon_com }}
2023-01-10 15:03:40 +01:00
deliver-rpm:
runs-on: [self-hosted, common]
strategy:
fail-fast: false
2023-01-10 15:03:40 +01:00
matrix:
distrib: [el7, el8, el9]
2023-01-10 15:03:40 +01:00
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Delivery
uses: ./.github/actions/rpm-delivery
with:
module_name: plugins
2023-01-10 15:03:40 +01:00
distrib: ${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
stability: ${{ inputs.stability }}
artifactory_token: ${{ secrets.artifactory_token }}
deliver-rpm-legacy:
if: ${{ inputs.stability == 'stable' }}
runs-on: [self-hosted, common]
strategy:
fail-fast: false
matrix:
distrib: [el7, el8]
major_version: ["21.10", "22.04", "22.10"]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Delivery
uses: ./.github/actions/rpm-delivery-legacy
with:
module_name: plugins
major_version: ${{ matrix.major_version }}
distrib: ${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
2023-01-10 15:03:40 +01:00
update_repo_path: ${{ secrets.update_repo_path }}
cloudfront_id: ${{ secrets.cloudfront_id }}
yum_repo_address: ${{ secrets.yum_repo_address }}
yum_repo_key: ${{ secrets.yum_repo_key }}
stability: ${{ inputs.stability }}
deliver-deb:
runs-on: [self-hosted, common]
strategy:
fail-fast: false
2023-01-10 15:03:40 +01:00
matrix:
distrib: [bullseye]
2023-01-10 15:03:40 +01:00
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Delivery
uses: ./.github/actions/deb-delivery
with:
distrib: ${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
stability: ${{ inputs.stability }}
artifactory_token: ${{ secrets.artifactory_token }}
deliver-deb-legacy:
if: ${{ inputs.stability == 'stable' }}
runs-on: [self-hosted, common]
strategy:
fail-fast: false
matrix:
distrib: [bullseye]
major_version: ["22.04", "22.10"]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Delivery
uses: ./.github/actions/deb-delivery-legacy
with:
distrib: ${{ matrix.distrib }}
major_version: ${{ matrix.major_version }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}
2023-01-10 15:03:40 +01:00
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
stability: ${{ inputs.stability }}