mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
fix(ci): fix cmware connector workflow
This commit is contained in:
parent
f04174cb34
commit
bcb3410650
3
.github/workflows/connector-vmware.yml
vendored
3
.github/workflows/connector-vmware.yml
vendored
@ -46,8 +46,7 @@ jobs:
|
||||
|
||||
uses: ./.github/workflows/package.yml
|
||||
with:
|
||||
module_directory: centreon-license-manager
|
||||
nfpm_file_pattern: "centreon-license-manager/packaging/*.yaml"
|
||||
nfpm_file_pattern: "connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
image_name: ${{ matrix.image }}
|
||||
|
45
.github/workflows/package.yml
vendored
45
.github/workflows/package.yml
vendored
@ -1,10 +1,6 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
module_directory:
|
||||
type: string
|
||||
description: The module directory
|
||||
required: true
|
||||
nfpm_file_pattern:
|
||||
type: string
|
||||
description: The pattern of the nfpm configuration file(s)
|
||||
@ -47,31 +43,6 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Replace git sources by encoded files
|
||||
if: "${{ inputs.encode_cache_key != '' }}"
|
||||
run: |
|
||||
rm -rf ${{ inputs.module_directory }}
|
||||
tar zxf ${{ inputs.module_directory }}-${{ inputs.major_version }}.${{ inputs.minor_version }}.tar.gz
|
||||
rm -f ${{ inputs.module_directory }}-${{ inputs.major_version }}.${{ inputs.minor_version }}.tar.gz
|
||||
mv ${{ inputs.module_directory }}-${{ inputs.major_version }}.${{ inputs.minor_version }} ${{ inputs.module_directory }}
|
||||
shell: bash
|
||||
|
||||
- name: Restore static directory cache
|
||||
if: "${{ inputs.frontend_static_directory != '' && inputs.frontend_static_cache_key != '' }}"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ inputs.frontend_static_directory }}
|
||||
key: ${{ inputs.frontend_static_cache_key }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Restore translation directory cache
|
||||
if: "${{ inputs.translation_directory != '' && inputs.translation_cache_key != '' }}"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ inputs.translation_directory }}
|
||||
key: ${{ inputs.translation_cache_key }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Import gpg key
|
||||
env:
|
||||
RPM_GPG_SIGNING_KEY: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
@ -83,8 +54,7 @@ jobs:
|
||||
RPM_GPG_SIGNING_KEY_ID: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
RPM_GPG_SIGNING_PASSPHRASE: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
run: |
|
||||
export MAJOR_VERSION="${{ inputs.major_version }}"
|
||||
export VERSION="${{ inputs.major_version }}.${{ inputs.minor_version }}"
|
||||
export VERSION="${{ inputs.version }}"
|
||||
export RELEASE="${{ inputs.release }}"
|
||||
|
||||
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
|
||||
@ -97,19 +67,6 @@ jobs:
|
||||
export APACHE_GROUP="www-data"
|
||||
fi
|
||||
|
||||
MAJOR_LEFT=$( echo $MAJOR_VERSION | cut -d "." -f1 )
|
||||
MAJOR_RIGHT=$( echo $MAJOR_VERSION | cut -d "-" -f1 | cut -d "." -f2 )
|
||||
BUMP_MAJOR_RIGHT=$(( MAJOR_RIGHT_PART + 1 ))
|
||||
if [ "$MAJOR_RIGHT" = "04" ]; then
|
||||
BUMP_MAJOR_LEFT="$MAJOR_LEFT"
|
||||
BUMP_MAJOR_RIGHT="10"
|
||||
else
|
||||
BUMP_MAJOR_LEFT=$(( $MAJOR_LEFT + 1 ))
|
||||
BUMP_MAJOR_RIGHT="04"
|
||||
fi
|
||||
|
||||
export NEXT_MAJOR_VERSION="$BUMP_MAJOR_LEFT.$BUMP_MAJOR_RIGHT"
|
||||
|
||||
export RPM_SIGNING_KEY_FILE="$(pwd)/key.gpg"
|
||||
export RPM_SIGNING_KEY_ID="$RPM_GPG_SIGNING_KEY_ID"
|
||||
export NFPM_RPM_PASSPHRASE="$RPM_GPG_SIGNING_PASSPHRASE"
|
||||
|
Loading…
x
Reference in New Issue
Block a user