-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (73 loc) · 3.02 KB
/
verify-registry-release.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Launched manually to test new relesse from registry
on:
workflow_dispatch:
inputs:
release_version:
description: 'The version of the release in the Terraform registry (expecting semver format)'
required: true
default: '0.1.0-rc.1'
public_release:
type: boolean
description: 'Check if this is a public release (from registry.terraform.io). Private release is from app.terraform.io'
required: true
default: false
jobs:
build:
name: Verify registry release
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Check out code
uses: actions/checkout@v4
- name: Setup test broker
run: |
mkdir -p $HOME/solace; chmod 777 $HOME/solace
docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --env system_scaling_maxkafkabridgecount="10" --name=solace \
--mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:"10.6.1.52"
while ! curl -s localhost:8080 | grep aurelia ; do sleep 1 ; done
- name: Set up Terraform latest - public
if: ${{ github.event.inputs.public_release != 'false' }}
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: true
- name: Set up Terraform latest - private, with token
if: ${{ github.event.inputs.public_release == 'false' }}
uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_wrapper: true
- name: Setup token and patch provider for private release
run: |
pushd ci/broker_vpn_q
if [ "${{ github.event.inputs.public_release }}" == "false" ] ; then
echo Internal release
sed -i "[email protected]/[email protected]/SolaceDev@g" testconfig.tf
else
echo Public release
fi
sed -i '/source = "/a \ \ \ \ \ \ version = "${{ github.event.inputs.release_version }}"' testconfig.tf
cat testconfig.tf
popd
- name: Run init
run: |
pushd ci/broker_vpn_q
terraform init
$(find .terraform/ | grep terraform-provider) version | grep ${{ github.event.inputs.release_version }}
popd
- name: Test basic provider
run: |
pushd ci/broker_vpn_q
terraform plan
sleep 1
terraform apply -auto-approve
sleep 1
terraform destroy -auto-approve
popd
- name: Test basic config generator
run: |
pushd ci/broker_vpn_q
SOLACEBROKER_USERNAME=admin SOLACEBROKER_PASSWORD=admin SOLACEBROKER_SKIP_API_CHECK=true $(find .terraform/ | grep terraform-provider) generate --url=http://localhost:8080 solacebroker_msg_vpn.test default messageVpn.tf
popd