GitLab
Last updated
Was this helpful?
Was this helpful?
Install CloudTruth CLI:
stage: build
script:
- curl -sL https://github.com/cloudtruth/cloudtruth-cli/releases/latest/download/install.sh | sh
- cloudtruth -V # Adds CloudTruth Values to build.env file to be passed with artifacts.reports.dotenv
- echo "FLASK_RUN_PORT=$(cloudtruth --project MyFirstProject --env default parameters get FLASK_RUN_PORT)" >> build.env
- echo "FLASK_MESSAGE=$(cloudtruth --project MyFirstProject --env default parameters get FLASK_MESSAGE)" >> build.env
# Passes environment variables between stages
artifacts:
reports:
dotenv: build.envUsing CloudTruth Variables:
stage: test
script:
- echo $FLASK_RUN_PORT
- echo $FLASK_MESSAGE
dependencies:
- "Install CloudTruth CLI"Install CloudTruth CLI:
stage: build
script:
- curl -sL https://github.com/cloudtruth/cloudtruth-cli/releases/latest/download/install.sh | sh
- cloudtruth -V
# Adds CloudTruth Values to build.env file to be passed with artifacts.reports.dotenv
- echo "FLASK_RUN_PORT=$(cloudtruth --project MyFirstProject --env default parameters get FLASK_RUN_PORT)" >> build.env
- echo "FLASK_MESSAGE=$(cloudtruth --project MyFirstProject --env default parameters get FLASK_MESSAGE)" >> build.env
# Passes environment variables between stages
artifacts:
reports:
dotenv: build.env
Using CloudTruth Variables:
stage: test
script:
- echo $FLASK_RUN_PORT
- echo $FLASK_MESSAGE
dependencies:
- "Install CloudTruth CLI"Install CloudTruth CLI:
stage: build
script:
- curl -sL https://github.com/cloudtruth/cloudtruth-cli/releases/latest/download/install.sh | sh
- cloudtruth -V
# Adds CloudTruth Values to build.env file to be passed with artifacts.reports.dotenv
- cloudtruth --project MyFirstProject parameter export docker >> build.env
- sed -i '/^$/d' build.env
# Passes environment variables between stages
artifacts:
reports:
dotenv: build.env
Using CloudTruth Variables:
stage: test
script:
- printenv
dependencies:
- "Install CloudTruth CLI"