[chore] Update non-automated dependencies (#7260) #1706
This file contains hidden or 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: Ansible | |
| # The workflow triggered by any change in deployments/ansible_collections/signalfx/splunk_otel_collector/. | |
| # 1. Run lint checks and Ansible Molecule tests. | |
| # 2. Push a new "ansible-v<VERSION>" tag, if the version was updated | |
| # in deployments/ansible_collections/signalfx/splunk_otel_collector/galaxy.yml. | |
| on: | |
| push: | |
| paths: | |
| - '.github/workflows/ansible.yml' | |
| - 'deployments/ansible_collections/signalfx/splunk_otel_collector/galaxy.yml' | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - '.github/workflows/ansible.yml' | |
| - 'deployments/ansible_collections/signalfx/splunk_otel_collector/**' | |
| - '!**.md' | |
| - '!packaging/technical-addon/**' | |
| schedule: | |
| - cron: '0 0 * * 1,4' # Every Monday and Thrusday at midnight UTC | |
| concurrency: | |
| group: ansible-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| cross-compile: | |
| strategy: | |
| matrix: | |
| SYS_BINARIES: [ "binaries-linux_amd64", "binaries-windows_amd64" ] | |
| uses: ./.github/workflows/reusable-compile.yml | |
| with: | |
| SYS_BINARY: ${{ matrix.SYS_BINARIES }} | |
| agent-bundle-linux: | |
| strategy: | |
| matrix: | |
| ARCH: [ "amd64" ] | |
| fail-fast: false | |
| uses: ./.github/workflows/reusable-agent-bundle-linux.yml | |
| with: | |
| ARCH: ${{ matrix.ARCH }} | |
| build-package: | |
| needs: [ cross-compile, agent-bundle-linux ] | |
| strategy: | |
| matrix: | |
| SYS_PACKAGE: [ "deb", "rpm" ] | |
| ARCH: [ "amd64" ] | |
| fail-fast: false | |
| uses: ./.github/workflows/reusable-build-package.yml | |
| with: | |
| SYS_PACKAGE: ${{ matrix.SYS_PACKAGE }} | |
| ARCH: ${{ matrix.ARCH }} | |
| agent-bundle-windows: | |
| needs: lint | |
| strategy: | |
| matrix: | |
| OS: [ "windows-2025" ] | |
| uses: ./.github/workflows/reusable-agent-bundle-windows.yml | |
| with: | |
| OS: ${{ matrix.OS }} | |
| msi-custom-actions: | |
| needs: lint | |
| uses: ./.github/workflows/reusable-msi-custom-actions.yml | |
| msi-build: | |
| needs: [ cross-compile, agent-bundle-windows, msi-custom-actions ] | |
| strategy: | |
| matrix: | |
| OS: [ "windows-2025" ] | |
| uses: ./.github/workflows/reusable-msi-build.yml | |
| with: | |
| OS: ${{ matrix.OS }} | |
| ARCH: "amd64" | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: 'deployments/ansible_collections/signalfx/splunk_otel_collector' | |
| steps: | |
| - name: Check out the codebase. | |
| uses: actions/checkout@v5 | |
| - name: Set up Python 3. | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies. | |
| run: | | |
| pip3 install 'yamllint==1.38.0' | |
| pip3 install 'galaxy-importer==0.4.37' | |
| - name: Lint code. | |
| run: yamllint . | |
| - name: Run ansible-lint | |
| uses: ansible/ansible-lint@v26.1.1 | |
| with: | |
| requirements_file: "molecule/requirements.yml" | |
| setup_python: "false" | |
| working_directory: "deployments/ansible_collections/signalfx/splunk_otel_collector" | |
| - name: Run Ansible sanity tests | |
| run: ansible-test sanity | |
| - name: Run galaxy-importer | |
| run: | | |
| ansible-galaxy collection build ./ --output-path ./dist | |
| python3 -m galaxy_importer.main dist/signalfx-splunk_otel_collector-* | |
| linux-test: | |
| name: Linux Test | |
| needs: [ lint, build-package ] | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: 'deployments/ansible_collections/signalfx/splunk_otel_collector' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ansible: | |
| # EOL REFERENCE: https://endoflife.date/ansible | |
| - ansible>=13.0.0, <14.0.0 | |
| distro: | |
| - amazonlinux2023 | |
| - centos9 | |
| - debian11 | |
| - debian12 | |
| - ubuntu2204 | |
| - ubuntu2404 | |
| steps: | |
| - name: Check out the codebase. | |
| uses: actions/checkout@v5 | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| path: /tmp | |
| - uses: DamianReeves/write-file-action@v1.3 | |
| with: | |
| path: "${{ github.workspace }}/requirements.txt" | |
| contents: | | |
| ${{ matrix.ansible }} | |
| ansible-lint>=26.1.0 | |
| molecule>=25.5.0 | |
| molecule-plugins[docker]>=25.8.12 | |
| docker>=7.1.0 | |
| requests>=2.32.0 | |
| urllib3>=2 | |
| - name: Set up Python 3. | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| cache-dependency-path: "${{ github.workspace }}/requirements.txt" | |
| - name: Install test dependencies. | |
| run: | | |
| python -m pip install --upgrade setuptools | |
| # workaround for https://github.com/yaml/pyyaml/issues/724 | |
| pip3 install 'wheel==0.40.0' | |
| pip3 install 'Cython<3.0' 'PyYaml~=5.0' --no-build-isolation | |
| pip3 install --use-pep517 -r "${GITHUB_WORKSPACE}/requirements.txt" | |
| - name: Run Molecule tests. | |
| run: molecule --debug -v --base-config ./molecule/config/docker.yml test --all | |
| env: | |
| PY_COLORS: '1' | |
| ANSIBLE_FORCE_COLOR: '1' | |
| MOLECULE_DISTRO: ${{ matrix.distro }} | |
| windows-test: | |
| name: Windows Test | |
| needs: [ lint, msi-build ] | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: 'deployments/ansible_collections/signalfx/splunk_otel_collector' | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ansible: | |
| # EOL REFERENCE: https://endoflife.date/ansible | |
| - ansible>=13.0.0, <14.0.0 | |
| distro: | |
| # EOL REFERENCE: https://endoflife.date/windows-server | |
| - "2019" | |
| - "2022" | |
| scenario: | |
| - default | |
| - default_install_remote_version | |
| - custom_vars | |
| - with_instrumentation | |
| - custom_vars_install_old_version | |
| steps: | |
| - name: Free up disk space for vagrant box | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| - name: Check out the codebase. | |
| uses: actions/checkout@v5 | |
| - name: Make tmp directory for msi build artifact | |
| run: mkdir -p /tmp/msi-build | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: msi-build-windows-2025 | |
| path: /tmp/msi-build | |
| # Workaround for https://github.com/actions/runner-images/issues/13202 | |
| - name: Unload KVM module (AMD) | |
| run: | | |
| # Check if KVM modules are loaded | |
| lsmod | grep kvm | |
| # Unload KVM modules if present (for Intel or AMD CPUs) | |
| sudo modprobe -r kvm_intel || true | |
| sudo modprobe -r kvm_amd || true | |
| sudo rmmod kvm || true | |
| # Verify KVM is unloaded | |
| lsmod | grep kvm | |
| continue-on-error: true | |
| - name: Install vagrant and virtualbox | |
| run: | | |
| sudo apt update && sudo apt install -y virtualbox | |
| wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
| sudo apt update && sudo apt install -y vagrant | |
| - uses: DamianReeves/write-file-action@v1.3 | |
| with: | |
| path: "${{ github.workspace }}/requirements.txt" | |
| contents: | | |
| ${{ matrix.ansible }} | |
| ansible-compat<=25.8.2 | |
| ansible-lint<=26.1.1 | |
| molecule<=25.1.0 | |
| molecule-plugins[vagrant]<=25.8.12 | |
| pywinrm<=0.4.3 | |
| - name: Set up Python 3. | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| cache-dependency-path: "${{ github.workspace }}/requirements.txt" | |
| - name: Install test dependencies. | |
| run: pip3 install --use-pep517 -r "${GITHUB_WORKSPACE}/requirements.txt" | |
| - name: Download vagrant box | |
| run: | | |
| box=$( yq ".platforms[] | select(.name == \"${{ matrix.distro }}\") | .box" ./molecule/config/windows.yml ) | |
| box_version=$( yq ".platforms[] | select(.name == \"${{ matrix.distro }}\") | .box_version" ./molecule/config/windows.yml ) | |
| eval "box_version=${box_version}" | |
| json=$( wget -nv -O- "https://vagrantcloud.com/api/v2/vagrant/${box}" ) | |
| url=$( echo "$json" | tr -d '\r' | tr -d '\n' | jq -r ".versions[] | select(.version == \"${box_version}\") | .providers[] | select(.name == \"virtualbox\") | .url" ) | |
| wget -nv -O /tmp/vagrant.box "$url" | |
| - name: Clean VirtualBox cache | |
| run: | | |
| # Related issues: | |
| # https://bbs.archlinux.org/viewtopic.php?id=298056 | |
| # https://forums.virtualbox.org/viewtopic.php?t=112438 | |
| # https://forums.virtualbox.org/viewtopic.php?t=112481 | |
| echo "3" | sudo tee /proc/sys/vm/drop_caches | |
| echo "1" | sudo tee /proc/sys/vm/drop_caches | |
| - name: free after clean cache | |
| run: | | |
| free -h | |
| - name: Run Molecule tests. | |
| run: molecule --debug -v --base-config ./molecule/config/windows.yml test -s ${{ matrix.scenario }} -p ${{ matrix.distro }} | |
| env: | |
| PY_COLORS: '1' | |
| ANSIBLE_FORCE_COLOR: '1' | |
| MOLECULE_VAGRANT_BOX_URL: /tmp/vagrant.box | |
| MOLECULE_VAGRANT_BOX_VERSION: " " # version must not be set when using a local box | |
| push-release-tag: | |
| name: Push Release Tag | |
| needs: lint | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: 'deployments/ansible_collections/signalfx/splunk_otel_collector' | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Read current version of the Ansible Collection | |
| id: read-galaxy-yaml | |
| uses: cumulusds/get-yaml-paths-action@v1 | |
| with: | |
| file: deployments/ansible_collections/signalfx/splunk_otel_collector/galaxy.yml | |
| version: version | |
| - name: Ensure version is fetched from galaxy.yml | |
| if: steps.read-galaxy-yaml.outputs.version == '' | |
| run: echo "Fail to read version from galaxy.yml" && exit 1 | |
| - name: Push new release tag if it doesn't exist | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const tagRef = "tags/ansible-v${{ steps.read-galaxy-yaml.outputs.version }}" | |
| const existingRefs = await github.rest.git.listMatchingRefs({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: tagRef | |
| }) | |
| if (existingRefs.data.length === 0) { | |
| await github.rest.git.createRef({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: "refs/" + tagRef, | |
| sha: context.sha | |
| }) | |
| } else { | |
| console.log(tagRef + " already exists") | |
| } |