Commit ae6f5ba5 authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

TestPipeline: pass user and pwd directly to twine (to upload the package)

parent e842931b
Loading
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -128,12 +128,9 @@ publish:csp-lmc-common_dev:
    - build:csp-lmc-common_pkg_dev
  variables:
    BUILD_PATH: csp-lmc-common
  variables:
    TWINE_USERNAME: gitlab-ci-token
    TWINE_PASSWORD: $CI_JOB_TOKEN
  script:
    - cd $COMMON_BUILD_PATH
    - python3 -m twine upload --skip-existing --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
    - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --skip-existing --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)

# upload the package to the Nexus Repository only on project tagging.
publish:csp-lmc-common: