Skip to content

Commit

Permalink
fix: fix catalog validation scripts (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashiq-J authored Mar 29, 2024
1 parent 74d2966 commit 40a3a41
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .catalog-onboard-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ offerings:
mark_ready: true
install_type: extension
pre_validation: "tests/scripts/pre-validation-deploy-cos-cross-region.sh"
post_validation: "tests/scripts/post-validation-destroy-cos-instance.sh"
post_validation: "tests/scripts/post-validation-deploy-cos-cross-region.sh"
scc:
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
region: us-south
- name: secure-regional-bucket
mark_ready: true
install_type: extension
pre_validation: "tests/scripts/pre-validation-deploy-cos-regional.sh"
post_validation: "tests/scripts/post-validation-destroy-cos-instance.sh"
post_validation: "tests/scripts/post-validation-deploy-cos-regional.sh"
scc:
instance_id: 1c7d5f78-9262-44c3-b779-b28fe4d88c37
region: us-south
19 changes: 19 additions & 0 deletions tests/scripts/post-validation-deploy-cos-cross-region.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /bin/bash

########################################################################################################################
## This script is used by the catalog pipeline to destroy the COS Instance, which was provisioned as a ##
## prerequisite for the cross-region and regional bucket solutions that is published to the catalog ##
########################################################################################################################

set -e

TERRAFORM_SOURCE_DIR="solutions/instance"
TF_VARS_FILE="terraform-cross-regional.tfvars"

(
cd ${TERRAFORM_SOURCE_DIR}
echo "Destroying prerequisite COS Instance .."
terraform destroy -input=false -auto-approve -var-file=${TF_VARS_FILE} || exit 1

echo "Post-validation complete successfully"
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -e

TERRAFORM_SOURCE_DIR="solutions/instance"
TF_VARS_FILE="terraform.tfvars"
TF_VARS_FILE="terraform-regional.tfvars"

(
cd ${TERRAFORM_SOURCE_DIR}
Expand Down

0 comments on commit 40a3a41

Please sign in to comment.