Skip to content

Fix install scripts integration test #841

Fix install scripts integration test

Fix install scripts integration test #841

Workflow file for this run

name: Propagate-PR
# === Triggers ===
"on":
pull_request:
types:
- closed
# === JOBS ===
jobs:
# === Set target branch ===
propagate:
name: Propagate to affected version branches
runs-on: ubuntu-20.04
strategy:
matrix:
go-version:
- 1.20.x
env:
ACTIVESTATE_CI: true
ACTIVESTATE_CLI_DISABLE_RUNTIME: true
SHELL: bash
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_USERNAME: ${{ secrets.JIRA_EMAIL }}
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
timeout-minutes: 5
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.base.ref, 'version/')
steps:
- # === Checkout code ===
name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_AUTOMATION_TOKEN }}
- # === Install Go ===
name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- # === Install State Tool ===
name: Install State Tool
uses: ActiveState/setup-state-tool@v1
- # === Setup ===
name: Setup
shell: bash
run: |
bin=$(pwd)/.github/deps/${{ runner.os }}/bin
echo "Adding $bin to PATH"
echo "$bin" >> $GITHUB_PATH
# We specify our custom user because we need privileges to push to protected branches
git config user.name "AS-builds"
git config user.email "[email protected]"
- # === Install Deps ===
name: Install Deps
shell: bash
run: state run install-deps
- # === Preprocess ===
name: Preprocess
shell: bash
run: state run preprocess -v
- # === Propagate PR ===
name: Propagate PR
id: propagate_pr
shell: bash
run: go run scripts/ci/propagate-pr/main.go ${{ github.event.pull_request.number }}
continue-on-error: true
- # === Notify Slack of Failures ===
name: Notify Slack of Failures
if: steps.propagate_pr.outcome == 'failure'
uses: slackapi/[email protected]
with:
payload: |
{
"text": "Propagate-PR failed for ${{ github.event.pull_request.html_url }}\nFailure should be addressed by ${{ github.event.pull_request.user.login }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Propagate-PR failed for *<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>*\nFailure should be addressed by *${{ github.event.pull_request.user.login }}*"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Failed job: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- # === Fail If Propagate PR failed ===
name: Fail If Propagate PR failed
if: steps.propagate_pr.outcome == 'failure'
shell: bash
run: exit 1