Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
2f7a72fea481
Commit
2f7a72fea481
authored
2 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
use twine image for building and sending image
parent
274ddc1d4495
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!172
🚀 Use CI template for the packaging
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+5
-19
5 additions, 19 deletions
.gitlab-ci.yml
with
5 additions
and
19 deletions
.gitlab-ci.yml
+
5
−
19
View file @
2f7a72fe
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment