Skip to content

chore(ci): move stream connectors to collect repository #42

chore(ci): move stream connectors to collect repository

chore(ci): move stream connectors to collect repository #42

name: stream-connectors-lib
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
paths:
- stream-connectors/packaging/connectors-lib/**
- stream-connectors/modules/centreon-stream-connectors-lib/**
push:
branches:
- develop
- dev-[2-9][0-9].[0-9][0-9].x
- master
- "[2-9][0-9].[0-9][0-9].x"
paths:
- stream-connectors/packaging/connectors-lib/**
- stream-connectors/modules/centreon-stream-connectors-lib/**
jobs:
get-version:
uses: ./.github/workflows/get-version.yml
package:
needs: [get-version]
strategy:
fail-fast: false
matrix:
distrib: [el8, el9, bullseye, bookworm, jammy]
include:
- package_extension: rpm
image: packaging-stream-connectors-nfpm-alma8
distrib: el8
- package_extension: rpm
image: packaging-stream-connectors-nfpm-alma9
distrib: el9
- package_extension: deb
image: packaging-stream-connectors-nfpm-bullseye
distrib: bullseye
- package_extension: deb
image: packaging-stream-connectors-nfpm-bookworm
distrib: bookworm
- package_extension: deb
image: packaging-stream-connectors-nfpm-jammy
distrib: jammy
runs-on: ubuntu-22.04
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:${{ needs.get-version.outputs.version }}
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
name: package ${{ matrix.distrib }}
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Package
uses: ./.github/actions/package
with:
nfpm_file_pattern: "stream-connectors/packaging/connectors-lib/*.yaml"
distrib: ${{ matrix.distrib }}
major_version: ${{ needs.get-version.outputs.version }}
version: ${{ needs.get-version.outputs.version }}.0
release: "1"
package_extension: ${{ matrix.package_extension }}
arch: all
commit_hash: ${{ github.sha }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
stability: ${{ needs.get-version.outputs.stability }}
deliver-rpm:
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-version.outputs.stability) }}
needs: [get-version, package]
runs-on: ubuntu-22.04
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: stream-connectors-lib
distrib: ${{ matrix.distrib }}
version: ${{ needs.get-version.outputs.version }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
stability: ${{ needs.get-version.outputs.stability }}
deliver-deb:
if: ${{ contains(fromJson('["unstable", "testing", "stable"]'), needs.get-version.outputs.stability) }}
needs: [get-version, package]
runs-on: ubuntu-22.04
strategy:
matrix:
distrib: [bullseye, bookworm, jammy]
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: stream-connectors-lib
distrib: ${{ matrix.distrib }}
version: ${{ needs.get-version.outputs.version }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
stability: ${{ needs.get-version.outputs.stability }}