gitlab-ci: use debian image

This commit is contained in:
Renken 2022-04-02 15:24:17 +02:00
parent 32951ede36
commit 70fb84846b
Signed by untrusted user who does not match committer: renken
GPG key ID: 1F2BB159B645E575

View file

@ -1,3 +1,5 @@
image: debian
stages: stages:
- analyse - analyse
- test - test
@ -6,74 +8,75 @@ stages:
variables: variables:
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
line_limit: cache:
stage: analyse paths:
allow_failure: true - .venv/
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
script: before_script:
- apt-get update
- apt-get dist-upgrade -y
- >
apt-get install --no-install-recommends -y
bash
build-essential
cmake
coreutils
findutils
git
grep
make
plantuml
python3
python3-pip
python3-venv
rsync
sed
# Convenient hack until this is fixed.
- ln -s /usr/bin/python3 /usr/bin/python
.setup_build: &setup_build
- python -m venv .venv
- . ./.venv/bin/activate
- python -m pip install -r requirements.txt
- mkdir build - mkdir build
- cd build - cd build
line_limit:
stage: analyse
needs: []
allow_failure: true
script:
- *setup_build
- cmake -DDOC:STRING=OFF -DLINE_LIMIT:BOOL=ON -DWERROR:BOOL=ON .. - cmake -DDOC:STRING=OFF -DLINE_LIMIT:BOOL=ON -DWERROR:BOOL=ON ..
- make line_limit - make line_limit
regex_check: regex_check:
stage: analyse stage: analyse
needs: []
allow_failure: true allow_failure: true
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
script: script:
- mkdir build - *setup_build
- cd build
- cmake -DDOC:STRING=OFF -DREGEX_CHECK:BOOL=ON -DWERROR:BOOL=ON .. - cmake -DDOC:STRING=OFF -DREGEX_CHECK:BOOL=ON -DWERROR:BOOL=ON ..
- make regex_check - make regex_check
sphinx_html: sphinx_html:
stage: test stage: test
image: registry.git.mel.vin/vermim/cicd/cicd/sphinx_html:0.3 needs: []
script: script:
- mkdir build - *setup_build
- cd build - cmake -DDOC:STRING=html ..
- cmake -DWERROR:BOOL=ON ..
- make - make
artifacts: artifacts:
paths: paths:
- build/doc/html - build/doc/html
review: pages:
stage: deploy stage: deploy
variables: rules:
GIT_STRATEGY: none - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
only: needs: ["sphinx_html"]
- master@shione/shione
dependencies:
- sphinx_html
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://shione.vermwa.re
on_stop: review_stop
script: 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 - mv build/doc/html public
- rsync -a --delete public/ 'web@shione.vermwa.re:' artifacts:
paths:
review_stop: - public
stage: deploy
variables:
GIT_STRATEGY: none
when: manual
dependencies: []
image: registry.git.mel.vin/vermim/cicd/cicd/coreutils:0.1
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:'
- rmdir /tmp/empty