Skip to content

Improve components infrastructure #12145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 74 commits into from
Jul 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
71d2396
Improve components infrastructure
Jul 9, 2019
2447ae5
Wip
Jul 10, 2019
20d90ff
Remove generated js files
Jul 10, 2019
2f4e9e3
Update gitignore
Jul 11, 2019
d703361
Update docs
Jul 11, 2019
d176b1c
Fix build.cmd in root
Jul 11, 2019
53d8f58
Try checking later
Jul 11, 2019
604d774
Build NodeJS project by default
Jul 11, 2019
789f342
Build Web.JS if building managed or nodejs
Jul 11, 2019
9167a06
Gah case sensitivity
Jul 11, 2019
a89f6ec
Need to install NodeJS for all builds
Jul 11, 2019
66b7a6a
Source build doesn't use the templates
Jul 11, 2019
53f25e2
Try disabling restore in parallel
Jul 11, 2019
3687d12
Need to enforce order
Jul 11, 2019
258ba25
Build Web.JS before other projects
Jul 12, 2019
f77da00
Please trigger a build
Jul 13, 2019
793d674
Add configuration that compiles Web.JS
Jul 13, 2019
d666961
wip paths?
Jul 13, 2019
e4e9fa9
Try passing artifacts between jobs
Jul 13, 2019
ae8eb96
Set variable explicitly
Jul 13, 2019
9a8a47f
Try sources directory
Jul 13, 2019
ac33ad3
All builds should depend on Web.JS job
Jul 13, 2019
e64e2b4
omg spacing
Jul 13, 2019
9521658
wip
Jul 13, 2019
8c6256f
Workaround https://github.com/Microsoft/azure-pipelines-tasks/issues/…
Jul 13, 2019
b86d1f0
Try again
Jul 13, 2019
c143072
Update logic for when explicitly disabling NodeJS builds
Jul 13, 2019
db3e681
Oops
Jul 13, 2019
401319a
Make BuildAll not override explicit BuildJava/NodeJS/Native/Managed s…
Jul 13, 2019
dfd10b4
Apparently build happens in the sources directory
Jul 13, 2019
81317af
Feedback
Jul 16, 2019
b4bd7e9
Try using pipeline artifacts
Jul 16, 2019
efc633f
Spacing
Jul 16, 2019
8e54ca9
Try for musl
Jul 16, 2019
312b651
Fixup
Jul 16, 2019
a6a3a1c
Fix build order
Jul 16, 2019
57083e9
Oops
Jul 17, 2019
03920f8
Fixup CI configurations
Jul 17, 2019
be2b8be
Capture CodeCheck logs for debugging
Jul 18, 2019
cf4e59f
Skip NodeJS projects when generation ref assemblies
Jul 18, 2019
1831ba9
Add tick
Jul 18, 2019
851c946
Fix pack failure
Jul 18, 2019
59221cf
Regen JS before dependent steps
Jul 18, 2019
110958d
Add explicit exclude
Jul 18, 2019
7ae22cd
Do not build dependent projects if NodeJS is not built
Jul 18, 2019
9b71ecd
Merge branch 'master' into johluo/components-retry
Jul 18, 2019
bfd9e9e
Merge branch 'master' into johluo/components-retry
Jul 18, 2019
dba4ed4
Fix dependency between npmproj
Jul 19, 2019
ceb10cd
Add more user friendly error message
Jul 19, 2019
a3d043f
Move reference to root directory.targets
Jul 19, 2019
af3cf80
Simplify
Jul 19, 2019
4f7097f
Need to build nodejs on helix builds
Jul 19, 2019
b07a73d
Ensure yarn install is run before build
Jul 19, 2019
74bee0f
Merge branch 'master' into johluo/components-retry
Jul 20, 2019
74792a2
Feedback
Jul 21, 2019
f84e41d
Merge branch 'master' into johluo/components-retry
Jul 21, 2019
38c0dec
Yarn upgrade?
Jul 21, 2019
efbbf9b
Oh yml
Jul 21, 2019
a6eac9b
Cleanup
Jul 22, 2019
93987d8
Make build fail immediately instead of on restore
Jul 22, 2019
ec89924
Merge branch 'master' into johluo/components-retry
Jul 23, 2019
48ef80d
Merge fixes
Jul 23, 2019
121616c
Merge branch 'master' into johluo/components-retry
Jul 24, 2019
5acf836
Do not build nodejs in installer builds
Jul 24, 2019
6c1030e
Increase timeout
Jul 25, 2019
d530802
Disable failing test
Jul 25, 2019
97adf99
Fix race and address feedback
Jul 25, 2019
cac5323
Missing install?
Jul 26, 2019
2dbcf35
Oops
Jul 26, 2019
67a32b1
Fix Brennan's code
Jul 26, 2019
e684915
Feedback and cleanup
Jul 26, 2019
6c939fd
derp
Jul 26, 2019
e863208
Add comment for skipped test
Jul 26, 2019
a897f98
Merge branch 'master' into johluo/components-retry
Jul 26, 2019
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
122 changes: 120 additions & 2 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,31 @@ variables:
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: _BuildArgs
value: ''

jobs:
# Build Web.JS
- template: jobs/default-build.yml
parameters:
codeSign: true
jobName: WebJS_build
jobDisplayName: "Build: Web.JS"
agentOs: Linux
steps:
- script: ./build.sh
--ci
--projects $(Build.SourcesDirectory)/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj
-bl:artifacts/log/build.linux-x64.binlog
$(_BuildArgs)
displayName: Run build.sh
- publish: src/Components/Web.JS/dist/
artifact: WebJS_Javascript
installJdk: false
artifacts:
- name: WebJS_Logs
path: artifacts/log/
publishOnError: true

# Code check
- template: jobs/default-build.yml
parameters:
jobName: Code_check
Expand All @@ -38,10 +62,16 @@ jobs:
steps:
- powershell: ./eng/scripts/CodeCheck.ps1 -ci
displayName: Run eng/scripts/CodeCheck.ps1
artifacts:
- name: Code_Check_Logs
path: artifacts/log/
publishOnError: true

# Build Windows (x64/x86)
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
codeSign: true
jobName: Windows_build
jobDisplayName: "Build: Windows x64/x86"
Expand All @@ -53,6 +83,10 @@ jobs:
- script: "echo ##vso[build.addbuildtag]release-candidate"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), in(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
displayName: 'Set CI tags'
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
# !!! NOTE !!! Some of these steps have disabled code signing.
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even
# if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing.
Expand Down Expand Up @@ -130,10 +164,17 @@ jobs:
# Build Windows ARM
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
codeSign: true
jobName: Windows_arm_build
jobDisplayName: "Build: Windows ARM"
agentOs: Windows
beforeBuild:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
buildArgs:
-arch arm
-sign
Expand All @@ -159,9 +200,16 @@ jobs:
# Build MacOS
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
jobName: MacOs_x64_build
jobDisplayName: "Build: macOS"
agentOs: macOs
beforeBuild:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
buildArgs:
--pack
--all
Expand All @@ -171,6 +219,7 @@ jobs:
-bl:artifacts/log/build.macos.binlog
$(_BuildArgs)
installNodeJs: false
installJdk: false
artifacts:
- name: MacOS_x64_Packages
path: artifacts/packages/
Expand All @@ -188,11 +237,16 @@ jobs:
# Build Linux x64
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
jobName: Linux_x64_build
jobDisplayName: "Build: Linux x64"
agentOs: Linux
installNodeJs: false
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
- script: ./build.sh
--ci
--arch x64
Expand All @@ -211,6 +265,7 @@ jobs:
--arch x64 \
--build-installers \
--no-build-deps \
--no-build-nodejs \
-p:OnlyPackPlatformSpecificPackages=true \
-p:BuildRuntimeArchive=false \
-p:LinuxInstallerType=deb \
Expand All @@ -224,12 +279,15 @@ jobs:
--arch x64 \
--build-installers \
--no-build-deps \
--no-build-nodejs \
-p:OnlyPackPlatformSpecificPackages=true \
-p:BuildRuntimeArchive=false \
-p:LinuxInstallerType=rpm \
-bl:artifacts/log/build.rpm.binlog \
$(_BuildArgs)
displayName: Build RPM installers
installNodeJs: false
installJdk: false
artifacts:
- name: Linux_x64_Packages
path: artifacts/packages/
Expand All @@ -247,9 +305,16 @@ jobs:
# Build Linux ARM
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
jobName: Linux_arm_build
jobDisplayName: "Build: Linux ARM"
agentOs: Linux
beforeBuild:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
buildArgs:
--arch arm
--pack
Expand All @@ -260,6 +325,7 @@ jobs:
-bl:artifacts/log/build.linux-arm.binlog
$(_BuildArgs)
installNodeJs: false
installJdk: false
artifacts:
- name: Linux_arm_Packages
path: artifacts/packages/
Expand All @@ -277,9 +343,16 @@ jobs:
# Build Linux ARM64
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
jobName: Linux_arm64_build
jobDisplayName: "Build: Linux ARM64"
agentOs: Linux
beforeBuild:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
buildArgs:
--arch arm64
--all
Expand All @@ -290,6 +363,7 @@ jobs:
-bl:artifacts/log/build.arm64.binlog
$(_BuildArgs)
installNodeJs: false
installJdk: false
artifacts:
- name: Linux_arm64_Packages
path: artifacts/packages/
Expand All @@ -307,9 +381,16 @@ jobs:
# Build Linux Musl x64
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
jobName: Linux_musl_x64_build
jobDisplayName: "Build: Linux Musl x64"
agentOs: Linux
beforeBuild:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
buildScript: ./dockerbuild.sh alpine
buildArgs:
--ci
Expand All @@ -323,6 +404,7 @@ jobs:
-bl:artifacts/log/build.musl.binlog
$(_BuildArgs)
installNodeJs: false
installJdk: false
artifacts:
- name: Linux_musl_x64_Packages
path: artifacts/packages/
Expand All @@ -337,12 +419,19 @@ jobs:
parameters:
inputName: Linux_musl_x64

# Build Linux Musl arm64
# Build Linux Musl ARM64
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
jobName: Linux_musl_arm64_build
jobDisplayName: "Build: Linux Musl ARM64"
agentOs: Linux
beforeBuild:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
buildScript: ./dockerbuild.sh ubuntu-alpine37
buildArgs:
--ci
Expand All @@ -356,6 +445,7 @@ jobs:
-bl:artifacts/log/build.musl.binlog
$(_BuildArgs)
installNodeJs: false
installJdk: false
artifacts:
- name: Linux_musl_arm64_Packages
path: artifacts/packages/
Expand All @@ -373,6 +463,8 @@ jobs:
# Test jobs
- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
condition: ne(variables['SkipTests'], 'true')
jobName: Windows_Test
jobDisplayName: "Test: Windows Server 2016 x64"
Expand All @@ -382,6 +474,10 @@ jobs:
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
afterBuild:
- powershell: "& ./build.ps1 -CI -NoBuild -Test /p:RunFlakyTests=true"
displayName: Run Flaky Tests
Expand All @@ -396,12 +492,18 @@ jobs:

- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
condition: ne(variables['SkipTests'], 'true')
jobName: Windows_Templates_Test
jobDisplayName: "Test: Templates - Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
- script: ./build.cmd -ci -all -pack
displayName: Build Repo
- script: ./src/ProjectTemplates/build.cmd -ci -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true /bl:artifacts/log/template.pack.binlog"
Expand All @@ -418,6 +520,8 @@ jobs:

- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
condition: ne(variables['SkipTests'], 'true')
jobName: MacOs_Test
jobDisplayName: "Test: macOS 10.13"
Expand All @@ -427,6 +531,10 @@ jobs:
beforeBuild:
- bash: "./eng/scripts/install-nginx-mac.sh"
displayName: Installing Nginx
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
afterBuild:
- bash: ./build.sh --ci --pack --no-build --no-restore --no-build-deps "/bl:artifacts/log/packages.pack.binlog"
displayName: Pack Packages (for Template tests)
Expand All @@ -445,6 +553,8 @@ jobs:

- template: jobs/default-build.yml
parameters:
dependsOn:
- WebJS_build
condition: ne(variables['SkipTests'], 'true')
jobName: Linux_Test
jobDisplayName: "Test: Ubuntu 16.04 x64"
Expand All @@ -456,6 +566,10 @@ jobs:
displayName: Installing Nginx
- bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p"
displayName: Increase inotify limit
- task: DownloadPipelineArtifact@2
inputs:
artifact: WebJS_Javascript
path: $(Build.SourcesDirectory)/src/Components/Web.JS/dist/
afterBuild:
- bash: ./build.sh --ci --pack --no-build --no-restore --no-build-deps "/bl:artifacts/log/packages.pack.binlog"
displayName: Pack Packages (for Template tests)
Expand Down Expand Up @@ -489,6 +603,10 @@ jobs:
chmod +x $HOME/bin/jq
echo "##vso[task.prependpath]$HOME/bin"
displayName: Install jq
- task: NodeTool@0
displayName: Install Node 10.x
inputs:
versionSpec: 10.x
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
Expand Down
3 changes: 1 addition & 2 deletions .azure/pipelines/helix-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ jobs:
steps:
- script: ./restore.sh -ci
displayName: Restore
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true -bl
- script: ./build.sh -ci --arch arm64 -test -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true -bl
displayName: Run build.sh helix arm64 target
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
installNodeJs: false
artifacts:
- name: Helix_arm64_logs
path: artifacts/logs/
Expand Down
6 changes: 5 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,18 @@ elseif ($Projects) {
}
# When adding new sub-group build flags, add them to this check.
elseif((-not $BuildNative) -and (-not $BuildManaged) -and (-not $BuildNodeJS) -and (-not $BuildInstallers) -and (-not $BuildJava)) {
Write-Warning "No default group of projects was specified, so building the 'managed' subsets of projects. Run ``build.cmd -help`` for more details."
Write-Warning "No default group of projects was specified, so building the 'managed' and its dependent subsets of projects. Run ``build.cmd -help`` for more details."

# This goal of this is to pick a sensible default for `build.cmd` with zero arguments.
# Now that we support subfolder invokations of build.cmd, we will be pushing to have build.cmd build everything (-all) by default

$BuildManaged = $true
}

if ($BuildManaged -and ($NoBuildNodeJS)) {
Write-Warning "Some managed projects that depend on NodeJS projects will be skipped since building NodeJS is disabled."
}

if ($BuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=true" }
if ($BuildManaged) { $MSBuildArguments += "/p:BuildManaged=true" }
if ($BuildNative) { $MSBuildArguments += "/p:BuildNative=true" }
Expand Down
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,18 @@ elif [ ! -z "$build_projects" ]; then
elif [ -z "$build_managed" ] && [ -z "$build_nodejs" ] && [ -z "$build_java" ] && [ -z "$build_native" ] && [ -z "$build_installers" ]; then
# This goal of this is to pick a sensible default for `build.sh` with zero arguments.
# We believe the most common thing our contributors will work on is C#, so if no other build group was picked, build the C# projects.
__warn "No default group of projects was specified, so building the 'managed' subset of projects. Run ``build.sh --help`` for more details."
__warn "No default group of projects was specified, so building the 'managed' and its dependent subset of projects. Run ``build.sh --help`` for more details."
build_managed=true
fi

if [ "$build_deps" = false ]; then
msbuild_args[${#msbuild_args[*]}]="-p:BuildProjectReferences=false"
fi

if [ "$build_nodejs" = false ] && [ "$build_managed" = true ]; then
__warn "Some managed projects that depend on NodeJS projects will be skipped since building NodeJS is disabled."
fi

# Only set these MSBuild properties if they were explicitly set by build parameters.
[ ! -z "$build_java" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildJava=$build_java"
[ ! -z "$build_native" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildNative=$build_native"
Expand Down
Loading