Skip to content
Snippets Groups Projects
Commit 2f7a72fea481 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:rocket: use twine image for building and sending image

parent 274ddc1d4495
No related branches found
No related tags found
1 merge request!172🚀 Use CI template for the packaging
......@@ -72,6 +72,6 @@
create_package:
stage: build
image: python:latest
image: quay.orus.io/xcg/twine
needs: []
script:
......@@ -76,8 +76,7 @@
needs: []
script:
- pip install build
- python3 -m build
- pyproject-build
artifacts:
paths:
- dist
expire_in: 1h
......@@ -80,12 +79,7 @@
artifacts:
paths:
- dist
expire_in: 1h
cache:
paths:
- .cache
variables:
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
import_jsonrpc_odoo11_test-focal:
stage: test
......@@ -234,9 +228,9 @@
publish_package:
stage: deploy
image: python:latest
image: quay.orus.io/xcg/twine
needs:
- job: create_package
artifacts: true
variables:
GIT_STRATEGY: none
......@@ -238,7 +232,6 @@
needs:
- job: create_package
artifacts: true
variables:
GIT_STRATEGY: none
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
script:
......@@ -244,12 +237,8 @@
script:
- python3 -m venv .cache/venv
- source .cache/venv/bin/activate
- pip install twine
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine
upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi
dist/*
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token twine upload
--repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
rules:
- if: $CI_COMMIT_BRANCH =~ /^topic\/.*/ || $CI_COMMIT_BRANCH =~ /^branch\/.*/
when: manual
allow_failure: true
- if: $CI_COMMIT_TAG
......@@ -251,11 +240,8 @@
rules:
- if: $CI_COMMIT_BRANCH =~ /^topic\/.*/ || $CI_COMMIT_BRANCH =~ /^branch\/.*/
when: manual
allow_failure: true
- if: $CI_COMMIT_TAG
cache:
paths:
- .cache
release_job:
stage: deploy
......
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