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
be15e7b4
Commit
be15e7b4
authored
Aug 29, 2018
by
Rémi Cailletaud
Browse files
[skip ci] readme
parent
effe66f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci-15-bluegreen.yml
0 → 100644
View file @
be15e7b4
.job_template
:
&deploy_job
stage
:
deploy
when
:
manual
image
:
docker
before_script
:
-
cd python-dice
script
:
-
docker pull ciformation/dice-server:latest
-
if [ "$(docker ps -q -f name=dice-$CI_JOB_NAME)" ]; then docker stop dice-$CI_JOB_NAME; fi;
-
docker run --name dice-$CI_JOB_NAME -d --rm -p $PORT:8081 ciformation/dice-server:latest
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
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
:
-
pip install twine
-
pip wheel . -w wheelhouse
-
twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/*
build
:
stage
:
build
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
blue
:
<<
:
*deploy_job
variables
:
DOCKER_HOST
:
"
osug-docker-ci.u-ga.fr:2376"
PORT
:
8090
green
:
<<
:
*deploy_job
variables
:
DOCKER_HOST
:
"
osug-docker-ci.u-ga.fr:2376"
PORT
:
8091
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