Skip to content

Commit

Permalink
ci: put deploy job after publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed Oct 16, 2024
1 parent 59dd579 commit b77cb57
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ jobs:
paths:
- .

publish:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
steps:
- attach_workspace:
at: .
- deploy:
name: Publish on PyPI
command: |
poetry publish --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction
deploy:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
Expand All @@ -134,17 +145,6 @@ jobs:
--data '{ "ref": "main", "variables": [{"key": "SITE", "value": "dev.data.gouv.fr" }, {"key": "APP", "value": "hydra"}, {"key": "TAGS", "value": "light" }, {"key": "PACKAGE_VERSION", "value": "$PACKAGE_VERSION" }] }' \
https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_ID}/pipeline
publish:
docker:
- image: cimg/python:<< pipeline.parameters.python-version >>
steps:
- attach_workspace:
at: .
- deploy:
name: Publish on PyPI
command: |
poetry publish --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction
workflows:
version: 2
build:
Expand Down Expand Up @@ -172,25 +172,25 @@ workflows:
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
- deploy:
- publish:
requires:
- build
filters:
branches:
only:
- main
- << pipeline.parameters.publish-branch >>
- /[0-9]+(\.[0-9]+)+/
- /rc[0-9]+/
tags:
only: /v[0-9]+(\.[0-9]+)*/
context: org-global
- publish:
- deploy:
requires:
- build
- publish
filters:
branches:
only:
- << pipeline.parameters.publish-branch >>
- /[0-9]+(\.[0-9]+)+/
- /rc[0-9]+/
- main
tags:
only: /v[0-9]+(\.[0-9]+)*/
context: org-global

0 comments on commit b77cb57

Please sign in to comment.