From 96469f775d69c7adf476c2a00b98ce81eff56c3b Mon Sep 17 00:00:00 2001 From: AleaJactaEst Date: Tue, 13 Feb 2018 20:30:21 +0100 Subject: [PATCH] replace build by package and move test before package --- .gitlab-ci.yml | 134 ++++++++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0c5d6f..8ce6b06 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,63 +21,10 @@ stages: -- build - test +- package - deploy -## Build -linux_source_package: - stage: build - tags: - - Docker - image: amd64/debian:9 - script: - # Prepare environment - - apt-get update - - apt-get -y upgrade - - apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel - # Action - - make sdist - artifacts: - name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-src" - paths: - - dist - -linux_package: - stage: build - tags: - - Docker - image: amd64/debian:9 - script: - # Prepare environment - - apt-get update - - apt-get -y upgrade - - apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel - # Action - - make bdist - artifacts: - name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package" - paths: - - dist - -linux_package_wheel: - stage: build - tags: - - Docker - image: amd64/debian:9 - script: - # Prepare environment - - apt-get update - - apt-get -y upgrade - - apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel - # Action - - python3 setup.py bdist_wheel --universal - artifacts: - name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-whl" - paths: - - dist - expire_in: 1 week - ## Test linux_test: stage: test @@ -105,20 +52,73 @@ linux_coverage: # Action - make coverage -# codequality doesn't work -#codequality: -# image: docker:latest -# variables: -# DOCKER_DRIVER: overlay -# services: -# - docker:dind -# script: -# - docker pull codeclimate/codeclimate -# - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate:0.69.0 init -# - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate:0.69.0 analyze -f json > codeclimate.json || true -# artifacts: -# paths: [codeclimate.json] +## Documentation +linux_htmldoc: + stage: test + tags: + - Docker + image: amd64/debian:9 + script: + # Prepare environment + - apt-get update + - apt-get -y upgrade + - apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel + # Action + - make htmldoc +## Package +linux_source_package: + stage: package + tags: + - Docker + image: amd64/debian:9 + script: + # Prepare environment + - apt-get update + - apt-get -y upgrade + - apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel + # Action + - make sdist + artifacts: + name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-src" + paths: + - dist + +linux_package: + stage: package + tags: + - Docker + image: amd64/debian:9 + script: + # Prepare environment + - apt-get update + - apt-get -y upgrade + - apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel + # Action + - make bdist + artifacts: + name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package" + paths: + - dist + +linux_package_wheel: + stage: package + tags: + - Docker + image: amd64/debian:9 + script: + # Prepare environment + - apt-get update + - apt-get -y upgrade + - apt-get install -y python3 python3-setuptools python3-virtualenv python3-stdeb python3-all python3-coverage python3-pep8 python3-sphinx python3-pip graphviz python3-bcrypt python3-wheel + # Action + - python3 setup.py bdist_wheel --universal + artifacts: + name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-pymanager-package-whl" + paths: + - dist + expire_in: 1 week + ## Deploy