Skip to content
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2df04fe
Add VMR unified build pipelines
akoeplinger Jan 25, 2024
1a64f7e
PR feedback: don't condition vmr-scan.yml
akoeplinger Jan 31, 2024
261e76d
PR feedback: simplify docker and build args
akoeplinger Jan 31, 2024
fcadc9c
PR feedback: remove _Online_MsftSdk suffix
akoeplinger Jan 31, 2024
d458b91
PR feedback: combine targetRid cases
akoeplinger Jan 31, 2024
42a4f8d
PR feedback: always run vmr-scan
akoeplinger Jan 31, 2024
dffb44f
PR feedback: vmrBranch parameter
akoeplinger Jan 31, 2024
450f818
Only pass --source-only flag for source only builds
akoeplinger Feb 1, 2024
7079a8f
Rework pipeline triggers
akoeplinger Feb 1, 2024
1002956
Fix yml
akoeplinger Feb 1, 2024
f886d12
Set correct defaults for binarylog
akoeplinger Feb 1, 2024
cbf966b
Run Prep the Build in source-only mode only
akoeplinger Feb 1, 2024
54072a6
Move cross builds to full build
akoeplinger Feb 1, 2024
5c9c962
Fix if conditions and variable types
akoeplinger Feb 1, 2024
46f6c7c
Remove excludeOmniSharpTests
akoeplinger Feb 1, 2024
ff0b903
PR feedback: ultralite
akoeplinger Feb 1, 2024
db2588a
Fix yml
akoeplinger Feb 1, 2024
386540f
Fix yml
akoeplinger Feb 1, 2024
b8465c2
Set default for excludeOmniSharpTests
akoeplinger Feb 1, 2024
eea9e7c
Set CI flags for windows build
akoeplinger Feb 1, 2024
e5c27ff
Create powershell version of vmr-sync.sh
akoeplinger Feb 1, 2024
ce365b5
Fix script
akoeplinger Feb 1, 2024
659aa50
Fix pwd
akoeplinger Feb 2, 2024
da4b1b5
Fixes
akoeplinger Feb 2, 2024
52ec1f8
Fix build.cmd
akoeplinger Feb 2, 2024
ee9e06f
Fix cleanWhileBuilding in build.ps1
akoeplinger Feb 2, 2024
f05368a
Fix
akoeplinger Feb 2, 2024
fb98ac0
Fix
akoeplinger Feb 2, 2024
6329f43
Merge branch 'main' into vmr-vertical-pipeline
ViktorHofer Feb 2, 2024
e49429d
Clean-up and args grouping
ViktorHofer Feb 2, 2024
7a42c11
Only pass BUILD_SOURCEVERSION in the container case, not needed other…
akoeplinger Feb 2, 2024
62719a7
Update vmr-pull-updates.yml
akoeplinger Feb 2, 2024
db3fa06
Add powershell version of buildlogs script and use rsync on unix beca…
akoeplinger Feb 2, 2024
b012e09
Fix yml
akoeplinger Feb 2, 2024
2788886
Only publish tests when we're running them
akoeplinger Feb 2, 2024
872661b
Correctly set RuntimeOS for windows
akoeplinger Feb 2, 2024
6fc7f38
Calculcate RuntimeOS/BaseOS off of sdk rids
akoeplinger Feb 2, 2024
3732c51
PR feedback: rename disableVmrBuild
akoeplinger Feb 3, 2024
ac8fe89
PR feedback: reorder parameters
akoeplinger Feb 3, 2024
583fb52
PR feedback: condition
akoeplinger Feb 3, 2024
238d067
PR feedback: only use docker in Prep the Build
akoeplinger Feb 3, 2024
3d63407
PR feedback: combine conditions and cleanup
akoeplinger Feb 3, 2024
27c3d48
PR feedback: condition on runTests
akoeplinger Feb 3, 2024
ac7e1cd
Merge remote-tracking branch 'upstream/main' into vmr-vertical-pipeline
akoeplinger Feb 3, 2024
4822608
Remove triggers from ci.yml and simplify ci-lite.yml
akoeplinger Feb 5, 2024
2f5232f
Fix variable cast to boolean
akoeplinger Feb 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
386 changes: 216 additions & 170 deletions eng/pipelines/templates/jobs/vmr-build.yml

Large diffs are not rendered by default.

616 changes: 347 additions & 269 deletions eng/pipelines/templates/stages/vmr-build.yml

Large diffs are not rendered by default.

177 changes: 0 additions & 177 deletions eng/pipelines/templates/stages/vmr-cross-build.yml

This file was deleted.

38 changes: 35 additions & 3 deletions eng/pipelines/templates/steps/vmr-pull-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,19 @@ steps:
- script: |
git checkout -B ${{ parameters.vmrBranch }}
echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}"
mkdir -p ${{ parameters.vmrPath }}/artifacts/x64/Release
displayName: Prepare branch ${{ parameters.vmrBranch }}
workingDirectory: ${{ parameters.vmrPath }}

- script: |
mkdir -p ${{ parameters.vmrPath }}/artifacts/x64/Release
displayName: Create artifacts folder (Unix)
condition: ne(variables['Agent.OS'], 'Windows_NT')

- powershell: |
New-Item -ItemType Directory -Path ${{ parameters.vmrPath }}/artifacts/x64/Release
displayName: Create artifacts folder (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')

- script: |
git config --global user.name "dotnet-maestro[bot]"
git config --global user.email "dotnet-maestro[bot]@users.noreply.github.com"
Expand All @@ -57,13 +66,36 @@ steps:
--branch ${{ parameters.vmrBranch }}
--repository "installer:${{ parameters.targetRef }}"
--recursive
--remote "installer:$(pwd)"
--remote "installer:$(Agent.BuildDirectory)/installer"
--component-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/Component.template.md
--tpn-template $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt
--debug
||
(echo "##vso[task.logissue type=error]Failed to synchronize the VMR" && exit 1)
displayName: Synchronize dotnet/dotnet
displayName: Synchronize dotnet/dotnet (Unix)
condition: ne(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/installer

- powershell: >
./eng/vmr-sync.ps1 `
-vmr ${{ parameters.vmrPath }} `
-tmp $(Agent.TempDirectory) `
-azdevPat '$(dn-bot-all-orgs-code-r)' `
-branch ${{ parameters.vmrBranch }} `
-repository "installer:${{ parameters.targetRef }}" `
-recursive `
# passing remote fails for some reason, but it is the default anyway
# -remote "installer:$(Agent.BuildDirectory)/installer"
-componentTemplate $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/Component.template.md `
-tpnTemplate $(Agent.BuildDirectory)/installer/src/VirtualMonoRepo/THIRD-PARTY-NOTICES.template.txt `
-debug

if ($LASTEXITCODE -ne 0) {
echo "##vso[task.logissue type=error]Failed to synchronize the VMR"
exit 1
}
displayName: Synchronize dotnet/dotnet (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')
workingDirectory: $(Agent.BuildDirectory)/installer

- publish: $(Agent.TempDirectory)
Expand Down
53 changes: 53 additions & 0 deletions eng/pipelines/templates/variables/vmr-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
parameters:
- name: vmrBranch
type: string

variables:
- ${{ if ne(parameters.vmrBranch, '') }}:
Comment thread
akoeplinger marked this conversation as resolved.
Comment thread
akoeplinger marked this conversation as resolved.
- name: VmrBranch
value: ${{ parameters.vmrBranch }}
- ${{ else }}:
- name: VmrBranch
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}

- name: alpine319Container
value: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
- name: centOSStream8Container
value: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
- name: centOSStream9Container
value: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
- name: fedora39Container
value: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
- name: ubuntu2204Container
value: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04
- name: ubuntu2204ArmContainer
value: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-arm64
- name: marinerX64CrossContainer
value: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64
- name: marinerArm64CrossContainer
value: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64

- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: defaultPoolName
value: NetCore-Public-XL
- name: defaultPoolDemandsLinux
value: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
- name: defaultPoolDemandsWindows
value: ImageOverride -equals windows.vs2022.amd64.open
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- name: defaultPoolName
value: NetCore1ESPool-Internal-XL
- ${{ else }}:
- name: defaultPoolName
value: NetCore1ESPool-Svc-Internal
- name: defaultPoolDemandsLinux
value: ImageOverride -equals Build.Ubuntu.1804.Amd64
- name: defaultPoolDemandsWindows
value: ImageOverride -equals windows.vs2022.amd64

- name: defaultPoolNameLinuxArm64
value: Docker-Linux-Arm-Internal

- name: defaultPoolNameMac
value: macos-12
53 changes: 0 additions & 53 deletions eng/pipelines/vmr-build-internal.yml

This file was deleted.

24 changes: 20 additions & 4 deletions eng/pipelines/vmr-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# This yml is used by these pipelines and triggers:
#
# - installer-source-build (public)
# - PR: release/* and main, ultralite build
# - installer-unified-build (public)
# - PR: release/* and main, lite build

trigger: none
pr:
branches:
Expand All @@ -15,8 +22,8 @@ parameters:
type: string
default: ' '

- name: disableVmrBuild
displayName: Skip source-building the VMR
- name: disableBuild
displayName: Skip the VMR Build stage
type: boolean
default: false

Expand All @@ -28,6 +35,10 @@ variables:
- name: VmrBranch
value: ${{ replace(replace(variables['System.PullRequest.TargetBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}

# enable source-only build for pipelines with the -source-build suffix
- name: isSourceOnlyBuild
value: ${{ contains(variables['Build.DefinitionName'], '-source-build') }}

resources:
repositories:
- repository: vmr
Expand All @@ -37,12 +48,17 @@ resources:
ref: ${{ variables.VmrBranch }}

stages:
# You can temporarily disable the VMR Build stage by setting the disableVmrBuild variable
- ${{ if not(parameters.disableVmrBuild) }}:
# You can temporarily disable the VMR Build stage by setting the disableBuild variable
- ${{ if not(parameters.disableBuild) }}:
- template: templates/stages/vmr-build.yml
parameters:
vmrBranch: ${{ variables.VmrBranch }}
isBuiltFromVmr: false
isSourceOnlyBuild: ${{ variables.isSourceOnlyBuild }}
${{ if eq(variables.isSourceOnlyBuild, 'true') }}:
scope: ultralite
${{ else }}:
scope: lite

# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate
# that the PR can be merged and later synchronized into the VMR without problems.
Expand Down
Loading