Skip to content

chore(deps): bump python-novaclient from 18.7.0 to 18.8.0 (#808) #10

chore(deps): bump python-novaclient from 18.7.0 to 18.8.0 (#808)

chore(deps): bump python-novaclient from 18.7.0 to 18.8.0 (#808) #10

name: 'Windows - Build'
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- 'main'
tags:
- '*'
# Allows running this workflow manually from the Actions tab
workflow_dispatch: # yamllint disable-line rule:empty-values
# modify the default permissions granted to the GITHUB_TOKEN
permissions:
contents: 'read'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-windows-get-list:
runs-on: 'ubuntu-latest'
outputs:
monitoring_plugin_list_json: '${{ steps.save-json.outputs.monitoring_plugin_list_json}}'
steps:
- name: 'Harden Runner'
uses: 'step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350' # v2.10.3
with:
egress-policy: 'audit'
- name: 'checkout the monitoring-plugins repo'
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # v4.2.2
- name: 'create list of windows checks'
run: |
for dir in check-plugins/*; do
check=$(basename $dir)
if [ -e $dir/.windows ]; then
echo $check >> /tmp/windows-checks
echo "'$check'," >> /tmp/windows-checks-ps-list
fi
done
- name: 'save the list as json'
id: 'save-json'
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "monitoring_plugin_list_json<<$EOF" >> "$GITHUB_OUTPUT"
cat /tmp/windows-checks | jq -R -s -c 'split("\n")[:-1]' >> "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
build-windows:
runs-on: 'windows-latest'
needs: 'build-windows-get-list'
strategy:
matrix:
check: '${{ fromJson(needs.build-windows-get-list.outputs.monitoring_plugin_list_json) }}'
steps:
- name: 'Harden Runner'
uses: 'step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350' # v2.10.3
with:
egress-policy: 'audit'
- name: 'checkout the monitoring-plugins repo'
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # v4.2.2
with:
# Relative path under $GITHUB_WORKSPACE to place the repository
path: 'monitoring-plugins'
- name: 'checkout the lib repo'
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # v4.2.2
with:
repository: 'Linuxfabrik/lib'
path: 'lib'
- name: 'install python3.13'
uses: 'actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b' # v5.3.0
with:
python-version: '3.13'
- run: 'python.exe -m pip install --upgrade pip wheel setuptools'
# ordered-set is for nuitka: "Nuitka:WARNING: Using very slow fallback for ordered sets, please install 'ordered-set' or 'orderedset' PyPI packages for best Python compile time performance."
- run: 'python.exe -m pip install --upgrade ordered-set Nuitka Nuitka'
# install 3rd party libraries for all check plugins
- run: 'python.exe -m pip install --requirement ${{ github.workspace }}\monitoring-plugins\requirements.txt --require-hashes'
# info in case of errors
- run: 'python.exe -m pip list'
- run: >
python.exe -m nuitka
--assume-yes-for-downloads
--mingw64
--follow-imports
--include-plugin-directory="${{ github.workspace }}\lib"
--output-dir=C:\nuitka-compile-temp
--remove-output
--standalone
${{ github.workspace }}\monitoring-plugins\check-plugins\${{ matrix.check }}\${{ matrix.check}}'
- name: 'Upload build output as artifact for zipping later on'
uses: 'actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08' # v4.6.0
with:
name: 'nuitka-build-output-${{ matrix.check }}'
path: 'C:\nuitka-compile-temp\${{ matrix.check }}*'
zip-windows:
# we need to use windows here too, to be able to restore the cache (see https://github.com/marketplace/actions/cache#cache-version)
runs-on: 'windows-latest'
needs: 'build-windows'
steps:
- name: 'Harden Runner'
uses: 'step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350' # v2.10.3
with:
egress-policy: 'audit'
- name: 'download all artifacts'
uses: 'actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16' # v4.1.8
with:
path: 'C:\artifacts'
- name: 'prepare plugins for zipping'
shell: 'bash'
run: |
cd /c/artifacts
mkdir /c/output
for dir in */*/; do
echo "dir: $dir"
echo cp -rv $dir* /c/output/
cp -rv $dir* /c/output/
done
- name: 'upload the output as monitoring-plugins'
uses: 'actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08' # v4.6.0
with:
name: 'monitoring-plugins'
path: 'C:\output\'