Last active
March 3, 2022 13:39
-
-
Save mersanuzun/865c4de6ef8ec7e219e3960735fc2a6f to your computer and use it in GitHub Desktop.
script-keeper.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
SCRIPT_KEEPER_API_URL: https://stage-script-keeper.your-domain.com | |
Script Keeper: | |
stage: Deploy STAGE | |
extends: .register_script_keeper_stage | |
variables: | |
APP_NAME: $CI_PROJECT_NAME # gitlab predefined variable | |
MANIFEST_PATH: dist/manifest.json # manifest.json path | |
image: docker:19.03.5 | |
services: | |
- docker:19.03.5-dind | |
when: manual | |
allow_failure: false | |
script: | |
- apk update | |
- apk add bash && apk add jq && apk add --no-cache curl # install jq for parsing manifest.json | |
- curl -s https://gitlab.your-domain.com/script-keeper/base/pipeline/-/raw/master/common/script-keeper-upload.sh > script-keeper-upload.sh // base script for uploading scripts | |
- chmod +x ./script-keeper-upload.sh # make it runnable | |
- bash ./script-keeper-upload.sh ${APP_NAME} ${SCRIPT_KEEPER_API_URL} ${MANIFEST_PATH} # run it with parameters | |
dependencies: | |
- Build Staging # Dependent stage where build and uploading cdn is finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment