Skip to content
Snippets Groups Projects
Commit 22ce499b authored by Moul's avatar Moul
Browse files

[ci] #66: Remove Pyenv, Use Poetry Docker image

- Defaults image used by jobs is Docker Python v3.5
- For format job, use Python v3.8 image which comes with Black installed
parent 1c3acb7a
No related branches found
No related tags found
No related merge requests found
...@@ -6,9 +6,10 @@ stages: ...@@ -6,9 +6,10 @@ stages:
- publish_doc - publish_doc
variables: variables:
PYENV_PYTHON_VERSION: 3.5.5 DOCKER_IMAGE: "registry.duniter.org/docker/python3/poetry"
PYTHON_VERSION: "3.5"
image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4 image: $DOCKER_IMAGE/$PYTHON_VERSION:latest
# SUB-TASKS # SUB-TASKS
.push_to_github: .push_to_github:
...@@ -30,15 +31,6 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4 ...@@ -30,15 +31,6 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
# github push # github push
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?" - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.pyenv:
tags:
- redshift-docker-python
before_script:
- export PYENV_ROOT="$HOME/.pyenv"
- export PATH="$PYENV_ROOT/bin:$PATH"
- eval "$(pyenv init -)"
- pyenv shell $PYENV_PYTHON_VERSION
.changes: .changes:
only: only:
changes: changes:
...@@ -53,17 +45,15 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4 ...@@ -53,17 +45,15 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
# TASKS # TASKS
format: format:
extends: extends:
- .pyenv
- .changes - .changes
stage: format stage: format
image: $DOCKER_IMAGE/3.8:latest
script: script:
- pyenv shell 3.6.4 # black install and run needs python 3.6.x minimum
- pip install -r requirements_dev.txt - pip install -r requirements_dev.txt
- make check-format - make check-format
test: test:
extends: extends:
- .pyenv
- .changes - .changes
stage: test stage: test
script: script:
...@@ -72,18 +62,15 @@ test: ...@@ -72,18 +62,15 @@ test:
check: check:
extends: extends:
- .pyenv
- .changes - .changes
stage: test stage: test
script: script:
- pyenv shell 3.6.4 # black install needs python 3.6.x minimum
- pip install -r requirements_dev.txt - pip install -r requirements_dev.txt
- make mypy - make mypy
- make pylint - make pylint
build: build:
extends: extends:
- .pyenv
- .changes - .changes
stage: build stage: build
script: script:
...@@ -92,7 +79,6 @@ build: ...@@ -92,7 +79,6 @@ build:
release: release:
extends: extends:
- .pyenv
- .push_to_github - .push_to_github
stage: release stage: release
when: manual when: manual
...@@ -105,7 +91,6 @@ release: ...@@ -105,7 +91,6 @@ release:
- master - master
release_test: release_test:
extends: .pyenv
stage: release stage: release
when: manual when: manual
script: script:
...@@ -114,14 +99,12 @@ release_test: ...@@ -114,14 +99,12 @@ release_test:
- make deploy_test PYPI_TEST_LOGIN=${PYPI_TEST_LOGIN} PYPI_TEST_PASSWORD=${PYPI_TEST_PASSWORD} - make deploy_test PYPI_TEST_LOGIN=${PYPI_TEST_LOGIN} PYPI_TEST_PASSWORD=${PYPI_TEST_PASSWORD}
pages: pages:
extends: .pyenv
stage: publish_doc stage: publish_doc
when: manual when: manual
only: only:
- tags - tags
- master - master
script: script:
- pyenv shell 3.6.4 # black install needs python 3.6.x minimum
- pip install -r requirements_dev.txt - pip install -r requirements_dev.txt
- make docs - make docs
- mv docs/_build/html public - mv docs/_build/html public
......
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