aspnetcore/.azure/pipelines/ci.yml

323 lines
11 KiB
YAML

#
# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file.
#
# Configure which branches trigger builds
trigger:
batch: true
branches:
include:
- master
- release/*
- internal/release/*
- ci/*
# Run PR validation on all branches
pr:
autoCancel: true
branches:
include:
- '*'
jobs:
- job: Code_check
displayName: Code check
workspace:
clean: all
pool:
vmImage: vs2017-win2016
steps:
- powershell: ./eng/scripts/CodeCheck.ps1 -ci
displayName: Run eng/scripts/CodeCheck.ps1
- template: jobs/default-build.yml
parameters:
codeSign: true
agentOs: Windows
buildScript: ./src/SiteExtensions/LoggingAggregate/build.cmd
buildArgs: -ci -sign /p:SignType=$(_SignType)
installNodeJs: false
installJdk: false
jobName: SiteExtensions
jobDisplayName: "Build: Azure Logging Site Extension"
artifacts:
- name: AzureSiteExtensions_Packages
path: artifacts/packages/
- name: AzureSiteExtensions_Logs
path: artifacts/logs/
# Build Windows (x64/x86)
- template: jobs/default-build.yml
parameters:
codeSign: true
jobName: Windows_build
jobDisplayName: "Build: Windows x64/x86"
agentOs: Windows
buildSteps:
- script: "echo ##vso[build.addbuildtag]daily-build"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
- script: "echo ##vso[build.addbuildtag]release-candidate"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
# TODO: make it possible to build for one Windows architecture at a time
# This is going to actually build x86 native assets
# Intentionally does not code-sign because the next step will code sign the same files.
# Skipping signing avoids duplicate sign requests.
- script: ./eng/scripts/cibuild.cmd -arch x64 /p:SignType=
displayName: Build x64
# Build the x86 shared framework
# Set DisableSignCheck because we'll run sign check in an explicit step after installers build
- script: ./eng/scripts/cibuild.cmd -arch x86 /t:BuildSharedFx /p:SignType=$(_SignType) /p:DisableSignCheck=true
displayName: Build x86
# Windows installers bundle both x86 and x64 assets
- powershell: ./src/Installers/Windows/build.ps1 -ci /p:SignType=$(_SignType)
displayName: Build Installers
- script: ./build.cmd -ci -sign /t:SignCheck /p:SignType=$(_SignType)
displayName: Run signcheck
artifacts:
- name: Windows_Packages
path: artifacts/packages/
- name: Windows_VSIX
path: artifacts/VSSetup/
- name: Windows_Manifests
path: artifacts/manifests/
- name: Windows_Installers
path: artifacts/installers/
- name: Windows_Logs
path: artifacts/logs/
# Build Windows ARM
- template: jobs/default-build.yml
parameters:
codeSign: true
jobName: Windows_arm_build
jobDisplayName: "Build: Windows ARM"
agentOs: Windows
buildScript: ./eng/scripts/cibuild.cmd -NoBuildNodeJS -NoBuildJava
buildArgs: -arch arm /p:SignType=$(_SignType)
installNodeJs: false
installJdk: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so builds only produce runtime packages
- powershell: gci artifacts/packages/ -recurse -exclude 'runtime.*' -file | rm -ea ignore
artifacts:
- name: Windows_arm_Packages
path: artifacts/packages/
- name: Windows_arm_Manifests
path: artifacts/manifests/
- name: Windows_arm_Installers
path: artifacts/installers/
- name: Windows_arm_Logs
path: artifacts/logs/
# Build MacOS
- template: jobs/default-build.yml
parameters:
jobName: MacOs_x64_build
jobDisplayName: "Build: macOS"
agentOs: macOs
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --no-build-nodejs --no-build-java
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
artifacts:
- name: MacOS_x64_Packages
path: artifacts/packages/
- name: MacOS_x64_Manifests
path: artifacts/manifests/
- name: MacOS_x64_Installers
path: artifacts/installers/
- name: MacOS_x64_Logs
path: artifacts/logs/
- template: jobs/codesign-xplat.yml
parameters:
inputName: MacOS_x64
# Build Linux x64
- template: jobs/default-build.yml
parameters:
jobName: Linux_x64_build
jobDisplayName: "Build: Linux x64"
agentOs: Linux
installNodeJs: false
buildSteps:
- script: ./eng/scripts/cibuild.sh --arch x64 --no-build-nodejs --no-build-java
displayName: Run cibuild.sh
- script: |
rm -rf .dotnet/
git clean -xfd src/
./dockerbuild.sh bionic \
--ci --pack --all --no-build-nodejs --no-build-java \
--arch x64 \
-e KOREBUILD_SKIP_INSTALL_NETFX=0 \
/t:BuildSharedFx \
/p:BuildRuntimeArchive=false \
/p:LinuxInstallerType=deb
displayName: Build Debian installers
- script: |
rm -rf .dotnet/
git clean -xfd src/
./dockerbuild.sh rhel \
--ci --pack --all --no-build-nodejs --no-build-java \
--arch x64 \
-e KOREBUILD_SKIP_INSTALL_NETFX=0 \
/t:BuildSharedFx \
/p:BuildRuntimeArchive=false \
/p:LinuxInstallerType=rpm
displayName: Build RPM installers
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
artifacts:
- name: Linux_x64_Packages
path: artifacts/packages/
- name: Linux_x64_Manifests
path: artifacts/manifests/
- name: Linux_x64_Installers
path: artifacts/installers/
- name: Linux_x64_Logs
path: artifacts/logs/
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_x64
# Build Linux ARM
- template: jobs/default-build.yml
parameters:
jobName: Linux_arm_build
jobDisplayName: "Build: Linux ARM"
agentOs: Linux
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --arch arm --no-build-nodejs --no-build-java
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
artifacts:
- name: Linux_arm_Packages
path: artifacts/packages/
- name: Linux_arm_Manifests
path: artifacts/manifests/
- name: Linux_arm_Installers
path: artifacts/installers/
- name: Linux_arm_Logs
path: artifacts/logs/
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_arm
# Build Linux ARM64
- template: jobs/default-build.yml
parameters:
jobName: Linux_arm64_build
jobDisplayName: "Build: Linux ARM64"
agentOs: Linux
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --arch arm64 --no-build-nodejs --no-build-java
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
artifacts:
- name: Linux_arm64_Packages
path: artifacts/packages/
- name: Linux_arm64_Manifests
path: artifacts/manifests/
- name: Linux_arm64_Installers
path: artifacts/installers/
- name: Linux_arm64_Logs
path: artifacts/logs/
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_arm64
# Build Linux Musl x64
- template: jobs/default-build.yml
parameters:
jobName: Linux_musl_x64_build
jobDisplayName: "Build: Linux Musl x64"
agentOs: Linux
buildScript: ./dockerbuild.sh alpine
buildArgs: --ci --pack --all -e KOREBUILD_SKIP_INSTALL_NETFX=0 --arch x64 --os-name linux-musl --no-build-nodejs --no-build-java
installNodeJs: false
afterBuild:
# Remove packages that are not rid-specific.
# TODO add a flag so macOS/Linux builds only produce runtime packages
- script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
artifacts:
- name: Linux_musl_x64_Packages
path: artifacts/packages/
- name: Linux_musl_x64_Manifests
path: artifacts/manifests/
- name: Linux_musl_x64_Installers
path: artifacts/installers/
- name: Linux_musl_x64_Logs
path: artifacts/logs/
- template: jobs/codesign-xplat.yml
parameters:
inputName: Linux_musl_x64
# Test jobs
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: Windows_Test
jobDisplayName: "Test: Windows Server 2016 x64"
agentOs: Windows
buildScript: ./eng/scripts/cibuild.cmd
buildArgs: -test "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true"
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: MacOs_Test
jobDisplayName: "Test: macOS 10.13"
agentOs: macOs
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --test
beforeBuild:
- bash: "./eng/scripts/install-nginx-mac.sh"
displayName: Installing Nginx
- template: jobs/default-build.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
jobName: Linux_Test
jobDisplayName: "Test: Ubuntu 16.04 x64"
agentOs: Linux
buildScript: ./eng/scripts/cibuild.sh
buildArgs: --test
beforeBuild:
- bash: "./eng/scripts/install-nginx-linux.sh"
displayName: Installing Nginx
- template: jobs/iisintegration-job.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
TestGroupName: IIS
skipArgs: " /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=false /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true"
- template: jobs/iisintegration-job.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
TestGroupName: IISExpress
skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=false /p:SkipIISForwardsCompatibilityTests=true"
- template: jobs/iisintegration-job.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
TestGroupName: IISForwardCompat
skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=false"
- template: jobs/iisintegration-job.yml
parameters:
condition: ne(variables['SkipTests'], 'true')
TestGroupName: IISBackCompat
skipArgs: "/p:SkipIISBackwardsCompatibilityTests=false /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true"