From c1652dffa9e8c47dc0994202715ce8a53c96b82f Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 27 May 2019 15:15:20 -0400 Subject: [PATCH 1/7] Add separate templates for building package and vendor scripts Signed-off-by: Dan Ryan --- .azure-pipelines/steps/build-package.yml | 29 +++++++++++++++++++ .azure-pipelines/steps/run-vendor-scripts.yml | 28 ++++++++++++++++++ azure-pipelines.yml | 5 +++- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .azure-pipelines/steps/build-package.yml create mode 100644 .azure-pipelines/steps/run-vendor-scripts.yml diff --git a/.azure-pipelines/steps/build-package.yml b/.azure-pipelines/steps/build-package.yml new file mode 100644 index 0000000000..6088f28bd9 --- /dev/null +++ b/.azure-pipelines/steps/build-package.yml @@ -0,0 +1,29 @@ +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: $(python.version) + architecture: '$(python.architecture)' + addToPath: true + displayName: Use Python $(python.version) + +- template: install-dependencies.yml + +- script: | + echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]$(PYTHON_VERSION)' + env: + PYTHON_VERSION: $(python.version) + +- template: create-virtualenv.yml + +- script: | + python -m pip install --upgrade wheel pip setuptools twine readme_renderer[md] + python setup.py sdist bdist_wheel + twine check dist/* + displayName: Build and check package + env: + PY_EXE: $(PY_EXE) + GIT_SSL_CAINFO: $(GIT_SSL_CAINFO) + LANG: $(LANG) + PIPENV_DEFAULT_PYTHON_VERSION: $(PIPENV_DEFAULT_PYTHON_VERSION) + PYTHONWARNINGS: ignore:DEPRECATION + PIPENV_NOSPIN: '1' diff --git a/.azure-pipelines/steps/run-vendor-scripts.yml b/.azure-pipelines/steps/run-vendor-scripts.yml new file mode 100644 index 0000000000..b776690fea --- /dev/null +++ b/.azure-pipelines/steps/run-vendor-scripts.yml @@ -0,0 +1,28 @@ +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: $(python.version) + architecture: '$(python.architecture)' + addToPath: true + displayName: Use Python $(python.version) + +- template: install-dependencies.yml + +- script: | + echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]$(PYTHON_VERSION)' + env: + PYTHON_VERSION: $(python.version) + +- template: create-virtualenv.yml + +- script: | + python -m pip install --upgrade invoke requests parver bs4 vistir towncrier pip setuptools wheel --upgrade-strategy=eager + python -m invoke vendoring.update + displayName: Run Vendor Scripts + env: + PY_EXE: $(PY_EXE) + GIT_SSL_CAINFO: $(GIT_SSL_CAINFO) + LANG: $(LANG) + PIPENV_DEFAULT_PYTHON_VERSION: $(PIPENV_DEFAULT_PYTHON_VERSION) + PYTHONWARNINGS: ignore:DEPRECATION + PIPENV_NOSPIN: '1' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 28c23a9fe3..5260208bc6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,7 +35,10 @@ jobs: - template: .azure-pipelines/steps/run-tests.yml parameters: vmImage: 'Ubuntu-16.04' - - template: .azure-pipelines/jobs/run-vendor-scripts.yml + - template: .azure-pipelines/steps/run-vendor-scripts.yml + parameters: + vmImage: 'Ubuntu-16.04' +- template: .azure-pipelines/steps/build-package.yml parameters: vmImage: 'Ubuntu-16.04' From a13e744a5340eabfd862e2ef2aba1398adeca797 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 27 May 2019 15:16:40 -0400 Subject: [PATCH 2/7] azure syntax Signed-off-by: Dan Ryan --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5260208bc6..388ae34148 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,7 +38,7 @@ jobs: - template: .azure-pipelines/steps/run-vendor-scripts.yml parameters: vmImage: 'Ubuntu-16.04' -- template: .azure-pipelines/steps/build-package.yml + - template: .azure-pipelines/steps/build-package.yml parameters: vmImage: 'Ubuntu-16.04' From 6353c61120ef0af2e5de92f2b7e1810c2232fb4b Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 27 May 2019 15:19:28 -0400 Subject: [PATCH 3/7] Use loose specifiers for azure pipeline Signed-off-by: Dan Ryan --- azure-pipelines.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 388ae34148..b55aa6c4d5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,11 +25,12 @@ jobs: strategy: matrix: Python27: - python.version: '2.7' + python.version: '>= 2.7' Python36: - python.version: '3.6' + python.version: '>= 3.6' Python37: - python.version: '3.7' + python.version: '>= 3.7' + python.architecture: x64 maxParallel: 4 steps: - template: .azure-pipelines/steps/run-tests.yml @@ -48,13 +49,13 @@ jobs: strategy: matrix: Python27: - python.version: '2.7' + python.version: '>= 2.7' python.architecture: x64 Python36: - python.version: '3.6' + python.version: '>= 3.6' python.architecture: x64 Python37: - python.version: '3.7' + python.version: '>= 3.7' python.architecture: x64 maxParallel: 4 steps: @@ -68,11 +69,11 @@ jobs: strategy: matrix: Python27: - python.version: '2.7' + python.version: '>= 2.7' Python36: - python.version: '3.6' + python.version: '>= 3.6' Python37: - python.version: '3.7' + python.version: '>= 3.7' maxParallel: 4 steps: - template: .azure-pipelines/steps/run-tests.yml From 91fe366b11d35a533eec8114ade48546083d8fc4 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 27 May 2019 15:30:50 -0400 Subject: [PATCH 4/7] Use exact python versions Signed-off-by: Dan Ryan --- azure-pipelines.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b55aa6c4d5..225d336982 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,12 +25,11 @@ jobs: strategy: matrix: Python27: - python.version: '>= 2.7' + python.version: '2.7.15' Python36: - python.version: '>= 3.6' + python.version: '3.6.8' Python37: - python.version: '>= 3.7' - python.architecture: x64 + python.version: '3.7.2' maxParallel: 4 steps: - template: .azure-pipelines/steps/run-tests.yml @@ -49,13 +48,13 @@ jobs: strategy: matrix: Python27: - python.version: '>= 2.7' + python.version: '2.7' python.architecture: x64 Python36: - python.version: '>= 3.6' + python.version: '3.6' python.architecture: x64 Python37: - python.version: '>= 3.7' + python.version: '3.7' python.architecture: x64 maxParallel: 4 steps: @@ -69,11 +68,11 @@ jobs: strategy: matrix: Python27: - python.version: '>= 2.7' + python.version: '2.7.15' Python36: - python.version: '>= 3.6' + python.version: '3.6.8' Python37: - python.version: '>= 3.7' + python.version: '3.7.2' maxParallel: 4 steps: - template: .azure-pipelines/steps/run-tests.yml From 633302b2456e2000d34c105e654f1e4f6635565c Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 27 May 2019 15:33:06 -0400 Subject: [PATCH 5/7] And keep the architecture spec i guess Signed-off-by: Dan Ryan --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 225d336982..b55570df23 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,10 +26,13 @@ jobs: matrix: Python27: python.version: '2.7.15' + python.architecture: x64 Python36: python.version: '3.6.8' + python.architecture: x64 Python37: python.version: '3.7.2' + python.architecture: x64 maxParallel: 4 steps: - template: .azure-pipelines/steps/run-tests.yml @@ -69,10 +72,13 @@ jobs: matrix: Python27: python.version: '2.7.15' + python.architecture: x64 Python36: python.version: '3.6.8' + python.architecture: x64 Python37: python.version: '3.7.2' + python.architecture: x64 maxParallel: 4 steps: - template: .azure-pipelines/steps/run-tests.yml From f0d49054d088cd22aed434b3ee444dfe158538d2 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 27 May 2019 15:35:54 -0400 Subject: [PATCH 6/7] plz microsoft get it together Signed-off-by: Dan Ryan --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b55570df23..ce4657c5e3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -71,13 +71,13 @@ jobs: strategy: matrix: Python27: - python.version: '2.7.15' + python.version: '2.7.16' python.architecture: x64 Python36: python.version: '3.6.8' python.architecture: x64 Python37: - python.version: '3.7.2' + python.version: '3.7.3' python.architecture: x64 maxParallel: 4 steps: From c37543bcb76cfb9839068b653d67dbb204539ec3 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 27 May 2019 15:38:30 -0400 Subject: [PATCH 7/7] Don't build new environments for package and vendoring' Signed-off-by: Dan Ryan --- .azure-pipelines/steps/build-package.yml | 17 ----------------- .azure-pipelines/steps/run-vendor-scripts.yml | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/.azure-pipelines/steps/build-package.yml b/.azure-pipelines/steps/build-package.yml index 6088f28bd9..15ddee56f0 100644 --- a/.azure-pipelines/steps/build-package.yml +++ b/.azure-pipelines/steps/build-package.yml @@ -1,20 +1,3 @@ -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: $(python.version) - architecture: '$(python.architecture)' - addToPath: true - displayName: Use Python $(python.version) - -- template: install-dependencies.yml - -- script: | - echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]$(PYTHON_VERSION)' - env: - PYTHON_VERSION: $(python.version) - -- template: create-virtualenv.yml - - script: | python -m pip install --upgrade wheel pip setuptools twine readme_renderer[md] python setup.py sdist bdist_wheel diff --git a/.azure-pipelines/steps/run-vendor-scripts.yml b/.azure-pipelines/steps/run-vendor-scripts.yml index b776690fea..f7a293a97d 100644 --- a/.azure-pipelines/steps/run-vendor-scripts.yml +++ b/.azure-pipelines/steps/run-vendor-scripts.yml @@ -1,20 +1,3 @@ -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: $(python.version) - architecture: '$(python.architecture)' - addToPath: true - displayName: Use Python $(python.version) - -- template: install-dependencies.yml - -- script: | - echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]$(PYTHON_VERSION)' - env: - PYTHON_VERSION: $(python.version) - -- template: create-virtualenv.yml - - script: | python -m pip install --upgrade invoke requests parver bs4 vistir towncrier pip setuptools wheel --upgrade-strategy=eager python -m invoke vendoring.update