Skip to content
Snippets Groups Projects
Commit b2e52dc4 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

restructure test+pages in CI

create sphinx docs + coverage in test-centos, and deploy in pages
parent 22b9a33a
No related branches found
No related tags found
1 merge request!13Master
Pipeline #28404 failed
stages:
- test
- deploy
test-style:
image: python:3.6
stage: test
......@@ -9,6 +10,7 @@ test-style:
- cd ippisite
- pip install flake8
- flake8 --config=.flake8
test-ansible:
image: python:3.5
stage: test
......@@ -18,6 +20,7 @@ test-ansible:
- whoami
- ansible-playbook system.yaml --syntax-check
- ansible-playbook deploy.yaml --syntax-check
test-centos7:
services:
- redis
......@@ -57,12 +60,27 @@ test-centos7:
- coverage run --source='.' manage.py test
- coverage report
- coverage html
- 'mkdir -p ../public/$CI_COMMIT_REF_NAME'
- 'mv htmlcov ../public/$CI_COMMIT_REF_NAME/htmlcov'
- pip3.6 install sphinx sphinx-argparse sphinxcontrib.bibtex sphinx_rtd_theme
- cd docs
- make html
- 'mv build/html/ ../../public/$CI_COMMIT_REF_NAME'
artifacts:
paths:
- ippisite/htmlcov
- ippisite/docs/build/html
pages:
stage: deploy
dependencies:
- test-centos7
script:
- 'mkdir -p public/$CI_COMMIT_REF_NAME'
- 'mv ippisite/htmlcov public/$CI_COMMIT_REF_NAME/'
- 'mv ippisite/docs/build/html/ public/$CI_COMMIT_REF_NAME/'
artifacts:
paths:
- ippisite/htmlcov
- ippisite/docs/build/html
expire_in: 30 days
deploy-webserver-targetcentric:
image: python:3.5
......@@ -86,6 +104,7 @@ deploy-webserver-targetcentric:
--extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_targetcentric galaxy_base_url=$GALAXY_BASE_URL_targetcentric galaxy_apikey=$GALAXY_APIKEY_targetcentric galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_targetcentric secret_key=$SECRET_KEY_targetcentric dbname=$DBNAME_targetcentric dbuser=$DBUSER_targetcentric dbpassword=$DBPASSWORD_targetcentric dbhost=$DBHOST_targetcentric dbport=$DBPORT_targetcentric http_port=$HTTP_PORT_targetcentric branch=targetcentric"
only:
- targetcentric
deploy-webserver-test:
image: python:3.5
stage: deploy
......@@ -108,6 +127,7 @@ deploy-webserver-test:
--extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_master galaxy_base_url=$GALAXY_BASE_URL_master galaxy_apikey=$GALAXY_APIKEY_master galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_master secret_key=$SECRET_KEY_master dbname=$DBNAME_master dbuser=$DBUSER_master dbpassword=$DBPASSWORD_master dbhost=$DBHOST_master dbport=$DBPORT_master http_port=$HTTP_PORT_master branch=$CI_COMMIT_REF_NAME gacode=$GACODE_master"
only:
- master
deploy-webserver-production:
image: python:3.5
stage: deploy
......@@ -129,4 +149,4 @@ deploy-webserver-production:
- ansible-playbook -vvv -i ./hosts_release deploy.yaml
--extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvinjs_apikey=$MARVINJS_APIKEY_release galaxy_base_url=$GALAXY_BASE_URL_release galaxy_apikey=$GALAXY_APIKEY_release galaxy_compoundproperties_workflowid=$GALAXY_COMPOUNDPROPERTIES_WORKFLOWID_release secret_key=$SECRET_KEY_release dbname=$DBNAME_release dbuser=$DBUSER_release dbpassword=$DBPASSWORD_release dbhost=$DBHOST_release dbport=$DBPORT_release http_port=$HTTP_PORT_release branch=$CI_COMMIT_REF_NAME gacode=$GACODE_release"
only:
- release
\ No newline at end of file
- release
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