diff --git a/.harness/publish_python_sdk.yaml b/.harness/publish_python_sdk.yaml index dbf82743..a5631a16 100644 --- a/.harness/publish_python_sdk.yaml +++ b/.harness/publish_python_sdk.yaml @@ -243,10 +243,13 @@ pipeline: spec: connectorRef: account.harbor image: harbor.devops.indico.io/dockerhub-proxy/alpine/git - shell: Bash + shell: Sh command: |- TARGET_BRANCH="<+codebase.branch>" - COMMIT_MESSAGE="<+codebase.commitMessage>" + COMMIT_MESSAGE=$(cat <<'EOF' + <+codebase.commitMessage> + EOF + ) MODIFIED_COMMIT_MESSAGE=$(echo "${COMMIT_MESSAGE}" | head -n 1) COMMITTER="<+codebase.gitUser>" @@ -269,15 +272,16 @@ pipeline: shell: Sh command: |- #!/bin/bash - TAG="<+trigger.tag>" + TAG="<+codebase.tag>" + apt-get update && apt-get install -y git git fetch origin tag $TAG rm -rf /indico-client/dist pip3 install twine==3.3.0 python3 setup.py sdist - echo "checking dist files at '.dist/*'" - twine check .dist/* + echo "checking dist files at 'dist/*'" + twine check dist/* echo "uploading pre-release ${TAG}" - twine upload -u __token__ -p <+stage.variables.pypi_token> .dist/* + twine upload -u __token__ -p <+stage.variables.pypi_token> dist/* when: stageStatus: Success condition: <+pipeline.variables.RUN_PRERELEASE> == "TRUE" @@ -287,19 +291,20 @@ pipeline: identifier: publish_release spec: connectorRef: account.harbor - image: harbor.devops.indico.io/indico/<+pipeline.variables.service>:<+pipeline.stages.build_info.spec.execution.steps.build_info.output.outputVariables.TEST_IMAGE_TAG> + image: harbor.devops.indico.io/indico/<+pipeline.variables.service>:<+pipeline.stages.build_info.spec.execution.steps.build_info.output.outputVariables.IMAGE_TAG> shell: Sh command: |- #!/bin/bash - TAG="<+trigger.tag>" + TAG="<+codebase.tag>" + apt-get update && apt-get install -y git git fetch origin tag $TAG rm -rf /indico-client/dist pip3 install twine==3.3.0 python3 setup.py sdist - echo "checking dist files at '.dist/*'" - twine check .dist/* + echo "checking dist files at 'dist/*'" + twine check dist/* echo "uploading release ${TAG}" - twine upload -u __token__ -p <+stage.variables.pypi_token> .dist/* + twine upload -u __token__ -p <+stage.variables.pypi_token> dist/* when: stageStatus: Success condition: <+pipeline.variables.RUN_RELEASE> == "TRUE"