Skip to content
Snippets Groups Projects
Commit 37b7b7da authored by Francois Dall'Asta's avatar Francois Dall'Asta :speech_balloon:
Browse files

[docker-build] update .gitlab-ci.yml and Dockerfile

parent 2dfc96ad
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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
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