Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OrcaSong
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Machine Learning
OrcaSong
Commits
6bb07db8
Commit
6bb07db8
authored
4 years ago
by
Stefan Reck
Browse files
Options
Downloads
Patches
Plain Diff
put other stages back in
parent
cb1b558d
No related branches found
No related tags found
1 merge request
!16
Singularity artifacts
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+99
-4
99 additions, 4 deletions
.gitlab-ci.yml
with
99 additions
and
4 deletions
.gitlab-ci.yml
+
99
−
4
View file @
6bb07db8
...
...
@@ -9,7 +9,12 @@ variables:
stages
:
-
build-singularity
-
test
-
coverage
-
doc
-
docker
-
release
-
singularity
cache
:
...
...
@@ -19,12 +24,102 @@ cache:
key
:
"
$CI_COMMIT_REF_SLUG"
build-singularity
:
.virtualenv_template
:
&virtualenv_definition
|
python -V
pip install -U pip setuptools wheel virtualenv
virtualenv venv
source venv/bin/activate
make install-dev
test
:
image
:
docker.km3net.de/base/python:3.6
stage
:
test
script
:
-
*virtualenv_definition
-
pip list
-
make test
coverage
:
image
:
docker.km3net.de/base/python:3.6
stage
:
coverage
script
:
-
*virtualenv_definition
-
"
make
test-cov|grep
TOTAL|
awk
'{printf
\"
COVERAGE:
%.2f%%
\"
,
(1-$3/$2)*100
}'"
coverage
:
'
/COVERAGE:\s*([0-9]*\.[0-9]*%)/'
artifacts
:
paths
:
-
reports/coverage
pages
:
image
:
docker.km3net.de/base/python:3.6
stage
:
doc
script
:
-
*virtualenv_definition
-
cd docs && make html
-
mv _build/html/ ../public/
-
cd .. && mv reports/coverage public/coverage
artifacts
:
paths
:
-
public
cache
:
{}
only
:
-
tags
-
master
docker
:
image
:
docker:stable
services
:
-
docker:dind
stage
:
docker
script
:
-
docker build --pull -t $CONTAINER_TEST_IMAGE .
-
docker push $CONTAINER_TEST_IMAGE
tags
:
-
docker
only
:
-
tags
pypi
:
image
:
docker.km3net.de/base/python:3.6
stage
:
release
cache
:
{}
script
:
-
pip install -U twine
-
python setup.py sdist
-
twine upload dist/*
only
:
-
tags
release-image
:
image
:
docker:stable
services
:
-
docker:dind
stage
:
release
script
:
-
docker pull $CONTAINER_TEST_IMAGE
-
docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
-
docker tag $CONTAINER_TEST_IMAGE $CONTAINER_LATEST_IMAGE
-
docker push $CONTAINER_RELEASE_IMAGE
-
docker push $CONTAINER_LATEST_IMAGE
tags
:
-
docker
only
:
-
tags
singularity
:
image
:
docker.km3net.de/base/singularity:3.1
stage
:
build-
singularity
stage
:
singularity
script
:
-
singularity --version
-
singularity build $SINGULARITY_IMAGE Singularity
-
apt-get update -qy
-
apt-get install -qy lftp
-
lftp -d -u $KM3NET_SFTP_USER,$KM3NET_SFTP_PASSWORD sftp://$KM3NET_SFTP_HOST -e "set sftp:auto-confirm yes; set ssl:verify-certificate no; cd singularity/; put $SINGULARITY_IMAGE; bye"
-
lftp -u $KM3NET_SFTP_USER,$KM3NET_SFTP_PASSWORD sftp://$KM3NET_SFTP_HOST -e "set sftp:auto-confirm yes; set ssl:verify-certificate no; cd singularity/; put $SINGULARITY_IMAGE; bye"
tags
:
-
docker
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment