nichijou/.gitlab-ci.yml

80 lines
1.8 KiB
YAML
Raw Normal View History

2019-12-13 19:44:34 -05:00
stages:
- analyse
- test
- deploy
variables:
GIT_SUBMODULE_STRATEGY: normal
line_limit:
stage: analyse
allow_failure: true
2019-12-24 12:31:46 -05:00
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
2019-12-13 19:44:34 -05:00
script:
- mkdir build
- cd build
- cmake -DDOC:STRING=OFF -DLINE_LIMIT:BOOL=ON -DWERROR:BOOL=ON ..
- make line_limit
regex_check:
stage: analyse
allow_failure: true
2019-12-24 12:31:46 -05:00
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
2019-12-13 19:44:34 -05:00
script:
- mkdir build
- cd build
- cmake -DDOC:STRING=OFF -DREGEX_CHECK:BOOL=ON -DWERROR:BOOL=ON ..
- make regex_check
sphinx_html:
stage: test
2019-12-24 12:31:46 -05:00
image: registry.git.mel.vin/vermim/cicd/cicd/sphinx_html:0.3
2019-12-13 19:44:34 -05:00
script:
- mkdir build
- cd build
- cmake -DWERROR:BOOL=ON ..
- make
artifacts:
paths:
- build/doc/html
review:
stage: deploy
variables:
GIT_STRATEGY: none
only:
2019-12-24 12:31:46 -05:00
- master@shione/shione
2019-12-13 19:44:34 -05:00
dependencies:
- sphinx_html
2019-12-24 12:31:46 -05:00
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
2019-12-13 19:44:34 -05:00
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://shione.vermwa.re
2019-12-13 19:44:34 -05:00
on_stop: review_stop
script:
- mkdir -p ~/.ssh
- echo "$DOC_SSH_KNOWNHOSTS" > ~/.ssh/known_hosts
- eval $(ssh-agent)
- echo "$DOC_SSH_KEY" | ssh-add - > /dev/null
- mv build/doc/html public
- rsync -a --delete public/ 'web@shione.vermwa.re:'
2019-12-13 19:44:34 -05:00
review_stop:
stage: deploy
variables:
GIT_STRATEGY: none
when: manual
dependencies: []
2019-12-24 12:31:46 -05:00
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
2019-12-13 19:44:34 -05:00
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
script:
- mkdir -p ~/.ssh
- echo "$DOC_SSH_KNOWNHOSTS" > ~/.ssh/known_hosts
- eval $(ssh-agent)
- echo "$DOC_SSH_KEY" | ssh-add - > /dev/null
- mkdir /tmp/empty
- rsync -a --delete /tmp/empty/ 'web@shione.vermwa.re:'
2019-12-13 19:44:34 -05:00
- rmdir /tmp/empty