Skip to content
Snippets Groups Projects
Commit 5247dfd3 authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

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 #8465 failed
# 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 image: gitlab.rc.uab.edu:4567/rc/packer-openstack-hpc-image:latest
variables: variables:
ANSIBLE_REMOTE_TMP: "/tmp" ANSIBLE_REMOTE_TMP: "/tmp"
OS_REGION_NAME: "bhm1" OS_REGION_NAME: bhm1
OS_INTERFACE: "public" OS_INTERFACE: public
OS_IDENTITY_API_VERSION: "3" OS_IDENTITY_API_VERSION: '3'
OS_AUTH_TYPE: "v3applicationcredential" OS_AUTH_TYPE: v3applicationcredential
OS_AUTH_URL: "https://keystone.cloud.rc.uab.edu:5000/v3" OS_AUTH_URL: https://keystone.cloud.rc.uab.edu:5000/v3
TF_ROOT: ${CI_PROJECT_DIR}/ TF_ROOT: "${CI_PROJECT_DIR}/"
TF_VAR_internal_network: "xdmod-packer-clusternet" TF_VAR_internal_network: xdmod-packer-clusternet
TF_VAR_external_network: "xdmod-packer-dmznet" TF_VAR_external_network: xdmod-packer-dmznet
TF_VAR_flavor: "m1.medium" TF_VAR_flavor: m1.medium
GIT_SUBMODULE_STRATEGY: "recursive" GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_UPDATE_FLAGS: "--force" GIT_SUBMODULE_UPDATE_FLAGS: "--force"
cache: cache:
paths: paths:
- .terraform - ".terraform"
- .terraform.lock.hcl - ".terraform.lock.hcl"
- terraform.tfstate - terraform.tfstate
stages:
stages: # List of stages for jobs, and their order of execution - validate
- validate - build
- build - deploy
- deploy - cleanup
- cleanup
tf-validate: tf-validate:
stage: validate stage: validate
tags: [build] tags:
- build
script: script:
- cd CRI_XCBC && git checkout dev && cd .. - cd CRI_XCBC && git checkout dev && cd ..
- terraform --version - terraform --version
- terraform init - terraform init
- terraform validate - terraform validate
- pwd - pwd
- terraform plan - terraform plan
- 'sed -i -E "s/(cod_deploy: ).*/\1false/" CRI_XCBC/group_vars/all' - 'sed -i -E "s/(cod_deploy: ).*/\1false/" CRI_XCBC/group_vars/all'
tf-apply: tf-apply:
cache: cache:
paths: paths:
- .terraform/ - ".terraform/"
stage: build stage: build
tags: [build] tags:
- build
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)
- | - "if [ -z $TF_VAR_image_ohpc ];\nthen\nXDMOD_IMAGES=($(openstack image list --sort-column
if [ -z $TF_VAR_image_ohpc ]; Name --sort-descending -f value -c Name -c ID | grep -P ' xdmod-\\d{14}$' | awk
then '{print $2}'))\nexport TF_VAR_image_ohpc=\"${XDMOD_IMAGES[0]}\"\necho $TF_VAR_image_ohpc\nelse\necho
XDMOD_IMAGES=($(openstack image list --sort-column Name --sort-descending -f value -c Name -c ID | grep -P ' xdmod-\d{14}$' | awk '{print $2}')) \"image_ohpc defined as ${TF_VAR_image_ohpc}\"\nfi \n"
export TF_VAR_image_ohpc="${XDMOD_IMAGES[0]}" - export TF_VAR_keypair_name="os-gen-keypair-$BUILD_DATE"
echo $TF_VAR_image_ohpc - terraform apply -auto-approve || terraform destroy -auto-approve
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
clean-up: clean-up:
stage: cleanup stage: cleanup
tags: [build] tags:
- build
script: script:
- terraform destroy -auto-approve - terraform destroy -auto-approve
when: manual when: manual
include:
- template: Security/Secret-Detection.gitlab-ci.yml
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