Skip to content

Commit f1faff4

Browse files
Merge pull request #13 from bitops-plugins/skip-patch
Adding skip-deploy bitops configuration option
2 parents 2ed93ab + e5ba2f8 commit f1faff4

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ Run BitOps with the environmental variable `TERRAFORM_APPLY` set to `true` or se
8686
* **Required:** `false`
8787
* **Description:** Controls what terraform command to run. e.g. `apply`, `destroy`, etc.
8888

89+
### skip-deploy
90+
* **BitOps Property:** `skip-deploy`
91+
* **Environment Variable:** `TERRAFORM_SKIP_DEPLOY`
92+
* **default:** `none`
93+
* **Required:** `false`
94+
* **Description:** If set to true, regardless of the stack-action, deployment actions will be skipped.
95+
8996

9097
-------------------
9198
<!-- ### version
@@ -110,9 +117,6 @@ Run BitOps with the environmental variable `TERRAFORM_APPLY` set to `true` or se
110117
## Additional Environment Variable Configuration
111118
Although not captured in `bitops.config.yml`, the following environment variables can be set to further customize behaviour. Set the value of the environental variable to `true` to use
112119

113-
-------------------
114-
### SKIP_DEPLOY_TERRAFORM
115-
Will skill all terraform executions. This superseeds all other configuration
116120

117121
-------------------
118122
### TERRAFORM_APPLY

bitops.schema.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ terraform:
2424
export_env: TERRAFORM_COMMAND
2525
required: True
2626
default: plan
27+
skip-deploy:
28+
type: boolean
29+
parameter: skip-deploy
30+
export_env: TERRAFORM_SKIP_DEPLOY
2731
# version:
2832
# type: string
2933
# export_env: TERRAFORM_VERSION
@@ -35,4 +39,4 @@ terraform:
3539
# type: boolean
3640
# export_env: TERRAFORM_INIT_UPGRADE
3741
# default: false
38-
42+

deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export TERRAFORM_ROOT_OPERATIONS="$BITOPS_OPSREPO_ENVIRONMENT_DIR"
1010
export BITOPS_SCHEMA_ENV_FILE="$TERRAFORM_ROOT_OPERATIONS/ENV_FILE"
1111
export SCRIPTS_DIR="$TERRAFORM_ROOT_SCRIPTS/scripts"
1212

13-
if [ "$SKIP_DEPLOY_TERRAFORM" == "true" ]; then
14-
echo "SKIP_DEPLOY_TERRAFORM is set. Skipping."
13+
if [ "$TERRAFORM_SKIP_DEPLOY" == "true" ]; then
14+
echo "TERRAFORM_SKIP_DEPLOY is set. Skipping."
1515
exit 0
1616
fi
1717

0 commit comments

Comments
 (0)