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
Commits
04561cb9
Commit
04561cb9
authored
1 year ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
Configure Secret Detection in `.gitlab-ci.yml`, creating this file if it does not already exist
parent
54099053
No related branches found
No related tags found
No related merge requests found
Pipeline
#8458
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+49
-48
49 additions, 48 deletions
.gitlab-ci.yml
with
49 additions
and
48 deletions
.gitlab-ci.yml
+
49
−
48
View file @
04561cb9
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
image
:
gitlab.rc.uab.edu:4567/rc/packer-openstack-hpc-image:latest
variables
:
ANSIBLE_REMOTE_TMP
:
"
/tmp"
OS_REGION_NAME
:
"
bhm1
"
OS_INTERFACE
:
"
public
"
OS_IDENTITY_API_VERSION
:
"
3"
OS_AUTH_TYPE
:
"
v3applicationcredential
"
OS_AUTH_URL
:
"
https://keystone.cloud.rc.uab.edu:5000/v3
"
TF_ROOT
:
${CI_PROJECT_DIR}/
TF_VAR_internal_network
:
"
xdmod-packer-clusternet
"
TF_VAR_external_network
:
"
xdmod-packer-dmznet
"
TF_VAR_flavor
:
"
m1.medium
"
GIT_SUBMODULE_STRATEGY
:
"
recursive
"
OS_REGION_NAME
:
bhm1
OS_INTERFACE
:
public
OS_IDENTITY_API_VERSION
:
'
3'
OS_AUTH_TYPE
:
v3applicationcredential
OS_AUTH_URL
:
https://keystone.cloud.rc.uab.edu:5000/v3
TF_ROOT
:
"
${CI_PROJECT_DIR}/
"
TF_VAR_internal_network
:
xdmod-packer-clusternet
TF_VAR_external_network
:
xdmod-packer-dmznet
TF_VAR_flavor
:
m1.medium
GIT_SUBMODULE_STRATEGY
:
recursive
GIT_SUBMODULE_UPDATE_FLAGS
:
"
--force"
cache
:
paths
:
-
.terraform
-
.terraform.lock.hcl
-
terraform.tfstate
stages
:
# List of stages for jobs, and their order of execution
-
validate
-
build
-
deploy
-
cleanup
-
"
.terraform"
-
"
.terraform.lock.hcl"
-
terraform.tfstate
stages
:
-
validate
-
build
-
deploy
-
cleanup
tf-validate
:
stage
:
validate
tags
:
[
build
]
tags
:
-
build
script
:
-
cd CRI_XCBC && git checkout dev && cd ..
-
terraform --version
-
terraform init
-
terraform validate
-
pwd
-
terraform plan
-
'
sed
-i
-E
"s/(cod_deploy:
).*/\1false/"
CRI_XCBC/group_vars/all'
-
cd CRI_XCBC && git checkout dev && cd ..
-
terraform --version
-
terraform init
-
terraform validate
-
pwd
-
terraform plan
-
'
sed
-i
-E
"s/(cod_deploy:
).*/\1false/"
CRI_XCBC/group_vars/all'
tf-apply
:
cache
:
paths
:
-
.terraform/
-
"
.terraform/
"
stage
:
build
tags
:
[
build
]
tags
:
-
build
script
:
-
export BUILD_DATE=$(TZ=America/Chicago date +%Y%m%d%H%M%S)
-
|
if [ -z $TF_VAR_image_ohpc ];
then
XDMOD_IMAGES=($(openstack image list --sort-column Name --sort-descending -f value -c Name -c ID | grep -P ' xdmod-\d{14}$' | awk '{print $2}'))
export TF_VAR_image_ohpc="${XDMOD_IMAGES[0]}"
echo $TF_VAR_image_ohpc
else
echo "image_ohpc defined as ${TF_VAR_image_ohpc}"
fi
-
export TF_VAR_keypair_name="os-gen-keypair-$BUILD_DATE"
-
terraform apply -auto-approve || terraform destroy -auto-approve
-
export BUILD_DATE=$(TZ=America/Chicago date +%Y%m%d%H%M%S)
-
"
if
[
-z
$TF_VAR_image_ohpc
];
\n
then
\n
XDMOD_IMAGES=($(openstack
image
list
--sort-column
Name
--sort-descending
-f
value
-c
Name
-c
ID
|
grep
-P
'
xdmod-
\\
d{14}$'
|
awk
'{print
$2}'))
\n
export
TF_VAR_image_ohpc=
\"
${XDMOD_IMAGES[0]}
\"\n
echo
$TF_VAR_image_ohpc
\n
else
\n
echo
\"
image_ohpc
defined
as
${TF_VAR_image_ohpc}
\"\n
fi
\n
"
-
export TF_VAR_keypair_name="os-gen-keypair-$BUILD_DATE"
-
terraform apply -auto-approve || terraform destroy -auto-approve
clean-up
:
stage
:
cleanup
tags
:
[
build
]
tags
:
-
build
script
:
-
terraform destroy -auto-approve
-
terraform destroy -auto-approve
when
:
manual
include
:
-
template
:
Security/Secret-Detection.gitlab-ci.yml
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