From 9665d2fd9f8b3417b68caee0178ffdeb8fb101dd Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 17:36:58 +0000 Subject: [PATCH 01/40] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..1ee861801 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,36 @@ +# Python package +# Create and test a Python package on multiple Python versions. +# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/python + +trigger: +- main + +pool: + vmImage: 'ubuntu-latest' +strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' From 23e3b95082b033f11dda186bc474c154e07e01a6 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 18:18:00 +0000 Subject: [PATCH 02/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1ee861801..73ed3665d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,6 +8,12 @@ trigger: pool: vmImage: 'ubuntu-latest' + +#global variables: +variables: + artifactName: ReleaseArtifact + releaseTemplate: 'templates/azure-pipelines.release.yml' + strategy: matrix: Python27: From b1a4701588bd956d1874c310d764401b240d8a37 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 18:29:03 +0000 Subject: [PATCH 03/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 73ed3665d..01515e5b3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,7 +15,8 @@ variables: releaseTemplate: 'templates/azure-pipelines.release.yml' strategy: - matrix: + #matrix: + parallel: Python27: python.version: '2.7' Python35: From d91f18f5957447d46547eba523202d70342fa164 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 18:30:50 +0000 Subject: [PATCH 04/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 01515e5b3..73ed3665d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -15,8 +15,7 @@ variables: releaseTemplate: 'templates/azure-pipelines.release.yml' strategy: - #matrix: - parallel: + matrix: Python27: python.version: '2.7' Python35: From aa5a8a3b10d0b95ae52c233314dd46f08e4e41da Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 18:47:18 +0000 Subject: [PATCH 05/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 60 +++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 73ed3665d..d26a2d9ce 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,30 +13,38 @@ pool: variables: artifactName: ReleaseArtifact releaseTemplate: 'templates/azure-pipelines.release.yml' +stages: +- stage: CI + displayName: 'Continuous Integration' + jobs: + - job: Test + timeoutInMinutes: 10 -strategy: - matrix: - Python27: - python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' - -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' - -- script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies' - -- script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'pytest' + + + strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' + + - script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' + + - script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' From d2f5d028d4af0b6d063eaa9243355a13af54790d Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 18:54:02 +0000 Subject: [PATCH 06/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d26a2d9ce..d54a8ac7d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,10 +17,13 @@ stages: - stage: CI displayName: 'Continuous Integration' jobs: - - job: Test + - job: myJob timeoutInMinutes: 10 + steps: + - bash: echo "Hello world" - + - job: Test + timeoutInMinutes: 10 strategy: matrix: From 5e4cc8c02387b99a916589bec79b5d4bd0424cd4 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 20:46:44 +0000 Subject: [PATCH 07/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d54a8ac7d..4f9898a99 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,14 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/python trigger: -- main - + branches: + include: + - azure-pipelines-wens-test + - main + + ###paths: + ##include: + #- awsAlarmIntegration/* pool: vmImage: 'ubuntu-latest' From 661cb15bb023184daf28f0003a22782a3cbcdb44 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 20:50:14 +0000 Subject: [PATCH 08/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4f9898a99..4103186e3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,10 +23,10 @@ stages: - stage: CI displayName: 'Continuous Integration' jobs: - - job: myJob + - job: BeforeTest timeoutInMinutes: 10 steps: - - bash: echo "Hello world" + - bash: echo "Hello world. Running job BeforeTest" - job: Test timeoutInMinutes: 10 @@ -57,3 +57,12 @@ stages: pip install pytest pytest-azurepipelines pytest displayName: 'pytest' + +- stage: TestSuccessful + dependsOn: CI + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. At Stage Post Test" From 4c0a4eeaab63b56ea9d8772e560a0727ca814987 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:01:15 +0000 Subject: [PATCH 09/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4103186e3..7cd56a24b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -60,6 +60,7 @@ stages: - stage: TestSuccessful dependsOn: CI + condition: and(succeeded(), eq(variables.isMain, true)) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest From 7cc010f0d7f705acd768ced195f594c999255bb9 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:06:11 +0000 Subject: [PATCH 10/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7cd56a24b..236e94767 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,7 @@ stages: pytest displayName: 'pytest' -- stage: TestSuccessful +- stage: TestMainBranch dependsOn: CI condition: and(succeeded(), eq(variables.isMain, true)) displayName: 'Continuous Integration - Post Test' @@ -66,4 +66,14 @@ stages: - job: PostTest timeoutInMinutes: 10 steps: - - bash: echo "Hello world. At Stage Post Test" + - bash: echo "Hello world. At Stage TestMainBranch" + +- stage: TestFeatureBranch + dependsOn: CI + condition: and(succeeded(), eq(variables.isMain, false)) + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. At Stage TestFeatrueBranch" From c821459f11d18a56cde37c819d113d32df12e452 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:18:09 +0000 Subject: [PATCH 11/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 236e94767..a8a4bb5a6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,10 +70,10 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: and(succeeded(), eq(variables.isMain, false)) + condition: succeeded() displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest timeoutInMinutes: 10 steps: - - bash: echo "Hello world. At Stage TestFeatrueBranch" + - bash: echo "At Branch: $(Build.SourceBranchName)" From bf2622a27d4204723ae924a1c56b84c7b25c86cb Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:18:34 +0000 Subject: [PATCH 12/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a8a4bb5a6..9cedd5114 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,4 +76,4 @@ stages: - job: PostTest timeoutInMinutes: 10 steps: - - bash: echo "At Branch: $(Build.SourceBranchName)" + - bash: echo "At Branch: $(SourceBranchName)" From f24b205726efffe64d12b09043ab6edd0fd8a88d Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:20:42 +0000 Subject: [PATCH 13/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9cedd5114..28b12f750 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,4 +76,4 @@ stages: - job: PostTest timeoutInMinutes: 10 steps: - - bash: echo "At Branch: $(SourceBranchName)" + - script: echo At Branch: $(Build.SourceBranchName) From 585b0b46040dc3b061ddf27fa4f2713fb6a4ad8f Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:21:16 +0000 Subject: [PATCH 14/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 28b12f750..053e75a82 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,4 +76,4 @@ stages: - job: PostTest timeoutInMinutes: 10 steps: - - script: echo At Branch: $(Build.SourceBranchName) + - script: echo $(Build.SourceBranchName) From fd4b075ccf010fe69a184a1548cade82052f409e Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:30:46 +0000 Subject: [PATCH 15/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 053e75a82..681d86ec3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,7 +70,7 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: succeeded() + condition: and(succeeded(), eq(Build.SourceBranchName, 'azure-pipelines-wens-test')) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest From 62abfff8cbfc242c808c6e9cb61f232b677dcbd3 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:31:45 +0000 Subject: [PATCH 16/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 681d86ec3..1e834195b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,12 +35,12 @@ stages: matrix: Python27: python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' + ##Python35: + #python.version: '3.5' + #Python36: + #python.version: '3.6' + #Python37: + #python.version: '3.7' steps: - task: UsePythonVersion@0 From dc678a3c491a3883e451df59209bb84fb7e54272 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:32:19 +0000 Subject: [PATCH 17/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1e834195b..96e16814b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,7 +70,7 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: and(succeeded(), eq(Build.SourceBranchName, 'azure-pipelines-wens-test')) + condition: and(succeeded(), eq(variables.Build.SourceBranchName, 'azure-pipelines-wens-test')) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest From ef098a4cf2a87efc8a6884c30290090e87246c8b Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:35:16 +0000 Subject: [PATCH 18/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 96e16814b..4b18ea790 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,7 +70,7 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: and(succeeded(), eq(variables.Build.SourceBranchName, 'azure-pipelines-wens-test')) + condition: and(succeeded(), eq(variables.Build.SourceBranchName, azure-pipelines-wens-test)) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest From 03f64060a468e863b1531fc9fd1a4bce087d2f5c Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:35:59 +0000 Subject: [PATCH 19/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4b18ea790..96e16814b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,7 +70,7 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: and(succeeded(), eq(variables.Build.SourceBranchName, azure-pipelines-wens-test)) + condition: and(succeeded(), eq(variables.Build.SourceBranchName, 'azure-pipelines-wens-test')) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest From 8bfb915410bb021db49f97ef0bfc487a2fa3891e Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:36:26 +0000 Subject: [PATCH 20/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 96e16814b..275a54c50 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,7 +70,7 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: and(succeeded(), eq(variables.Build.SourceBranchName, 'azure-pipelines-wens-test')) + condition: and(succeeded(), eq(SourceBranchName, 'azure-pipelines-wens-test')) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest From f96e721d138c794b7494a06074d23a552a607f43 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:36:54 +0000 Subject: [PATCH 21/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 275a54c50..c64e78500 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,7 +70,7 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: and(succeeded(), eq(SourceBranchName, 'azure-pipelines-wens-test')) + condition: and(succeeded(), eq(variables.SourceBranchName, 'azure-pipelines-wens-test')) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest From 6a88b047b83181ce5ede16ece025549d3f676d4a Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:43:17 +0000 Subject: [PATCH 22/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c64e78500..669ea27eb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,6 +19,8 @@ pool: variables: artifactName: ReleaseArtifact releaseTemplate: 'templates/azure-pipelines.release.yml' + isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression + isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression stages: - stage: CI displayName: 'Continuous Integration' @@ -70,10 +72,10 @@ stages: - stage: TestFeatureBranch dependsOn: CI - condition: and(succeeded(), eq(variables.SourceBranchName, 'azure-pipelines-wens-test')) + condition: and(succeeded(), eq(variables.isMyBranch, true)) displayName: 'Continuous Integration - Post Test' jobs: - job: PostTest timeoutInMinutes: 10 steps: - - script: echo $(Build.SourceBranchName) + - script: echo $(Build.SourceBranchName) \ No newline at end of file From 03c8159fcecb21b3f561ee33ede3249021f78d70 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:48:01 +0000 Subject: [PATCH 23/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 669ea27eb..22d7eba51 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -37,12 +37,12 @@ stages: matrix: Python27: python.version: '2.7' - ##Python35: - #python.version: '3.5' - #Python36: - #python.version: '3.6' - #Python37: - #python.version: '3.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' steps: - task: UsePythonVersion@0 From ab652d76a1e0ee424c0f838c8145eb523912aeb3 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:57:11 +0000 Subject: [PATCH 24/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 143 +++++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 68 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 22d7eba51..49f12cb44 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,80 +2,87 @@ # Create and test a Python package on multiple Python versions. # Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/python +resources: + pipelines: + - pipeline: myDownStreamPipeline # Name of the pipeline resource + source: security-lib-ci # Name of the pipeline referenced by the pipeline resource + trigger: + branches: + - releases/* + - main + trigger: + branches: + include: + - azure-pipelines-wens-test + - main -trigger: - branches: - include: - - azure-pipelines-wens-test - - main + ###paths: + ##include: + #- awsAlarmIntegration/* + pool: + vmImage: 'ubuntu-latest' - ###paths: - ##include: - #- awsAlarmIntegration/* -pool: - vmImage: 'ubuntu-latest' + #global variables: + variables: + artifactName: ReleaseArtifact + releaseTemplate: 'templates/azure-pipelines.release.yml' + isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression + isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression + stages: + - stage: CI + displayName: 'Continuous Integration' + jobs: + - job: BeforeTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. Running job BeforeTest" -#global variables: -variables: - artifactName: ReleaseArtifact - releaseTemplate: 'templates/azure-pipelines.release.yml' - isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression - isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression -stages: -- stage: CI - displayName: 'Continuous Integration' - jobs: - - job: BeforeTest - timeoutInMinutes: 10 - steps: - - bash: echo "Hello world. Running job BeforeTest" + - job: Test + timeoutInMinutes: 10 - - job: Test - timeoutInMinutes: 10 + strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' - strategy: - matrix: - Python27: - python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' + - script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' - - script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies' + - script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' - - script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'pytest' + - stage: TestMainBranch + dependsOn: CI + condition: and(succeeded(), eq(variables.isMain, true)) + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. At Stage TestMainBranch" -- stage: TestMainBranch - dependsOn: CI - condition: and(succeeded(), eq(variables.isMain, true)) - displayName: 'Continuous Integration - Post Test' - jobs: - - job: PostTest - timeoutInMinutes: 10 - steps: - - bash: echo "Hello world. At Stage TestMainBranch" - -- stage: TestFeatureBranch - dependsOn: CI - condition: and(succeeded(), eq(variables.isMyBranch, true)) - displayName: 'Continuous Integration - Post Test' - jobs: - - job: PostTest - timeoutInMinutes: 10 - steps: - - script: echo $(Build.SourceBranchName) \ No newline at end of file + - stage: TestFeatureBranch + dependsOn: CI + condition: and(succeeded(), eq(variables.isMyBranch, true)) + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - script: echo $(Build.SourceBranchName) \ No newline at end of file From 4d236c4a0bdec91e4f85eeefcfcfa44c7765e460 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 21:59:29 +0000 Subject: [PATCH 25/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 49f12cb44..dd69ef328 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,7 +5,7 @@ resources: pipelines: - pipeline: myDownStreamPipeline # Name of the pipeline resource - source: security-lib-ci # Name of the pipeline referenced by the pipeline resource + source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource trigger: branches: - releases/* From 350aa04ea55c8874fe0dc0f55a3e8545ec5b8262 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:00:23 +0000 Subject: [PATCH 26/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dd69ef328..7f0c1661b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,7 +8,7 @@ resources: source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource trigger: branches: - - releases/* + - azure-pipelines - main trigger: branches: From 515c04cfcdbe8c3beb26be6439c8199340caf1ef Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:06:25 +0000 Subject: [PATCH 27/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7f0c1661b..a052f1c2d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,11 +5,8 @@ resources: pipelines: - pipeline: myDownStreamPipeline # Name of the pipeline resource + project: wenlianwang/azure-devops-python-samples source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource - trigger: - branches: - - azure-pipelines - - main trigger: branches: include: From 84fc0badb9acccda5949bf32d56750de42267956 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:07:16 +0000 Subject: [PATCH 28/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 134 ++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a052f1c2d..0d509f278 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,79 +7,79 @@ resources: - pipeline: myDownStreamPipeline # Name of the pipeline resource project: wenlianwang/azure-devops-python-samples source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource - trigger: - branches: - include: - - azure-pipelines-wens-test - - main + trigger: + branches: + include: + - azure-pipelines-wens-test + - main - ###paths: - ##include: - #- awsAlarmIntegration/* - pool: - vmImage: 'ubuntu-latest' + ###paths: + ##include: + #- awsAlarmIntegration/* + pool: + vmImage: 'ubuntu-latest' - #global variables: - variables: - artifactName: ReleaseArtifact - releaseTemplate: 'templates/azure-pipelines.release.yml' - isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression - isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression - stages: - - stage: CI - displayName: 'Continuous Integration' - jobs: - - job: BeforeTest - timeoutInMinutes: 10 - steps: - - bash: echo "Hello world. Running job BeforeTest" + #global variables: + variables: + artifactName: ReleaseArtifact + releaseTemplate: 'templates/azure-pipelines.release.yml' + isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression + isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression + stages: + - stage: CI + displayName: 'Continuous Integration' + jobs: + - job: BeforeTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. Running job BeforeTest" - - job: Test - timeoutInMinutes: 10 + - job: Test + timeoutInMinutes: 10 - strategy: - matrix: - Python27: - python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' + strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' - - script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies' + - script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' - - script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'pytest' + - script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' - - stage: TestMainBranch - dependsOn: CI - condition: and(succeeded(), eq(variables.isMain, true)) - displayName: 'Continuous Integration - Post Test' - jobs: - - job: PostTest - timeoutInMinutes: 10 - steps: - - bash: echo "Hello world. At Stage TestMainBranch" + - stage: TestMainBranch + dependsOn: CI + condition: and(succeeded(), eq(variables.isMain, true)) + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. At Stage TestMainBranch" - - stage: TestFeatureBranch - dependsOn: CI - condition: and(succeeded(), eq(variables.isMyBranch, true)) - displayName: 'Continuous Integration - Post Test' - jobs: - - job: PostTest - timeoutInMinutes: 10 - steps: - - script: echo $(Build.SourceBranchName) \ No newline at end of file + - stage: TestFeatureBranch + dependsOn: CI + condition: and(succeeded(), eq(variables.isMyBranch, true)) + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - script: echo $(Build.SourceBranchName) \ No newline at end of file From 3f701014fdb399eafa200606179bf9cbc3748c44 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:08:13 +0000 Subject: [PATCH 29/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0d509f278..5b9459cc0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ resources: source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource trigger: branches: - include: + include: - azure-pipelines-wens-test - main From 4183aa3133b1a4c9e4c8b0424ece26bc2b5690ed Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:08:51 +0000 Subject: [PATCH 30/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5b9459cc0..1abe0e08e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,8 +16,8 @@ resources: ###paths: ##include: #- awsAlarmIntegration/* - pool: - vmImage: 'ubuntu-latest' + pool: + vmImage: 'ubuntu-latest' #global variables: variables: From 363c6256e66de134fba441f31162743cc79cd8f4 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:16:28 +0000 Subject: [PATCH 31/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1abe0e08e..a063b5028 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,11 +2,11 @@ # Create and test a Python package on multiple Python versions. # Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/python -resources: - pipelines: - - pipeline: myDownStreamPipeline # Name of the pipeline resource - project: wenlianwang/azure-devops-python-samples - source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource +#####resources: + ####pipelines: + ###- pipeline: myDownStreamPipeline # Name of the pipeline resource + ##project: wenlianwang/azure-devops-python-samples + #source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource trigger: branches: include: From a3c480761d324277301ddcf9dc1825fa457273e4 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:23:55 +0000 Subject: [PATCH 32/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 139 +++++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 72 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a063b5028..3b7677fcd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,84 +2,79 @@ # Create and test a Python package on multiple Python versions. # Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/python -#####resources: - ####pipelines: - ###- pipeline: myDownStreamPipeline # Name of the pipeline resource - ##project: wenlianwang/azure-devops-python-samples - #source: wenlianwang.azure-devops-python-samples # Name of the pipeline referenced by the pipeline resource - trigger: - branches: - include: - - azure-pipelines-wens-test - - main +trigger: + branches: + include: + - azure-pipelines-wens-test + - main - ###paths: - ##include: - #- awsAlarmIntegration/* - pool: - vmImage: 'ubuntu-latest' +#paths: +#include: + #- awsAlarmIntegration/* +pool: + vmImage: 'ubuntu-latest' - #global variables: - variables: - artifactName: ReleaseArtifact - releaseTemplate: 'templates/azure-pipelines.release.yml' - isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression - isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression - stages: - - stage: CI - displayName: 'Continuous Integration' - jobs: - - job: BeforeTest - timeoutInMinutes: 10 - steps: - - bash: echo "Hello world. Running job BeforeTest" +#global variables: +variables: + artifactName: ReleaseArtifact + releaseTemplate: 'templates/azure-pipelines.release.yml' + isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression + isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression +stages: +- stage: CI + displayName: 'Continuous Integration' + jobs: + - job: BeforeTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. Running job BeforeTest" - - job: Test - timeoutInMinutes: 10 + - job: Test + timeoutInMinutes: 10 - strategy: - matrix: - Python27: - python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' + strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - displayName: 'Use Python $(python.version)' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' - - script: | - python -m pip install --upgrade pip - pip install -r requirements.txt - displayName: 'Install dependencies' + - script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' - - script: | - pip install pytest pytest-azurepipelines - pytest - displayName: 'pytest' + - script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' - - stage: TestMainBranch - dependsOn: CI - condition: and(succeeded(), eq(variables.isMain, true)) - displayName: 'Continuous Integration - Post Test' - jobs: - - job: PostTest - timeoutInMinutes: 10 - steps: - - bash: echo "Hello world. At Stage TestMainBranch" +- stage: TestMainBranch + dependsOn: CI + condition: and(succeeded(), eq(variables.isMain, true)) + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - bash: echo "Hello world. At Stage TestMainBranch" - - stage: TestFeatureBranch - dependsOn: CI - condition: and(succeeded(), eq(variables.isMyBranch, true)) - displayName: 'Continuous Integration - Post Test' - jobs: - - job: PostTest - timeoutInMinutes: 10 - steps: - - script: echo $(Build.SourceBranchName) \ No newline at end of file +- stage: TestFeatureBranch + dependsOn: CI + condition: and(succeeded(), eq(variables.isMyBranch, true)) + displayName: 'Continuous Integration - Post Test' + jobs: + - job: PostTest + timeoutInMinutes: 10 + steps: + - script: echo $(Build.SourceBranchName) \ No newline at end of file From ec726de2c5dab6b858639785d3ece67e40e38496 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:31:43 +0000 Subject: [PATCH 33/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3b7677fcd..595151e8b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,8 +16,6 @@ pool: #global variables: variables: - artifactName: ReleaseArtifact - releaseTemplate: 'templates/azure-pipelines.release.yml' isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression stages: From cf8c2e501f0756cdae8c9cf46a48c8633931ad5d Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 22:49:34 +0000 Subject: [PATCH 34/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 595151e8b..2f856e69e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ trigger: branches: include: - azure-pipelines-wens-test - - main + - master #paths: #include: @@ -16,7 +16,7 @@ pool: #global variables: variables: - isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] # runtime expression + isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] # runtime expression isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression stages: - stage: CI From 15e19ccd548ea33c7bbeb87f5f7934334b9e0b4c Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Tue, 19 Jan 2021 23:52:14 +0000 Subject: [PATCH 35/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2f856e69e..b32dac7de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,12 +34,12 @@ stages: matrix: Python27: python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' - Python37: - python.version: '3.7' + #Python35: + #python.version: '3.5' + #Python36: + #python.version: '3.6' + #Python37: + #python.version: '3.7' steps: - task: UsePythonVersion@0 From c7f4cdaa9b03fefca279e40c642c81af103d485e Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Wed, 20 Jan 2021 19:17:34 +0000 Subject: [PATCH 36/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b32dac7de..425a77604 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,6 +11,7 @@ trigger: #paths: #include: #- awsAlarmIntegration/* + pool: vmImage: 'ubuntu-latest' @@ -18,6 +19,7 @@ pool: variables: isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] # runtime expression isMyBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/azure-pipelines-wens-test')] # runtime expression + stages: - stage: CI displayName: 'Continuous Integration' @@ -25,11 +27,10 @@ stages: - job: BeforeTest timeoutInMinutes: 10 steps: - - bash: echo "Hello world. Running job BeforeTest" + - bash: echo "Hello world. I am in Stage CI" - job: Test timeoutInMinutes: 10 - strategy: matrix: Python27: @@ -57,7 +58,7 @@ stages: pytest displayName: 'pytest' -- stage: TestMainBranch +- stage: TestfromMainBranch dependsOn: CI condition: and(succeeded(), eq(variables.isMain, true)) displayName: 'Continuous Integration - Post Test' @@ -67,7 +68,7 @@ stages: steps: - bash: echo "Hello world. At Stage TestMainBranch" -- stage: TestFeatureBranch +- stage: TestfromFeatureBranch dependsOn: CI condition: and(succeeded(), eq(variables.isMyBranch, true)) displayName: 'Continuous Integration - Post Test' @@ -75,4 +76,28 @@ stages: - job: PostTest timeoutInMinutes: 10 steps: - - script: echo $(Build.SourceBranchName) \ No newline at end of file + - script: echo $(Build.SourceBranchName) + +- stage: TestArtifacts + jobs: + - job: main + steps: + - script: echo "##vso[task.setvariable variable=FOO;isOutput=true]Bar" + displayName: Set output variables + name: myEnv + - job: variables_handler + dependsOn: main + variables: + FOO: $[ dependencies.main.outputs['myEnv.FOO'] ] + steps: + - task: CmdLine@2 + displayName: Create artifact from variables + inputs: + script: | + echo "##vso[task.setvariable variable=FOO;]$(FOO)" > $(Build.ArtifactStagingDirectory)/pipeline.env + - task: PublishBuildArtifacts@1 + displayName: publish variables + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'variables' + publishLocation: 'Container' \ No newline at end of file From a50e66285df0c941eae88ecfa64b2bb9d977e2d1 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Wed, 20 Jan 2021 19:19:05 +0000 Subject: [PATCH 37/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 425a77604..5a0190edf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ stages: - stage: CI displayName: 'Continuous Integration' jobs: - - job: BeforeTest + - job: whoami timeoutInMinutes: 10 steps: - bash: echo "Hello world. I am in Stage CI" From 875124bb2c7e0a02cc6da66729a3e5549e0344f2 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Wed, 20 Jan 2021 19:20:58 +0000 Subject: [PATCH 38/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5a0190edf..a1cedd748 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ stages: - stage: CI displayName: 'Continuous Integration' jobs: - - job: whoami + - job: helloworld timeoutInMinutes: 10 steps: - bash: echo "Hello world. I am in Stage CI" From a5f331964a065456007dd00672523721126cec6c Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Wed, 20 Jan 2021 20:47:00 +0000 Subject: [PATCH 39/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a1cedd748..72ff56240 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,6 @@ trigger: branches: include: - azure-pipelines-wens-test - - master #paths: #include: @@ -35,12 +34,12 @@ stages: matrix: Python27: python.version: '2.7' - #Python35: - #python.version: '3.5' - #Python36: - #python.version: '3.6' - #Python37: - #python.version: '3.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' steps: - task: UsePythonVersion@0 From 2a3ff53af12f2d244d4a78e00f2417b22a7305e0 Mon Sep 17 00:00:00 2001 From: wenlianwang <74910699+wenlianwang@users.noreply.github.com> Date: Wed, 20 Jan 2021 20:59:14 +0000 Subject: [PATCH 40/40] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 72ff56240..cbdfe7808 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -78,6 +78,8 @@ stages: - script: echo $(Build.SourceBranchName) - stage: TestArtifacts + dependsOn: TestfromFeatureBranch + condition: succeeded() jobs: - job: main steps: