63 lines
No EOL
1.5 KiB
YAML
63 lines
No EOL
1.5 KiB
YAML
stages:
|
|
- test
|
|
- build
|
|
- memopoly.com
|
|
- my.makepostsell.com
|
|
|
|
test:
|
|
stage: test
|
|
tags: ["build"]
|
|
script: make test
|
|
artifacts:
|
|
paths:
|
|
- env.vanilla
|
|
expire_in: 1 hour
|
|
|
|
build:
|
|
stage: build
|
|
tags: ["build"]
|
|
script:
|
|
- mv env.vanilla env
|
|
- make prod
|
|
# copy static assets to env/static & create a tarball of the static files.
|
|
- cp -pr make_post_sell/static env/static
|
|
- cp -pr env/static static
|
|
- tar -zcf static.tar.gz static
|
|
# move the virtualenv with virtualenv-clone into desired location.
|
|
- virtualenv-clone env /opt/make_post_sell/env
|
|
# make tarball of virtualenv.
|
|
- tar -zcf env.tar.gz -C /opt/make_post_sell .
|
|
# create sha512 of env.tar.gz
|
|
- sha512sum env.tar.gz >> env.tar.gz.hash
|
|
# create commit-hash.txt to track this build's git commit hash.
|
|
- echo $CI_COMMIT_SHA >> commit-hash.txt
|
|
# clean up directory outside of gitlab-runner filesystem.
|
|
- rm -rf /opt/make_post_sell/env
|
|
artifacts:
|
|
paths:
|
|
- env.tar.gz
|
|
- env.tar.gz.hash
|
|
- static.tar.gz
|
|
- commit-hash.txt
|
|
#expire_in: 1 month
|
|
|
|
memopoly.com:
|
|
stage: memopoly.com
|
|
tags: ["memopoly.com"]
|
|
script:
|
|
# publish build to Salt Master
|
|
- sudo /opt/salt-call-state-highstate.sh
|
|
rules:
|
|
- if: '$CI_COMMIT_BRANCH == "develop"'
|
|
|
|
|
|
my.makepostsell.com:
|
|
stage: my.makepostsell.com
|
|
tags: ["my.makepostsell.com"]
|
|
script:
|
|
# publish build to Salt Master
|
|
- sudo /opt/salt-call-state-highstate.sh
|
|
rules:
|
|
- if: '$CI_COMMIT_BRANCH == "master"'
|
|
|
|
# bump |