Merge branch '1-update-gitlab-cicd-config-to-upload-to-gitlab-pages' into 'master'
Resolve "Update GitLab CICD config to upload to GitLab pages" Closes #1 See merge request renken/shione!1
This commit is contained in:
commit
54c5e21f4d
9 changed files with 51 additions and 152 deletions
|
@ -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
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .venv/
|
||||||
|
|
||||||
|
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
|
||||||
|
- cd build
|
||||||
|
|
||||||
line_limit:
|
line_limit:
|
||||||
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 -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
|
|
||||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
||||||
[submodule "cicd/style"]
|
[submodule "cicd/style"]
|
||||||
path = cicd/style
|
path = cicd/style
|
||||||
url = ../../../template/util/style.git
|
url = https://gitlab.com/vermware/template/util/style.git
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM debian:stretch
|
|
||||||
ADD bootstrap.sh /
|
|
||||||
RUN /bootstrap.sh && rm /bootstrap.sh
|
|
|
@ -1 +0,0 @@
|
||||||
registry.git.mel.vin:443/shione/shione/cicd/coreutils:0.0
|
|
|
@ -1,32 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DEBIAN=stretch
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
printf '%s\n' \
|
|
||||||
"deb http://ftp.debian.org/debian $DEBIAN-backports main" \
|
|
||||||
> /etc/apt/sources.list.d/$DEBIAN-backports.list
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
|
|
||||||
apt-get dist-upgrade -y
|
|
||||||
|
|
||||||
# backported cmake requires backported libuv1
|
|
||||||
apt-get install --no-install-recommends -y \
|
|
||||||
bash \
|
|
||||||
ca-certificates \
|
|
||||||
cmake/$DEBIAN-backports \
|
|
||||||
coreutils \
|
|
||||||
findutils \
|
|
||||||
git \
|
|
||||||
grep \
|
|
||||||
libuv1/$DEBIAN-backports \
|
|
||||||
make \
|
|
||||||
openssh-client \
|
|
||||||
rsync \
|
|
||||||
sed
|
|
||||||
|
|
||||||
apt-get autoremove -y
|
|
||||||
apt-get clean
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM debian:stretch
|
|
||||||
ADD bootstrap.sh /
|
|
||||||
RUN /bootstrap.sh && rm /bootstrap.sh
|
|
|
@ -1 +0,0 @@
|
||||||
registry.git.mel.vin:443/shione/shione/cicd/sphinx_html:0.0
|
|
|
@ -1,64 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DEBIAN=stretch
|
|
||||||
PLANTUML=master
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
printf '%s\n' \
|
|
||||||
"deb http://ftp.debian.org/debian $DEBIAN-backports main" \
|
|
||||||
> /etc/apt/sources.list.d/$DEBIAN-backports.list
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
|
|
||||||
apt-get dist-upgrade -y
|
|
||||||
|
|
||||||
# backported cmake requires backported libuv1
|
|
||||||
apt-get install --no-install-recommends -y \
|
|
||||||
ca-certificates \
|
|
||||||
cmake/$DEBIAN-backports \
|
|
||||||
curl \
|
|
||||||
default-jre-headless \
|
|
||||||
git \
|
|
||||||
graphviz \
|
|
||||||
libuv1/$DEBIAN-backports \
|
|
||||||
make \
|
|
||||||
python3-pip \
|
|
||||||
python3-setuptools \
|
|
||||||
python3-wheel
|
|
||||||
|
|
||||||
# some font metapackages use recommends to install their subpackages
|
|
||||||
apt-get install -y \
|
|
||||||
fonts-dejavu \
|
|
||||||
fonts-liberation \
|
|
||||||
fonts-noto
|
|
||||||
|
|
||||||
ln -s /usr/bin/python3 /usr/local/bin/python
|
|
||||||
ln -s /usr/bin/pip3 /usr/local/bin/pip
|
|
||||||
|
|
||||||
pip install \
|
|
||||||
sphinx \
|
|
||||||
sphinx_rtd_theme \
|
|
||||||
sphinxcontrib-plantuml
|
|
||||||
|
|
||||||
mkdir -p /opt/plantuml
|
|
||||||
for i in batik-all-1.7.jar jlatexmath-minimal-1.0.3.jar jlm_cyrillic.jar \
|
|
||||||
jlm_greek.jar plantuml.jar
|
|
||||||
do
|
|
||||||
curl -Lf \
|
|
||||||
-o /opt/plantuml/$i \
|
|
||||||
https://git.mel.vin/mirror/plantuml/raw/$PLANTUML/$i
|
|
||||||
done
|
|
||||||
|
|
||||||
printf '%s\n%s\n' \
|
|
||||||
'#!/bin/sh' \
|
|
||||||
'exec java -jar /opt/plantuml/plantuml.jar "$@"' \
|
|
||||||
> /usr/local/bin/plantuml
|
|
||||||
chmod +x /usr/local/bin/plantuml
|
|
||||||
|
|
||||||
apt-get purge -y \
|
|
||||||
curl
|
|
||||||
|
|
||||||
apt-get autoremove -y
|
|
||||||
apt-get clean
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 68df132153b7892f80ea09e41f9ce15ebc68f5f8
|
Subproject commit fec71d372cb198cb9e8521b54b2a6b19e5ef2aba
|
Loading…
Reference in a new issue