Skip to content

Commit 1b55f78

Browse files
[ignore] Move to yml for release (#2191)
* move to yml * correct pool * env var * install invokebuild * FORCE * no test for now * whitespace * download to build directory * sources * help * help * idk * release * remove remove * number * TERMS * update script to get partially succeeded results and move to other build * logs * move-to-yml * no value * correct buildid * delete leftover docker build stuff * Remove debug code * Revert back to master
1 parent 1804af0 commit 1b55f78

11 files changed

+568
-265
lines changed

.vsts-ci/azure-pipelines-release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
# Don't download unneeded packages
5+
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
6+
value: 'true'
7+
# Improve performance by not sending telemetry
8+
- name: DOTNET_CLI_TELEMETRY_OPTOUT
9+
value: 'true'
10+
11+
trigger:
12+
batch: true
13+
branches:
14+
include:
15+
- master
16+
- legacy/1.x
17+
paths:
18+
exclude:
19+
- /.dependabot/*
20+
- /.poshchan/*
21+
- /.github/**/*
22+
- /.vscode/**/*
23+
- /.vsts-ci/misc-analysis.yml
24+
- /tools/**/*
25+
- .editorconfig
26+
- .gitattributes
27+
- .gitignore
28+
- /docs/**/*
29+
- /CHANGELOG.md
30+
- /CONTRIBUTING.md
31+
- /README.md
32+
- /LICENSE
33+
- /CODE_OF_CONDUCT.md
34+
35+
jobs:
36+
37+
- job: 'ReleaseBuild'
38+
displayName: 'Build release'
39+
pool:
40+
name: 'Package ES CodeHub Lab E'
41+
demands: DotNetFramework
42+
steps:
43+
- template: templates/release-general.yml
+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
steps:
2+
- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
3+
displayName: Set Build Name for Non-PR
4+
condition: ne(variables['Build.Reason'], 'PullRequest')
5+
6+
- pwsh: |
7+
Get-ChildItem -Path env:
8+
displayName: Capture environment
9+
condition: succeededOrFailed()
10+
11+
- task: PkgESSetupBuild@10
12+
displayName: 'Package ES - Setup Build'
13+
inputs:
14+
productName: vscode-powershell
15+
16+
- task: PowerShell@2
17+
displayName: 'Set environment variables for VSTS (Phase 1)'
18+
inputs:
19+
targetType: filePath
20+
filePath: ./tools/releaseBuild/setVstsVariables.ps1
21+
22+
- task: PowerShell@2
23+
displayName: 'Find PowerShellEditorServices build'
24+
env:
25+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
26+
inputs:
27+
targetType: filePath
28+
filePath: ./tools/releaseBuild/findPsesBuild.ps1
29+
30+
- task: DownloadBuildArtifacts@0
31+
displayName: 'Download Build Artifacts from PowerShell Editor Services'
32+
inputs:
33+
buildType: specific
34+
project: '8e2735c1-3674-408a-bcab-87f089ea29d5'
35+
pipeline: 1056
36+
buildVersionToDownload: specific
37+
buildId: '$(PSES_BUILDID)'
38+
downloadType: specific
39+
downloadPath: '$(Build.SourcesDirectory)'
40+
41+
- pwsh: |
42+
Install-Module InvokeBuild -Force
43+
Invoke-Build Release
44+
45+
- task: PublishTestResults@2
46+
inputs:
47+
testRunner: JUnit
48+
testResultsFiles: '**/test-results.xml'
49+
condition: succeededOrFailed()
50+
51+
- task: PkgESCodeSign@10
52+
displayName: 'CodeSign tools/releaseBuild/signing.xml'
53+
env:
54+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
55+
inputs:
56+
signConfigXml: tools/releaseBuild/signing.xml
57+
inPathRoot: '$(Build.ArtifactStagingDirectory)'
58+
outPathRoot: '$(Build.ArtifactStagingDirectory)\Signed'
59+
60+
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
61+
displayName: 'Component Detection'
62+
63+
- task: AntiMalware@3
64+
inputs:
65+
InputType: 'Basic'
66+
ScanType: 'CustomScan'
67+
FileDirPath: '$(Build.ArtifactStagingDirectory)'
68+
EnableServices: false
69+
SupportLogOnError: false
70+
TreatSignatureUpdateFailureAs: 'Warning'
71+
SignatureFreshness: 'UpToDate'
72+
TreatStaleSignatureAs: 'Error'
73+
74+
- task: PoliCheck@1
75+
condition: succeededOrFailed()
76+
inputs:
77+
targetType: F
78+
optionsFC: 0
79+
optionsXS: 0
80+
optionsPE: '1|2|3|4'
81+
optionsHMENABLE: 0
82+
optionsFTPATH: '$(Build.SourcesDirectory)\tools\terms\FileTypeSet.xml'
83+
# toolVersion: 5.8.2.1
84+
85+
- task: CredScan@2
86+
condition: succeededOrFailed()
87+
88+
# Publish results as artifacts
89+
- task: PublishSecurityAnalysisLogs@3
90+
condition: succeededOrFailed()
91+
inputs:
92+
ArtifactName: 'CodeAnalysisLogs'
93+
ArtifactType: 'Container'
94+
95+
# Publish to TSA server
96+
- task: TSAUpload@1
97+
condition: succeededOrFailed()
98+
continueOnError: true
99+
inputs:
100+
tsaVersion: 'TsaV2'
101+
codebase: 'Existing'
102+
tsaEnvironment: 'PROD'
103+
codeBaseName: 'PowerShell_PowerShellEditorServices_20190917'
104+
uploadAPIScan: false
105+
uploadBinSkim: false
106+
uploadCredScan: true
107+
uploadFortifySCA: false
108+
uploadFxCop: false
109+
uploadModernCop: false
110+
uploadPoliCheck: true
111+
uploadPREfast: false
112+
uploadRoslyn: false
113+
uploadTSLint: false
114+
uploadAsync: true
115+
116+
- task: PowerShell@1
117+
displayName: 'Upload artifacts'
118+
inputs:
119+
scriptType: inlineScript
120+
inlineScript: 'Write-Host "##vso[artifact.upload containerfolder=vscode-powershell;artifactname=vscode-powershell]$(System.ArtifactsDirectory)\Signed"'

tools/releaseBuild/Image/DockerFile

-34
This file was deleted.

tools/releaseBuild/Image/build.ps1

-14
This file was deleted.

tools/releaseBuild/Image/dockerInstall.psm1

-114
This file was deleted.

tools/releaseBuild/build.json

-15
This file was deleted.

tools/releaseBuild/findPsesBuild.ps1

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
$branch = [uri]::EscapeDataString($env:PSES_BRANCH)
2-
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch
32
$headers = @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"}
4-
$builds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers
5-
Write-Host "Got PSES_BRANCH: ${env:PSES_BRANCH}"
3+
4+
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch, "succeeded"
5+
$succeededBuilds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers
6+
Write-Host "Requested URL: $buildsUrl"
7+
Write-Host "Got response:`n$(ConvertTo-Json $succeededBuilds)"
8+
9+
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch, "partiallySucceeded"
10+
$partiallySucceededBuilds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers
611
Write-Host "Requested URL: $buildsUrl"
7-
Write-Host "Got response:`n$(ConvertTo-Json $builds)"
8-
Write-Host "setting PSES_BUILDID to $($builds.value[0].Id)"
9-
Write-Host "##vso[task.setvariable variable=PSES_BUILDID]$($builds.value[0].Id)"
12+
Write-Host "Got response:`n$(ConvertTo-Json $partiallySucceededBuilds)"
13+
14+
$builds = @(
15+
$succeededBuilds.value
16+
$partiallySucceededBuilds.value
17+
) | Sort-Object finishTime -Descending
18+
19+
Write-Host "Got PSES_BRANCH: ${env:PSES_BRANCH}"
20+
Write-Host "setting PSES_BUILDID to $($builds[0].Id)"
21+
Write-Host "##vso[task.setvariable variable=PSES_BUILDID]$($builds[0].Id)"

tools/releaseBuild/signing.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<SignConfigXML>
33
<job platform="" configuration="" dest="__OUTPATHROOT__\signed" jobname="vscode powershell" approvers="vigarg;gstolt">
4-
<file src="__INPATHROOT__\release\out\PowerShell-insiders.vsix" signType="Vsix"
4+
<file src="__INPATHROOT__\PowerShell-insiders.vsix" signType="100040160"
55
dest="__OUTPATHROOT__\PowerShell-insiders.vsix" />
6-
<file src="__INPATHROOT__\release\out\Install-VSCode.ps1" signType="Authenticode"
6+
<file src="__INPATHROOT__\Install-VSCode.ps1" signType="AuthenticodeFormer"
77
dest="__OUTPATHROOT__\Install-VSCode.ps1" />
88
</job>
99
</SignConfigXML>

0 commit comments

Comments
 (0)