Skip to content

Instantly share code, notes, and snippets.

@mersanuzun
Last active March 3, 2022 13:39
Show Gist options
  • Save mersanuzun/865c4de6ef8ec7e219e3960735fc2a6f to your computer and use it in GitHub Desktop.
Save mersanuzun/865c4de6ef8ec7e219e3960735fc2a6f to your computer and use it in GitHub Desktop.
script-keeper.yml
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