Skip to content
Snippets Groups Projects
Commit 1f6da51f authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'add-coverage-reporting' into 'master'

Add coverage reporting on coverage.technicie.nl

See merge request !1193
parents d522fc6b d14b9baf
No related branches found
No related tags found
1 merge request!1193Add coverage reporting on coverage.technicie.nl
......@@ -55,6 +55,56 @@ python36-django21:
python37-django21:
<<: *djangotest
image: $PY37_IMAGE
after_script:
- cd website
- coverage html --directory=covhtml --title="${CI_COMMIT_REF_SLUG} Coverage Report"
artifacts:
paths:
- website/covhtml/
.sshsetup: &sshsetup
before_script:
- mkdir -p ~/.ssh
- echo "$IVO_KNOWN_HOST" > ~/.ssh/known_hosts
- echo "$COVERAGE_DEPLOY_SSH_KEY" > ~/.ssh/id_coverage
- chmod 0600 ~/.ssh/id_coverage
- apt-get update
- apt-get install -y openssh-client
coverage deploy:
stage: deploy
image: debian:stretch
dependencies:
- python37-django21
environment:
name: review/${CI_COMMIT_REF_NAME}
url: https://coverage.technicie.nl/${CI_COMMIT_REF_SLUG}/
on_stop: coverage remove
<<: *sshsetup
script:
- |
sftp -i ~/.ssh/id_coverage coveragewww@ivo.thalia.nu -b <<EOF
-rm ${CI_COMMIT_REF_SLUG}/*
-rmdir ${CI_COMMIT_REF_SLUG}
put -r website/covhtml ${CI_COMMIT_REF_SLUG}
EOF
coverage remove:
stage: deploy
when: manual
image: debian:stretch
environment:
name: review/${CI_COMMIT_REF_NAME}
action: stop
variables:
GIT_STRATEGY: none
<<: *sshsetup
script:
- |
sftp -i ~/.ssh/id_coverage coveragewww@ivo.thalia.nu -b <<EOF
rm ${CI_COMMIT_REF_SLUG}/*
rmdir ${CI_COMMIT_REF_SLUG}
EOF
docs:
stage: test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment