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
80a3d585
Commit
80a3d585
authored
1 year ago
by
Ravi Tripathi
Browse files
Options
Downloads
Patches
Plain Diff
Create a volume out of a snapshot for dev and staging envs
parent
886c4f05
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
+5
-2
5 additions, 2 deletions
.gitlab-ci.yml
with
5 additions
and
2 deletions
.gitlab-ci.yml
+
5
−
2
View file @
80a3d585
...
...
@@ -30,13 +30,16 @@ prep-deploy:
stage
:
.pre
tags
:
[
build
]
script
:
-
export BUILD_DATE=$(TZ=America/Chicago date +%Y-%m-%d-%H-%M-%S)
-
|
if [ "$TARGET_ENV" = "dev" ]; then
TF_VAR_data_volume="xdmod-dev-volume"
TF_VAR_data_volume="xdmod-dev-volume
-$BUILD_DATE
"
TF_VAR_flavor="m1.medium"
openstack volume create --snapshot xdmod-dev-snapshot --size 20 $TF_VAR_data_volume
elif [ "$TARGET_ENV" = "staging" ]; then
TF_VAR_data_volume="xdmod-staging-volume"
TF_VAR_data_volume="xdmod-staging-volume
-$BUILD_DATE
"
TF_VAR_flavor="m1.medium"
openstack volume create --snapshot xdmod-dev-snapshot --size 150 $TF_VAR_data_volume
elif [ "$TARGET_ENV" = "production" ]; then
TF_VAR_data_volume="xdmod-staging-volume"
TF_VAR_flavor="m1.xlarge"
...
...
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