Commit 5883cb9f authored by Elisabetta Giani's avatar Elisabetta Giani
Browse files

TestPipeline: some changes to set variables.

parent d757a159
Loading
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -130,14 +130,16 @@ linting:csp-lmc-common:

.publish_python_dev_common:
  extends: .publish_python_common
  variables:
    TWINE_USERNAME: gitlab-ci-token
    TWINE_PASSWORD: $CI_JOB_TOKEN
    PACKAGE: $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
  except: [master]
  script:
    - cd $BUILD_PATH
    - cat $TESTPIPRC  > /tmp/.pypirc
    - echo $CSP_TOKEN
    - echo $CI_API_V4_URL
    - python3 setup.py sdist bdist_wheel    
    - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*
    - echo $PACKAGE
    - twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi  --verbose $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)

.publish_python_release_common:
  extends: .publish_python_common