Skip to content
Snippets Groups Projects
Commit 8a378f08 authored by Mateusz Żebrak's avatar Mateusz Żebrak Committed by Bartek Wrona
Browse files

Extract the common part - deploy_wheel_base

parent 7bacd502
No related branches found
No related tags found
1 merge request!22Create additional job template deploying to the official PyPI
...@@ -101,7 +101,7 @@ variables: ...@@ -101,7 +101,7 @@ variables:
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| DEPLOY |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| DEPLOY |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
.deploy_wheel_template: .deploy_wheel_base:
extends: .configuration_template extends: .configuration_template
when: manual when: manual
variables: variables:
...@@ -110,13 +110,6 @@ variables: ...@@ -110,13 +110,6 @@ variables:
before_script: before_script:
- !reference [.configuration_template, before_script] - !reference [.configuration_template, before_script]
- rm build_wheel.env # to keep the git status clean - rm build_wheel.env # to keep the git status clean
script:
- echo -e "${TXT_BLUE}Deploying python wheel...${TXT_CLEAR}"
- ls -al
- poetry version
- poetry config repositories.gitlab "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi"
- poetry config http-basic.gitlab gitlab-ci-token "${CI_JOB_TOKEN}"
- poetry publish --repository gitlab
after_script: after_script:
# Job extending this template will depend on the build_wheel job, so we can use the same variable and pass it further # Job extending this template will depend on the build_wheel job, so we can use the same variable and pass it further
# so jobs depending on deploy_wheel won't have to include build_wheel also just to get the version # so jobs depending on deploy_wheel won't have to include build_wheel also just to get the version
...@@ -129,4 +122,14 @@ variables: ...@@ -129,4 +122,14 @@ variables:
reports: reports:
dotenv: deploy_wheel.env dotenv: deploy_wheel.env
.deploy_wheel_to_gitlab_template:
extends: .deploy_wheel_base
script:
- echo -e "${TXT_BLUE}Deploying python wheel to the GitLab PyPI registry...${TXT_CLEAR}"
- ls -al
- poetry version
- poetry config repositories.gitlab "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi"
- poetry config http-basic.gitlab gitlab-ci-token "${CI_JOB_TOKEN}"
- poetry publish --repository gitlab
# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| DEPLOY |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| 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