Skip to content

Commit

Permalink
Added option for testing to use provider from private registry
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma committed Jul 9, 2024
1 parent b84be74 commit b969054
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/module-test-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Terraform latest
uses: hashicorp/setup-terraform@v2
- name: Set up Terraform latest - with token
uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
terraform_wrapper: true

- name: Setup test broker
run: |
Expand All @@ -20,6 +23,15 @@ jobs:
--env system_scaling_maxconnectioncount="1000" --mount type=bind,source=$HOME/solace,destination=/var/lib/solace,ro=false solace/solace-pubsub-standard:latest
while ! curl -s localhost:8080 | grep aurelia ; do sleep 1 ; done
# - name: Setup if private provider is required
# run: |
# export PRIVATE_PROVIDER_VERSION="1.0.0-rc.3"
# if [ -n "$PRIVATE_PROVIDER_VERSION" ]; then
# echo "Using private provider version $PRIVATE_PROVIDER_VERSION"
# grep -rl 'source = "' . | xargs sed -i 's@source = ".*$@source = "app.terraform.io/SolaceDev/solacebrokerappliance"@g'
# grep -rl 'version = "' . | xargs sed -i "s@ version = \".*\$@ version = \"${PRIVATE_PROVIDER_VERSION}\"@g"
# fi

- name: Test module from template on test broker
run: |
ci/scripts/test-module.sh ci/template-test
Expand All @@ -31,8 +43,12 @@ jobs:
- name: Test examples
run: |
shopt -s extglob
for d in examples/!(adding-headers)/; do (ci/scripts/test-module.sh "$d"); done
ci/scripts/test-module.sh examples/adding-headers/ -var-file=secret.tfvars
for d in examples/!(basic-client-username)/; do (ci/scripts/test-module.sh "$d"); done
# ci/scripts/test-module.sh examples/basic-client-username/ -var-file=secret.tfvars
- name: Discard any changes in checked out code
run: |
git checkout -- .
- name: Set up Go
uses: actions/setup-go@v3
Expand Down

0 comments on commit b969054

Please sign in to comment.