File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ inputs:
30
30
required : false
31
31
default : " false"
32
32
description : " If true it runs a provider upgrade test"
33
+ upgrade_from :
34
+ required : false
35
+ default : " "
36
+ description : " What version of the terraform provider to try upgrading from. Defaults to latest release."
33
37
skip_build :
34
38
required : false
35
39
default : " false"
@@ -113,8 +117,14 @@ runs:
113
117
if : ${{ inputs.upgrade_test == 'true' && steps.defined.outputs.defined == 'true' }}
114
118
name : Upgrade test - Retrieve latest stable version
115
119
run : |
116
- LATEST="$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/ClickHouse/terraform-provider-clickhouse/releases/latest | jq -r '.name')"
117
- echo "tag=$LATEST" >> "$GITHUB_OUTPUT"
120
+ if [ "${{ inputs.upgrade_from }}" == "" ]
121
+ then
122
+ # Get latest stable release
123
+ LATEST="$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/ClickHouse/terraform-provider-clickhouse/releases/latest | jq -r '.name')"
124
+ echo "tag=$LATEST" >> "$GITHUB_OUTPUT"
125
+ else
126
+ echo "tag=${{ inputs.upgrade_from }}" >> "$GITHUB_OUTPUT"
127
+ fi
118
128
119
129
- shell : bash
120
130
if : ${{ inputs.upgrade_test == 'true' && steps.defined.outputs.defined == 'true' }}
Original file line number Diff line number Diff line change 44
44
type : boolean
45
45
default : false
46
46
description : " If checked, additionally create service using latest stable version, then upgrade to the current version"
47
+ upgrade_from :
48
+ type : string
49
+ default : " "
50
+ description : " What version to test upgrade from"
47
51
schedule :
48
52
- cron : " 0 7 * * *"
49
53
@@ -215,6 +219,7 @@ jobs:
215
219
tf_release : ${{ matrix.tf_release }}
216
220
cloud_provider : ${{ matrix.test.cloud }}
217
221
upgrade_test : " true"
222
+ upgrade_from : ${{ inputs.upgrade_from }}
218
223
skip_build : " false"
219
224
region : ${{ steps.credentials.outputs.region }}
220
225
aws_role_arn : ${{ secrets.AWS_ASSUME_ROLE_ARN }}
You can’t perform that action at this time.
0 commit comments