Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terraform Openstack
Manage
Activity
Members
Labels
Plan
Issues
10
Issue boards
Milestones
Wiki
Code
Merge requests
6
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
rc
Terraform Openstack
Merge requests
!13
Add environemnt specific variables
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add environemnt specific variables
feat-env-specific-vars
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Ravi Tripathi
requested to merge
feat-env-specific-vars
into
master
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ed0d1487
1 commit,
1 year ago
1 file
+
26
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
26
−
0
Options
@@ -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"
-
|
Loading