From a6214e09c28990c4aa50bfdfa5c8c09e09c53c12 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 6 Feb 2020 12:20:10 -0500 Subject: [PATCH] Fix issue with wheel automation from first attempt We recently pushed out the 0.4.0 release which was our first attempt of using the wheel automation in production. There were a few issues identified by the process, first several jobs forgot to add twine to the install. This was not caught because we never tested the actual wheel upload during the dry runs. Then for the sdist job we needed to update the version of pip used in the job to actually be able to install some of aer's build dependencies. The last oversight was that we never added the additional trigger for tags to trigger the wheel jobs on azure pipelines. This meant at release time the jobs never got triggered or ran. This commit fixes all these issues so for the next release the process should all work correctly. --- .travis.yml | 5 +++-- azure-pipelines.yml | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index be99b5bf4c..ad81142a96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -269,7 +269,7 @@ jobs: - CIBW_TEST_REQUIRES="git+https://github.com/Qiskit/qiskit-terra.git" if: tag IS present script: - - pip install -U pip virtualenv + - pip install -U pip virtualenv twine - pip install cibuildwheel==1.1.0 - cibuildwheel --output-dir wheelhouse - twine upload wheelhouse/* @@ -280,7 +280,8 @@ jobs: env: - TWINE_USERNAME=qiskit python: 3.7 - before_script: true + before_script: + - pip install -U pip setuptools virtualenv twine install: true script: - python setup.py sdist diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ae7c8ba6c4..e2be086c12 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,13 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/python trigger: -- master -- stable + branches: + include: + - master + - stable/* + tags: + include: + - '*' stages: - stage: 'Wheel_Builds' @@ -55,6 +60,7 @@ stages: inputs: {pathtoPublish: 'wheelhouse'} condition: succeededOrFailed() - bash: | + pip install -U twine twine upload wheelhouse/* env: TWINE_PASSWORD: $(TWINE_PASSWORD)