diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43c94ba5857e48e902d5f33c1aabab691226ccba..b68a547db5dda594d5817a09435544cbfd93955d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,18 +23,19 @@ docker-build: - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile - --destination $CI_REGISTRY_IMAGE/env-ubuntu:22.04 + --destination $CI_REGISTRY_IMAGE/webgeodyn-ubuntu:22.04 rules: - if: $CI_COMMIT_MESSAGE =~ /\[docker-build]/ when: always test_with_coverage: image: - name: $CI_REGISTRY_IMAGE/env-ubuntu:22.04 + name: $CI_REGISTRY_IMAGE/webgeodyn-ubuntu:22.04 + variables: + GIT_STRATEGY: clone stage: run script: - pip3 install . - - pip3 install coverage - coverage run --source $(pwd) --omit="webgeodyn/tests/*" setup.py test - coverage report - coverage html @@ -45,25 +46,26 @@ test_with_coverage: coverage: "/TOTAL.+ ([0-9]{1,3}%)/" rules: - if: $CI_COMMIT_REF_NAME == "master" - when: always + when: on_success generate_rst: image: - name: $CI_REGISTRY_IMAGE/env-ubuntu:22.04 + name: $CI_REGISTRY_IMAGE/webgeodyn-ubuntu:22.04 + variables: + GIT_STRATEGY: clone stage: run script: - - pip3 install sphinx - cd doc/ && ./make_all_doc.sh && cd .. artifacts: paths: - doc/html rules: - if: $CI_COMMIT_REF_NAME == "master" - when: always + when: on_success pages: image: - name: $CI_REGISTRY_IMAGE/env-ubuntu:22.04 + name: $CI_REGISTRY_IMAGE/webgeodyn-ubuntu:22.04 stage: deploy variables: GIT_STRATEGY: none @@ -81,18 +83,19 @@ pages: - generate_rst rules: - if: $CI_COMMIT_REF_NAME == "master" - when: always + when: on_success pypi_upload: image: - name: $CI_REGISTRY_IMAGE/env-ubuntu:22.04 + name: $CI_REGISTRY_IMAGE/webgeodyn-ubuntu:22.04 + variables: + GIT_STRATEGY: clone stage: release script: - - pip3 install twine - python3 setup.py sdist bdist_wheel - python3 -m twine check dist/* - python3 -m twine upload dist/* - only: - variables: - - $CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/ + rules: + - if: $CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/ + when: on_success diff --git a/Dockerfile b/Dockerfile index 676e8080357c92241336d8ec14853d8642aa2ad3..f595b2fbc6e221fb0e645022957726dbebf43d00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,3 +4,6 @@ RUN apt-get update && apt-get install -y -qq \ python3 \ python3-pip RUN apt-get autoclean -y && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* +RUN pip3 install coverage +RUN pip3 install sphinx +RUN pip3 install twine \ No newline at end of file