From 5b19357042100b1a0f0de7fea3cbbebf201f379d Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 21:54:58 -0800 Subject: [PATCH 01/12] Correct platorm reach for the Official build Does the following: 1. Sets up a ci rule for master and a pr rule for master 2. Corrects the OSX queues 3. Corrects ubuntu internal queue 4. Converts all linux jobs to build using containers 5. Only runs official builds on: Pri1, release, bringing us to parity with old process 6. Fixes centos build-test 7. Adds a super-annoying groupname tag that avoids name mangling. --- azure-pipelines.yml | 93 ++++++++++++++++++++++++++++------------- build-test.sh | 7 +--- eng/build-job.yml | 33 ++++++++++----- eng/platform-matrix.yml | 64 ++++++++++++++++++++++++---- eng/test-job.yml | 22 ++++++---- eng/xplat-job.yml | 22 ++++++++-- 6 files changed, 178 insertions(+), 63 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ae8191ff28ff..c7cfed126429 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,31 @@ variables: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true +resources: + containers: + - container: ubuntu_1404_arm_cross_build_image + image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180426002420 + + - container: ubuntu_1604_arm64_cross_build_image + image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921 + + - container: ubuntu_1604_x64_build_image + image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-c103199-20180628134544 + + - container: musl_x64_build_image + image: microsoft/dotnet-buildtools-prereqs:alpine-3.6-e2521f8-20180716231200 + + - container: centos7_x64_build_image + image: microsoft/dotnet-buildtools-prereqs:centos-7-d485f41-20173404063424 + + - container: centos6_x64_build_image + image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331 + +trigger: + - master + +pr: + - master jobs: @@ -64,19 +89,23 @@ jobs: # Debug build # -- template: eng/platform-matrix.yml - parameters: - jobTemplate: build-job.yml - buildConfig: debug +# Official build is release only. +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: build-job.yml + buildConfig: debug # # Checked build # -- template: eng/platform-matrix.yml - parameters: - jobTemplate: build-job.yml - buildConfig: checked +# Official build is release only. +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: build-job.yml + buildConfig: checked # # Release build @@ -92,31 +121,37 @@ jobs: # # Pri0 -- template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: checked - jobParameters: - priority: 0 +# Official build is release pri1 only. +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + jobParameters: + priority: 0 # Pri1 -- template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: checked - jobParameters: - priority: 1 - scenarios: 'normal;jitstress2' +# Official build is release only. +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + jobParameters: + priority: 1 + scenarios: 'normal;jitstress2' # Pri1 crossgen -- template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: checked - jobParameters: - priority: 1 - crossgen: true - scenarios: 'normal;jitstress2' +# Official build is release only. +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + jobParameters: + priority: 1 + crossgen: true + scenarios: 'normal;jitstress2' # # Release test builds diff --git a/build-test.sh b/build-test.sh index 8a09aefc6eb7..858085f54d08 100755 --- a/build-test.sh +++ b/build-test.sh @@ -11,12 +11,7 @@ initHostDistroRid() if [ "$__HostOS" == "Linux" ]; then if [ -e /etc/redhat-release ]; then - local redhatRelease=$( Date: Fri, 30 Nov 2018 12:27:13 -0800 Subject: [PATCH 02/12] make sure we only add triggers for internal builds --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c7cfed126429..923889801e38 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,9 +21,11 @@ resources: - container: centos6_x64_build_image image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331 +-${{ if ne(variables['System.TeamProject'], 'public') }} trigger: - master +-${{ if ne(variables['System.TeamProject'], 'public') }} pr: - master From 1c11f3eeb46fce13201a39cb86a7830703768135 Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 12:36:12 -0800 Subject: [PATCH 03/12] Fix syntax --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 923889801e38..2879aa28ec2a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,12 +22,12 @@ resources: image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331 -${{ if ne(variables['System.TeamProject'], 'public') }} -trigger: - - master + trigger: + - master -${{ if ne(variables['System.TeamProject'], 'public') }} -pr: - - master + pr: + - master jobs: From 5d4b55a5bbd77263ed82ea448d26f4064d87ed05 Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 12:38:48 -0800 Subject: [PATCH 04/12] Missing : --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2879aa28ec2a..e7885c21a70a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,11 +21,11 @@ resources: - container: centos6_x64_build_image image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331 --${{ if ne(variables['System.TeamProject'], 'public') }} +-${{ if ne(variables['System.TeamProject'], 'public') }}: trigger: - master --${{ if ne(variables['System.TeamProject'], 'public') }} +-${{ if ne(variables['System.TeamProject'], 'public') }}: pr: - master From 5350be2a476eba781b619fbf60cb3a8255975b82 Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 12:40:48 -0800 Subject: [PATCH 05/12] Remove pr/ci --- azure-pipelines.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e7885c21a70a..f89b651d2d81 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,14 +21,6 @@ resources: - container: centos6_x64_build_image image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331 --${{ if ne(variables['System.TeamProject'], 'public') }}: - trigger: - - master - --${{ if ne(variables['System.TeamProject'], 'public') }}: - pr: - - master - jobs: ## The following is the matrix of test runs that we have. This is From fd337f19170f97c09d3c1fbac8b8018574cfaeb2 Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 14:12:38 -0800 Subject: [PATCH 06/12] Fix internal queue name --- eng/test-job.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/test-job.yml b/eng/test-job.yml index a5f8972a67ec..00982f762b0c 100644 --- a/eng/test-job.yml +++ b/eng/test-job.yml @@ -111,7 +111,7 @@ jobs: env: ${{ if eq(variables['System.TeamProject'], 'internal') }}: # Access token variable for internal project - HelixAccessToken: $(HelixApiAccessToken) + HelixAccessToken: $(DotNet-HelixApi-Access) ${{ if eq(variables['System.TeamProject'], 'public') }}: # Access token variable for public project HelixAccessToken: $(BotAccount-dotnet-github-anon-kaonashi-bot-helix-token) @@ -121,7 +121,7 @@ jobs: env: ${{ if eq(variables['System.TeamProject'], 'internal') }}: # Access token variable for internal project - HelixAccessToken: $(HelixApiAccessToken) + HelixAccessToken: $(DotNet-HelixApi-Access) ${{ if eq(variables['System.TeamProject'], 'public') }}: # Access token variable for public project HelixAccessToken: $(BotAccount-dotnet-github-anon-kaonashi-bot-helix-token) From 89e34501a9d32f3b5421ee1cedab3816085ee3a0 Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 15:50:11 -0800 Subject: [PATCH 07/12] Correct Public/internal choices. --- azure-pipelines.yml | 50 ++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f89b651d2d81..b270abdff773 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -80,31 +80,27 @@ jobs: # -# Debug build +# Debug build (CI) # - -# Official build is release only. -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: +- ${{ if eq(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: jobTemplate: build-job.yml buildConfig: debug # -# Checked build +# Checked build (CI) # - -# Official build is release only. -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: +- ${{ if eq(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: jobTemplate: build-job.yml buildConfig: checked # -# Release build +# Release build (Official Build) # - +- ${{ if ne(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: jobTemplate: build-job.yml @@ -114,9 +110,8 @@ jobs: # Checked test builds # -# Pri0 -# Official build is release pri1 only. -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: +# Pri0 (CI) +- ${{ if eq(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: jobTemplate: test-job.yml @@ -124,20 +119,17 @@ jobs: jobParameters: priority: 0 -# Pri1 -# Official build is release only. -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: checked - jobParameters: - priority: 1 - scenarios: 'normal;jitstress2' +# Pri1 (Official Build, TODO: CI Outerloop) +- template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + jobParameters: + priority: 1 + scenarios: 'normal;jitstress2' -# Pri1 crossgen -# Official build is release only. -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: +# Pri1 crossgen (Official Build, TODO: CI Outerloop) +- ${{ if ne(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: jobTemplate: test-job.yml @@ -148,10 +140,11 @@ jobs: scenarios: 'normal;jitstress2' # -# Release test builds +# Release test builds (Official Build) # # Pri1 +- ${{ if ne(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: jobTemplate: test-job.yml @@ -159,7 +152,8 @@ jobs: jobParameters: priority: 1 -# Pri1 crossgen +# Pri1 crossgen (Official Build) +- ${{ if eq(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: jobTemplate: test-job.yml From 27025f79156b42c0f11c1491ccd94b4883636300 Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 15:50:51 -0800 Subject: [PATCH 08/12] Add crossgen as well --- azure-pipelines.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b270abdff773..df073206d200 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -129,15 +129,14 @@ jobs: scenarios: 'normal;jitstress2' # Pri1 crossgen (Official Build, TODO: CI Outerloop) -- ${{ if ne(variables['System.TeamProject'], 'public') }}: - - template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: checked - jobParameters: - priority: 1 - crossgen: true - scenarios: 'normal;jitstress2' +- template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + jobParameters: + priority: 1 + crossgen: true + scenarios: 'normal;jitstress2' # # Release test builds (Official Build) From 9577c52079428e604e26bc3b12d09b040df3addb Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 16:08:21 -0800 Subject: [PATCH 09/12] Correct indentation --- azure-pipelines.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index df073206d200..f17aee29ba10 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -101,10 +101,10 @@ jobs: # Release build (Official Build) # - ${{ if ne(variables['System.TeamProject'], 'public') }}: -- template: eng/platform-matrix.yml - parameters: - jobTemplate: build-job.yml - buildConfig: release + - template: eng/platform-matrix.yml + parameters: + jobTemplate: build-job.yml + buildConfig: release # # Checked test builds @@ -144,22 +144,22 @@ jobs: # Pri1 - ${{ if ne(variables['System.TeamProject'], 'public') }}: -- template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: release - jobParameters: - priority: 1 + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: release + jobParameters: + priority: 1 # Pri1 crossgen (Official Build) - ${{ if eq(variables['System.TeamProject'], 'public') }}: -- template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: release - jobParameters: - priority: 1 - crossgen: true + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: release + jobParameters: + priority: 1 + crossgen: true # Publish build information to Build Assets Registry From a007b9c45aff4938859eea46f49ab2f3ed553837 Mon Sep 17 00:00:00 2001 From: jashook Date: Fri, 30 Nov 2018 16:09:55 -0800 Subject: [PATCH 10/12] Correct checked pri1 tests --- azure-pipelines.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f17aee29ba10..8c1bd7d8dd66 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -119,24 +119,26 @@ jobs: jobParameters: priority: 0 -# Pri1 (Official Build, TODO: CI Outerloop) -- template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: checked - jobParameters: - priority: 1 - scenarios: 'normal;jitstress2' - -# Pri1 crossgen (Official Build, TODO: CI Outerloop) -- template: eng/platform-matrix.yml - parameters: - jobTemplate: test-job.yml - buildConfig: checked - jobParameters: - priority: 1 - crossgen: true - scenarios: 'normal;jitstress2' +# Pri1 (Official CI) +- ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + jobParameters: + priority: 1 + scenarios: 'normal;jitstress2' + +# Pri1 crossgen (CI) +- ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + jobParameters: + priority: 1 + crossgen: true + scenarios: 'normal;jitstress2' # # Release test builds (Official Build) From 332135c1089c551d0b9ed18944c5c0e78ce8f62b Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 3 Dec 2018 09:22:42 -0800 Subject: [PATCH 11/12] Address pr feedback --- azure-pipelines.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8c1bd7d8dd66..53e1ff6949aa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -100,11 +100,10 @@ jobs: # # Release build (Official Build) # -- ${{ if ne(variables['System.TeamProject'], 'public') }}: - - template: eng/platform-matrix.yml - parameters: - jobTemplate: build-job.yml - buildConfig: release +- template: eng/platform-matrix.yml + parameters: + jobTemplate: build-job.yml + buildConfig: release # # Checked test builds @@ -119,7 +118,7 @@ jobs: jobParameters: priority: 0 -# Pri1 (Official CI) +# Pri1 (CI) - ${{ if eq(variables['System.TeamProject'], 'public') }}: - template: eng/platform-matrix.yml parameters: From 7fdbe981abb1dc96609c5424f34d1b141a7afbb4 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 3 Dec 2018 12:46:16 -0800 Subject: [PATCH 12/12] Add todo comments --- azure-pipelines.yml | 3 ++- eng/platform-matrix.yml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 53e1ff6949aa..92de97168407 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -77,7 +77,8 @@ jobs: ## | (passed-in jobTemplate) | (arcade) ## \------> test-job.yml ------/ - +# TODO: simplify logic surrounding official build/ci. See +# https://github.com/Microsoft/azure-pipelines-yaml/pull/46 for more information # # Debug build (CI) diff --git a/eng/platform-matrix.yml b/eng/platform-matrix.yml index 7c1ce1d4ea58..fb1a3c66ed80 100644 --- a/eng/platform-matrix.yml +++ b/eng/platform-matrix.yml @@ -5,6 +5,9 @@ parameters: jobs: +# TODO: simplify osGroupName by adding osGroup and osSubGroup. See +# https://github.com/Microsoft/azure-pipelines-yaml/pull/46 for more information + # Linux arm - template: ${{ parameters.jobTemplate }} parameters: