feat(vmware8-esx): new plugin to monitor ESX status using vSphere 8 API #96
Workflow file for this run
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: as400 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'as400/**' | |
push: | |
branches: | |
- develop | |
- master | |
paths: | |
- 'as400/**' | |
jobs: | |
get-environment: | |
uses: ./.github/workflows/get-environment.yml | |
with: | |
version_file: as400/packaging/centreon-as400-daemon.yaml | |
package: | |
needs: [get-environment] | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- package_extension: rpm | |
image: packaging-plugins-java-alma8 | |
distrib: el8 | |
- package_extension: rpm | |
image: packaging-plugins-java-alma9 | |
distrib: el9 | |
- package_extension: deb | |
image: packaging-plugins-java-bullseye | |
distrib: bullseye | |
- package_extension: deb | |
image: packaging-plugins-java-bookworm | |
distrib: bookworm | |
- package_extension: deb | |
image: packaging-plugins-java-jammy | |
distrib: jammy | |
container: | |
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }} | |
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: Prepare files for packaging | |
run: | | |
find . \ | |
-type f \ | |
-exec grep -E '(@CONNECTOR_VERSION@)|(@CONNECTOR_HOME@)|(@CONNECTOR_ETC@)|(@CONNECTOR_LOG@)|(@CONNECTOR_USER@)|(@JAVA_BIN@)' {} ';' \ | |
-exec sed -i \ | |
-e 's|@CONNECTOR_VERSION@|'"${{ needs.get-environment.outputs.version }}"'|g' \ | |
-e 's|@CONNECTOR_HOME@|'"/usr/share/centreon-as400"'|g' \ | |
-e 's|@CONNECTOR_ETC@|'"/etc/centreon-as400/"'|g' \ | |
-e 's|@CONNECTOR_LOG@|'"/var/log/centreon-as400/"'|g' \ | |
-e 's|@CONNECTOR_USER@|'"centreon-as400"'|g' \ | |
-e 's|@JAVA_BIN@|'"/usr/bin/java"'|g' \ | |
{} ';' | |
shell: bash | |
- name: Set JAVA_HOME | |
run: export JAVA_HOME=$( java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | tr -s ' ' | cut -d ' ' -f 4) | |
- name: Build JAR using maven | |
run: mvn -version && mvn clean install -f as400/connector.as400/pom.xml | |
- name: Remove me after debug | |
run: find / -name "centreon-as400*.jar" | |
- name: Package | |
uses: ./.github/actions/package-nfpm | |
with: | |
nfpm_file_pattern: "as400/packaging/centreon-as400-daemon.yaml" | |
distrib: ${{ matrix.distrib }} | |
package_extension: ${{ matrix.package_extension }} | |
version: ${{ needs.get-environment.outputs.version }} | |
release: 1 | |
arch: all | |
commit_hash: ${{ github.sha }} | |
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-as400-${{ 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-environment.outputs.stability }} | |
- name: Save to cache | |
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ./*.${{ matrix.package_extension }} | |
key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }} | |
deliver-rpm: | |
needs: [get-environment, package] | |
if: ${{ contains(fromJson('["stable", "testing", "unstable"]'), needs.get-environment.outputs.stability) }} | |
runs-on: [self-hosted, common] | |
strategy: | |
matrix: | |
distrib: [el8, el9] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Delivery | |
uses: ./.github/actions/rpm-delivery | |
with: | |
module_name: as400 | |
distrib: ${{ matrix.distrib }} | |
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} | |
stability: ${{ needs.get-environment.outputs.stability }} | |
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
deliver-deb: | |
needs: [get-environment, package] | |
if: ${{ contains(fromJson('["stable", "testing", "unstable"]'), needs.get-environment.outputs.stability) }} | |
runs-on: [self-hosted, common] | |
strategy: | |
matrix: | |
distrib: [bullseye, bookworm, jammy] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Delivery | |
uses: ./.github/actions/deb-delivery | |
with: | |
module_name: as400 | |
distrib: ${{ matrix.distrib }} | |
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} | |
stability: ${{ needs.get-environment.outputs.stability }} | |
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} |