ci: build TAs with current version of UCC #8
Workflow file for this run
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: TAs Regression Test | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| pull_request: | |
| branches: | |
| - "**" | |
| workflow_dispatch: | |
| inputs: | |
| target_repo: | |
| description: "Target repository" | |
| required: false | |
| default: "" | |
| target_branch: | |
| description: "Target branch" | |
| required: false | |
| default: "main" | |
| jobs: | |
| build-ucc: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout UCC Framework Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: UCC | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.7" | |
| - name: Install Poetry | |
| run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 | |
| - name: Build UCC Framework Package | |
| working-directory: UCC | |
| run: | | |
| poetry install | |
| poetry build | |
| - name: Upload UCC Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ucc-package-whl | |
| path: UCC/dist/*.whl | |
| test-addons: | |
| needs: build-ucc | |
| strategy: | |
| matrix: | |
| target_repo: | |
| - splunk/splunk-add-on-for-microsoft-cloud-services | |
| - splunk/splunk-add-on-for-amazon-web-services | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Target Add-on Repository | |
| if: ${{ github.event_name == 'push' || github.event.inputs.target_repo == '' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ matrix.target_repo }} | |
| path: TA | |
| token: ${{ secrets.GH_TOKEN_ADMIN }} | |
| - name: Checkout Target Add-on Repository (manual) | |
| if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_repo != '' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.inputs.target_repo }} | |
| ref: ${{ github.event.inputs.target_branch }} | |
| path: TA | |
| token: ${{ secrets.GH_TOKEN_ADMIN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.7" | |
| - name: Install Poetry | |
| run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 | |
| - name: Download UCC Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ucc-package-whl | |
| path: UCC | |
| - name: Install Dependencies in Target Add-on | |
| working-directory: TA | |
| run: | | |
| UCC_WHL=$(ls ../UCC/*.whl) | |
| poetry add ../UCC/$UCC_WHL --group dev | |
| poetry export --without-hashes -o package/lib/requirements.txt | |
| - name: Run ucc-gen build in Target Add-on | |
| working-directory: TA | |
| run: | | |
| poetry run ucc-gen build |