[FDSE-2986] splunk10 compatibility (#6) #59
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: CI | |
| on: | |
| push: | |
| paths-ignore: | |
| - '.github/workflows/manual-release.yml' | |
| jobs: | |
| bundle-app: | |
| name: Bundle App | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Read App Info | |
| id: app | |
| run: | | |
| app_id=$(cat splunk_*/app.manifest | jq -r '.info.id.name') | |
| app_version=$(cat splunk_*/app.manifest | jq -r '.info.id.version') | |
| echo "name=${app_id}" >> $GITHUB_OUTPUT | |
| echo "version=${app_version}" >> $GITHUB_OUTPUT | |
| working-directory: ./packages | |
| - name: Bundle app source | |
| env: | |
| APP_NAME: ${{ steps.app.outputs.name }} | |
| APP_VERSION: ${{ steps.app.outputs.version }} | |
| run: | | |
| # Exclude images from README file | |
| sed -i '/^!/d' README.md | |
| cp README.md packages/$APP_NAME | |
| tar -C packages -zcvf $APP_NAME-$APP_VERSION.tar.gz $APP_NAME/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packaged_app | |
| path: ${{ steps.app.outputs.name }}*.tar.gz | |
| slim-validate: | |
| name: SLIM Validation | |
| needs: bundle-app | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ 3.9 ] | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: packaged_app | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install splunk-packaging-toolkit | |
| - name: Slim Validate | |
| run: slim validate *.tar.gz | |
| appinspect-cli: | |
| name: AppInspect CLI ${{ matrix.tags }} | |
| needs: bundle-app | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| tags: | |
| - "cloud" | |
| - "private_app" | |
| - "private_classic" | |
| - "private_victoria" | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: packaged_app | |
| path: dist | |
| - uses: splunk/appinspect-cli-action@v2.10 | |
| with: | |
| app_path: dist | |
| included_tags: ${{ matrix.tags }} | |
| # appinspect-api: | |
| # name: AppInspect API Validation | |
| # needs: | |
| # - bundle-app | |
| # - appinspect-cli | |
| # - slim-validate | |
| # runs-on: ubuntu-latest | |
| # # Job not executed if branch is not master | |
| # if: github.ref == 'refs/heads/master' | |
| # steps: | |
| # - name: Download artifact | |
| # uses: actions/download-artifact@v2 | |
| # with: | |
| # name: app_tgz | |
| # - name: Run AppInspect | |
| # uses: splunk/appinspect-api-action@v2 | |
| # with: | |
| # filePath: ${{ needs.bundle-app.outputs.app_name }}.tgz | |
| # splunkUser: ${{ secrets.SPLUNK_USER }} | |
| # splunkPassword: ${{ secrets.SPLUNK_PASS }} | |
| # includedTags: cloud | |
| # failOnError: true | |
| # failOnWarning: false |