Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terraform Openstack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krish Moodbidri
Terraform Openstack
Commits
906c7012
Commit
906c7012
authored
1 year ago
by
Ravi Tripathi
Browse files
Options
Downloads
Patches
Plain Diff
Add environemnt specific variables
parent
da0ef77d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+26
-0
26 additions, 0 deletions
.gitlab-ci.yml
with
26 additions
and
0 deletions
.gitlab-ci.yml
+
26
−
0
View file @
906c7012
...
...
@@ -26,6 +26,30 @@ stages: # List of stages for jobs, and their order of execution
-
deploy
-
cleanup
prep-deploy
:
stage
:
.pre
tags
:
[
build
]
script
:
-
|
if [ "$TARGET_ENV" = "dev" ]; then
TF_VAR_data_volume="xdmod-dev-volume"
TF_VAR_flavor="m1.medium"
elif [ "$TARGET_ENV" = "staging" ]; then
TF_VAR_data_volume="xdmod-staging-volume"
TF_VAR_flavor="m1.medium"
elif [ "$TARGET_ENV" = "production" ]; then
TF_VAR_data_volume="xdmod-staging-volume"
TF_VAR_flavor="m1.xlarge"
else
echo "Unknown TARGET_ENV: $TARGET_ENV"
exit 1
fi
echo "TF_VAR_data_volume=${TF_VAR_data_volume}" | tee -a $CI_PROJECT_DIR/vars.env
echo "TF_VAR_flavor=${TF_VAR_flavor}" | tee -a $CI_PROJECT_DIR/vars.env
artifacts
:
reports
:
dotenv
:
vars.env
tf-validate
:
stage
:
validate
tags
:
[
build
]
...
...
@@ -45,6 +69,8 @@ tf-apply:
stage
:
build
tags
:
[
build
]
script
:
-
echo "TF_VAR_data_volume=${TF_VAR_data_volume}"
-
echo "TF_VAR_flavor=${TF_VAR_flavor}"
-
export BUILD_DATE=$(TZ=America/Chicago date +%Y%m%d%H%M%S)
-
export TF_VAR_internal_network="xdmod-packer-clusternet-$BUILD_DATE"
-
|
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment