Skip to content
Snippets Groups Projects
Commit afa009e5 authored by sandcha's avatar sandcha
Browse files

Corrige le 'pip: not found' en définissant un before_script propre à l'image 'release-cli'

parent f21d5087
No related branches found
No related tags found
No related merge requests found
Pipeline #15831 failed
......@@ -75,16 +75,18 @@ release-and-tag:
stage: deploy
# use release-cli to get release name from variable
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
# rules:
# - if ! .gitlab/ci/has-functional-changes.sh ; then exit 0 ; fi
# - if: $CI_COMMIT_TAG
# when: never # do not run this job when a tag is created manually
#
# run this job when commits are pushed or merged to the default 'main' branch
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
# get version with shell only (pip and poetry are not installed in 'release-cli' image)
before_script:
# override default before_script made for 'python' image and get version with shell only
# (pip and poetry are not installed in 'release-cli' image)
- export TAG_NAME=`grep -oE 'version\s*=\s*"([^"]*)"' pyproject.toml | sed 's/version = "//' | tr -d '"'`
script:
- echo "Creating $TAG_NAME release (and tag)..." # creates the tag when it doesn't exist
- release-cli create --name "$TAG_NAME" --description "$CI_JOB_STARTED_AT release" --tag-name "$TAG_NAME" --ref "$CI_COMMIT_SHA" --assets-link "{\"url\":\"https://$CI_REGISTRY_IMAGE/$TAG_NAME\",\"name\":\"Container Image \"}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment