Skip to content
Snippets Groups Projects
Commit bcd5e372 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Adding TARGET_ENV as environments for different jobs

parent 1866bb74
No related merge requests found
...@@ -28,6 +28,8 @@ stages: # List of stages for jobs, and their order of execution ...@@ -28,6 +28,8 @@ stages: # List of stages for jobs, and their order of execution
prep-deploy: prep-deploy:
stage: .pre stage: .pre
tags: [build] tags: [build]
environment:
name: $TARGET_ENV
script: script:
- export BUILD_DATE=$(TZ=America/Chicago date +%Y-%m-%d-%H-%M-%S) - export BUILD_DATE=$(TZ=America/Chicago date +%Y-%m-%d-%H-%M-%S)
- | - |
...@@ -55,6 +57,8 @@ prep-deploy: ...@@ -55,6 +57,8 @@ prep-deploy:
tf-validate: tf-validate:
stage: validate stage: validate
tags: [build] tags: [build]
environment:
name: $TARGET_ENV
script: script:
- cd CRI_XCBC && git checkout dev && cd .. - cd CRI_XCBC && git checkout dev && cd ..
- terraform --version - terraform --version
...@@ -70,6 +74,8 @@ tf-apply: ...@@ -70,6 +74,8 @@ tf-apply:
- .terraform/ - .terraform/
stage: build stage: build
tags: [build] tags: [build]
environment:
name: $TARGET_ENV
script: script:
- echo "TF_VAR_data_volume=${TF_VAR_data_volume}" - echo "TF_VAR_data_volume=${TF_VAR_data_volume}"
- echo "TF_VAR_flavor=${TF_VAR_flavor}" - echo "TF_VAR_flavor=${TF_VAR_flavor}"
...@@ -132,6 +138,8 @@ staging-post-deploy: ...@@ -132,6 +138,8 @@ staging-post-deploy:
clean-up: clean-up:
stage: cleanup stage: cleanup
tags: [build] tags: [build]
environment:
name: $TARGET_ENV
script: script:
- terraform destroy -auto-approve - terraform destroy -auto-approve
when: manual when: manual
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment