-
Notifications
You must be signed in to change notification settings - Fork 43
68 lines (62 loc) · 2.7 KB
/
update-providers-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Test the bridge by previewing provider bridge upgrades
on:
# These checks can be triggerred manually from the Actions tab, which already lets you specify
# which branch of the bridge to use for testing.
workflow_dispatch:
inputs:
pulumiVersion:
description: pulumi/pulumi version to use
type: string
default: ""
required: false
bridgeVersion:
description: 'Version of Bridge to upgrade to; defaults to current sha'
type: string
default: ""
required: false
# # Alternatively, they can be triggered by opening a feature-* branch. Not having these enabled on
# # normal branches and PRs is intentional as the checks consume a lot of resources.
# push:
# branches:
# - feature-**
# paths-ignore:
# - CHANGELOG.md
# tags-ignore:
# - "*"
# - "**"
jobs:
generate-providers-list:
runs-on: ubuntu-latest
steps:
- id: get-providers
run: echo "providers=$(jq . <(curl https://raw.githubusercontent.com/pulumi/ci-mgmt/master/provider-ci/providers.json) --compact-output)" >> "$GITHUB_OUTPUT"
outputs:
providers: ${{ steps.get-providers.outputs.providers }}
build:
runs-on: ubuntu-latest
name: Test upgrading ${{ matrix.provider }} to pulumi-terraform-bridge ${{ github.sha }}
steps:
- name: Trigger upgrade
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: pulumi/pulumi-${{ matrix.provider }}
event-type: upgrade-bridge-test
client-payload: |-
{
"target-pulumi-version": ${{ toJSON(github.event.inputs.pulumiVersion) }},
"target-bridge-version": ${{ toJSON(github.event.inputs.bridgeVersion != '' && github.event.inputs.bridgeVersion || github.sha) }},
"pr-reviewers": ${{ toJSON( github.triggering_actor || 't0yv0' ) }},
"pr-description": "This PR was created to test a pulumi/pulumi-terraform-bridge feature.\n\n- pulumi/pulumi-terraform-bridge#${{ github.event.number }}\n\n- https://github.com/pulumi/pulumi-terraform-bridge/commit/${{github.sha}}\n\nDO NOT MERGE.",
"automerge": false,
"pr-title-prefix": "[DOWNSTREAM TEST][BRIDGE]"
}
needs: generate-providers-list
strategy:
# GitHub recommends only issuing 1 API request per second, and never
# concurrently. For more information, see:
# https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits
max-parallel: 1
matrix:
provider: ${{ fromJson(needs.generate-providers-list.outputs.providers ) }}
fail-fast: false