Skip to content
Snippets Groups Projects
Commit 2c180625 authored by Bo-Chun Chen's avatar Bo-Chun Chen Committed by Ravi Tripathi
Browse files

Add TARGET_ENV for different environments

parent 7bf68c38
No related branches found
No related tags found
1 merge request!12Add TARGET_ENV for different environments
......@@ -22,6 +22,12 @@ variables:
AWS_DEFAULT_REGION: "bhm"
AWS_HOST: "s3.lts.rc.uab.edu"
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
variables:
TARGET_ENV: 'dev'
- if: $CI_PIPELINE_SOURCE == 'schedule'
stages: # List of stages for jobs, and their order of execution
- build
......@@ -29,6 +35,8 @@ stages: # List of stages for jobs, and their order of execution
build_packer:
stage: build
environment:
name: $TARGET_ENV
tags: [build]
script:
- cd CRI_XCBC && git checkout dev && git pull && cd ..
......@@ -43,7 +51,7 @@ build_packer:
- 'sed -i -E "s/(enable_user_reg: ).*/\1false/" CRI_XCBC/group_vars/all'
- echo $PKR_VAR_s3_endpoint
- packer validate xdmod
- packer build -machine-readable xdmod
- packer build -machine-readable xdmod
clean_up: # This job removes older built images
stage: clean # It only starts when the job in the build stage completes successfully.
......
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