-
Notifications
You must be signed in to change notification settings - Fork 36
Change CI and release build to use hosted images for windows #47
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
adityapatwardhan
merged 10 commits into
PowerShell:master
from
adityapatwardhan:RefactorCIBuild
Feb 12, 2020
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4c631f4
Update CI to use hosted agent
adityapatwardhan 2803cc7
Remove docker dependency from release build
adityapatwardhan c7bd8bb
Yaml fixes
adityapatwardhan c06bb0b
Fix typos
adityapatwardhan 63c976f
Yaml fixes
adityapatwardhan 67919d3
Try fixing yaml
adityapatwardhan a25fcad
Fix yaml multiline block
adityapatwardhan f780c80
Fix artifact container name
adityapatwardhan a19bfb1
Fix artifact container name to match artifact name
adityapatwardhan 284debc
Address comments
adityapatwardhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
steps: | ||
- powershell: | | ||
choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' | ||
displayName: Install cmake | ||
condition: succeeded() | ||
- powershell: | | ||
$vsPath = ${Env:ProgramFiles(x86)} + '\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin' | ||
Write-Host "##vso[task.prependpath]$vsPath" | ||
displayName: Set Visual Studio Path | ||
condition: succeeded() | ||
- powershell: | | ||
$cmakeBinPath = "$env:ProgramFiles\CMake\bin\" | ||
if(Test-Path $cmakeBinPath) { $env:Path = "$cmakeBinPath;$env:PATH" } else { throw "CMake not installed under $cmakeBinPath" } | ||
$(Build.SourcesDirectory)\tools\releaseBuild\PowerShellNative.ps1 -RepoRoot $(Build.SourcesDirectory) -TargetLocation "$(System.ArtifactsDirectory)\Packages" -Arch $(ARCHITECTURE) -Configuration Release -Symbols | ||
displayName: Start build - $(ARCHITECTURE) | ||
condition: succeeded() | ||
- powershell: | | ||
Write-Host "##vso[artifact.upload containerfolder=release;artifactname=release]$(System.ArtifactsDirectory)\Packages\$(ARCHITECTURE)-symbols.zip" | ||
displayName: Upload artifacts | ||
condition: succeeded() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
steps: | ||
- task: PkgESSetupBuild@10 | ||
displayName: 'Initialize build' | ||
env: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
inputs: | ||
useDfs: false | ||
productName: PowerShellCore | ||
branchVersion: true | ||
disableWorkspace: true | ||
disableBuildTools: true | ||
disableNugetPack: true | ||
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual')) | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
inputs: | ||
buildType: current | ||
artifactName: release | ||
|
||
- powershell: | | ||
$zipFilePath = '$(System.ArtifactsDirectory)\release\$(ARCHITECTURE)-symbols.zip' | ||
Get-ChildItem $zipFilePath -Verbose | ||
|
||
Expand-Archive $zipFilePath -Destination '$(System.ArtifactsDirectory)\Expanded' -Force | ||
|
||
$vstsCommandString = "vso[task.setvariable variable=Symbols]$(System.ArtifactsDirectory)\Expanded" | ||
Write-Host "sending " + $vstsCommandString | ||
Write-Host "##$vstsCommandString" | ||
displayName: Expand artifact $(ARCHITECTURE)-symbols.zip | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Update Signing Xml' | ||
inputs: | ||
targetType: filePath | ||
filePath: $(Build.SourcesDirectory)/tools/releaseBuild/updateSigning.ps1 | ||
|
||
- task: PkgESCodeSign@10 | ||
displayName: 'CodeSign $(ARCHITECTURE)' | ||
env: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
inputs: | ||
signConfigXml: '$(Build.SourcesDirectory)\tools\releaseBuild\signing.xml' | ||
inPathRoot: '$(Symbols)' | ||
outPathRoot: '$(Symbols)\Signed' | ||
condition: ne(variables['SKIP_SIGNING'], 'True') | ||
|
||
- powershell: | | ||
Compress-Archive -Path '$(Symbols)\Signed\*' -DestinationPath '$(Symbols)\Signed\win-$(ARCHITECTURE).zip' | ||
displayName: Compress signed binaries | ||
condition: ne(variables['SKIP_SIGNING'], 'True') | ||
|
||
- powershell: | | ||
Get-ChildItem -Path '$(Symbols)\*' -Recurse | Copy-Item -Destination '$(Symbols)\Signed' -Force -Verbose | ||
displayName: Copy unsigned binaries as signing is skipped | ||
condition: eq(variables['SKIP_SIGNING'], 'True') | ||
|
||
- template: uploadArtifact.yml | ||
parameters: | ||
artifactPath: '$(Symbols)\Signed' | ||
artifactFilter: 'win-*.zip' | ||
artifactName: 'signed' | ||
|
||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3 | ||
displayName: 'Run MpCmdRun.exe' | ||
|
||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | ||
displayName: 'Component Detection' | ||
inputs: | ||
sourceScanPath: '$(Build.SourcesDirectory)' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.