Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
continuous-everything
ci
Commits
1581cedf
Commit
1581cedf
authored
Sep 24, 2018
by
Rémi Cailletaud
Browse files
test docker ci
parent
197e360e
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
1581cedf
image
:
python:3
stages
:
-
test
-
doc
-
pypi
-
build
-
deploy
before_script
:
-
cd python-dice
-
python setup.py install
job_test
:
stage
:
test
script
:
-
python setup.py test
-
pip install coverage
-
coverage run -m unittest discover
-
coverage report
job_codestyle
:
stage
:
test
script
:
-
pip install pycodestyle
-
pycodestyle dice.py
allow_failure
:
true
pages
:
stage
:
deploy
only
:
variables
:
-
$CI_COMMIT_MESSAGE =~ /^\[doc\].*/i
script
:
-
pip install sphinx
-
python setup.py build_sphinx
-
mv build/sphinx/html ../public
artifacts
:
paths
:
-
public
pypi
:
stage
:
deploy
only
:
-
/^version-.*$/
script
:
-
version=$(echo $CI_COMMIT_REF_NAME|cut -d "-" -f 2)
-
sed -i -e "s/version='.*',/version='$version',/g" setup.py
-
pip install twine
-
pip wheel . -w wheelhouse
-
twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/*
build
:
stage
:
build
except
:
-
/^version-.*$/
image
:
docker
services
:
-
docker:dind
before_script
:
-
docker info
-
cd python-dice
script
:
-
docker build -t $DOCKER_LOGIN/dice-server .
-
echo $DOCKER_PASSWORD | docker login -u $DOCKER_LOGIN --password-stdin
-
docker push $DOCKER_LOGIN/dice-server
deploy
:
stage
:
deploy
except
:
-
/^version-.*$/
when
:
manual
image
:
docker
variables
:
DOCKER_HOST
:
"
osug-docker-ci.u-ga.fr:2376"
before_script
:
-
docker info
-
cd python-dice
script
:
-
docker pull ciformation/dice-server:latest
-
if [ "$(docker ps -q -f name=dice)" ]; then docker stop dice; fi;
-
docker run --name dice -d --rm -p 8090:8081 ciformation/dice-server:latest
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment