@docupace/pipeline 1.0.24-alpha-3 → 1.0.24-alpha-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.24-alpha-3",
3
+ "version": "1.0.24-alpha-4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/terraform/init.sh CHANGED
@@ -33,4 +33,28 @@ echo "$atlassian_workspace_runner_ssh_key" | base64 -d > ~/.ssh/id_ed25519
33
33
  chmod 600 ~/.ssh/id_ed25519
34
34
  ssh-keyscan bitbucket.org > ~/.ssh/known_hosts
35
35
 
36
- terraform init -backend-config=./env/${CURRENT_ENVIRONMENT}/us-west-2/backend.tfvars --reconfigure
36
+ info () {
37
+ echo "PROJECT => $PROJECT"
38
+ echo "CURRENT_ENVIRONMENT => $CURRENT_ENVIRONMENT"
39
+ echo "SITE_NAME => $SITE_NAME"
40
+ }
41
+
42
+ if [[ "$PROJECT" == "s3" ]]; then
43
+ info
44
+ terraform init \
45
+ -input=false \
46
+ -reconfigure \
47
+ -backend=true \
48
+ -backend-config=./env/${CURRENT_ENVIRONMENT}/us-west-2/backend.tfvars \
49
+ -backend-config="key=us-west-2/${PROJECT}/${SITE_NAME}/${CURRENT_ENVIRONMENT}/terraform.tfstate"
50
+ elif [[ "$PROJECT" == "idp" ]]; then
51
+ info
52
+ terraform init \
53
+ -input=false \
54
+ -reconfigure \
55
+ -backend=true \
56
+ -backend-config=./env/${CURRENT_ENVIRONMENT}/us-west-2/backend.tfvars \
57
+ -backend-config="key=us-west-2/${PROJECT}/${SITE_NAME}/${CURRENT_ENVIRONMENT}/terraform.tfstate"
58
+ else
59
+ terraform init -backend-config=./env/${CURRENT_ENVIRONMENT}/us-west-2/backend.tfvars --reconfigure
60
+ fi
package/terraform/plan.sh CHANGED
@@ -39,6 +39,20 @@ if [[ "$PROJECT" == "bb-build-agent-shell" ]]; then
39
39
  terraform plan -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/terraform.tfvars" \
40
40
  -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/build_agent_configuration.tfvars.json" \
41
41
  -out .tfplan
42
+ elif [[ "$PROJECT" == "s3" ]];then
43
+ terraform plan -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/terraform.tfvars" \
44
+ -var="site=${SITE_NAME}" \
45
+ -var="env=${CURRENT_ENVIRONMENT}" \
46
+ -out .tfplan
47
+ elif [[ "$PROJECT" == "idp" ]];then
48
+ terraform plan -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/terraform.tfvars" \
49
+ -var="site=${SITE_NAME}" \
50
+ -var="env=${CURRENT_ENVIRONMENT}" \
51
+ -out .tfplan
42
52
  else
43
53
  terraform plan -var-file="./env/${CURRENT_ENVIRONMENT}/us-west-2/terraform.tfvars" -out .tfplan
44
54
  fi
55
+
56
+
57
+
58
+