Integration Server Test #288
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: integration-server-test | |
| run-name: Integration Server Test | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| run-upgrade-tests: | |
| description: 'Run upgrade tests (SNAPSHOT)' | |
| required: false | |
| type: boolean | |
| default: true | |
| run-upgrade-bc-tests: | |
| description: 'Run upgrade tests (BC)' | |
| required: false | |
| type: boolean | |
| default: true | |
| schedule: | |
| - cron: '0 2 * * 1-5' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| env: | |
| TF_VAR_BRANCH: ${{ github.ref_name }} | |
| TF_VAR_BUILD_ID: ${{ github.run_id }} | |
| TF_VAR_ENVIRONMENT: 'ci' | |
| TF_VAR_REPO: ${{ github.repository }} | |
| TERRAFORM_VERSION: 1.10.2 | |
| jobs: | |
| prepare: | |
| name: Prepare tests | |
| runs-on: ubuntu-latest | |
| outputs: | |
| bc_upgrade_paths: ${{ steps.generate.outputs.bc_upgrade_paths }} | |
| snapshot_upgrade_paths: ${{ steps.generate.outputs.snapshot_upgrade_paths }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: generate | |
| name: Generate upgrade paths | |
| uses: ./.github/workflows/generate-upgrade-paths | |
| run-upgrade: | |
| if: ${{ !contains(inputs.run-upgrade-tests, 'false') }} | |
| name: Upgrade | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| upgrade-path: ${{ fromJSON(needs.prepare.outputs.snapshot_upgrade_paths) }} | |
| scenario: | |
| - 'Default' | |
| - 'Reroute' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup | |
| uses: ./.github/workflows/setup-integration-server-test | |
| - name: "Run upgrade tests" | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| export TF_VAR_CREATED_DATE=$(date +%s) | |
| SCENARIO="${{ matrix.scenario }}" UPGRADE_PATH="${{ matrix.upgrade-path }}" make integration-server-test/upgrade | |
| run-upgrade-bc: | |
| if: ${{ !contains(inputs.run-upgrade-bc-tests, 'false') && needs.prepare.outputs.bc_upgrade_paths != '[]' }} | |
| name: Upgrade BC | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| upgrade-path: ${{ fromJSON(needs.prepare.outputs.bc_upgrade_paths) }} | |
| scenario: | |
| - 'Default' | |
| - 'Reroute' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup | |
| uses: ./.github/workflows/setup-integration-server-test | |
| - name: "Run upgrade tests" | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| export TF_VAR_CREATED_DATE=$(date +%s) | |
| SCENARIO="${{ matrix.scenario }}" UPGRADE_PATH="${{ matrix.upgrade-path }}" make integration-server-test/upgrade | |
| notify: | |
| name: Notify | |
| if: always() && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| needs: | |
| - prepare | |
| - run-upgrade | |
| - run-upgrade-bc | |
| steps: | |
| - id: check | |
| uses: elastic/oblt-actions/check-dependent-jobs@v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} | |
| skipped-as-success: 'true' | |
| - uses: elastic/oblt-actions/slack/notify-result@v1 | |
| with: | |
| bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
| channel-id: "#apm-server" | |
| status: ${{ steps.check.outputs.status }} |