Skip to content

Commit 75d3138

Browse files
[Ignore] Move to yml legacy (PowerShell#2192)
* initial release yml * update path * move build to artifact * rest of changes * temp for building * specific artifact * move back to legacy/1.x * single
1 parent 329696b commit 75d3138

11 files changed

+567
-263
lines changed

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

Lines changed: 43 additions & 0 deletions
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
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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: single
39+
artifactName: 'PowerShellEditorServices'
40+
downloadPath: '$(Build.SourcesDirectory)'
41+
42+
- pwsh: |
43+
Install-Module InvokeBuild -Force
44+
Invoke-Build Release
45+
46+
- task: PublishTestResults@2
47+
inputs:
48+
testRunner: JUnit
49+
testResultsFiles: '**/test-results.xml'
50+
condition: succeededOrFailed()
51+
52+
- task: PkgESCodeSign@10
53+
displayName: 'CodeSign tools/releaseBuild/signing.xml'
54+
env:
55+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
56+
inputs:
57+
signConfigXml: tools/releaseBuild/signing.xml
58+
inPathRoot: '$(Build.ArtifactStagingDirectory)'
59+
outPathRoot: '$(Build.ArtifactStagingDirectory)\Signed'
60+
61+
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
62+
displayName: 'Component Detection'
63+
64+
- task: AntiMalware@3
65+
inputs:
66+
InputType: 'Basic'
67+
ScanType: 'CustomScan'
68+
FileDirPath: '$(Build.ArtifactStagingDirectory)'
69+
EnableServices: false
70+
SupportLogOnError: false
71+
TreatSignatureUpdateFailureAs: 'Warning'
72+
SignatureFreshness: 'UpToDate'
73+
TreatStaleSignatureAs: 'Error'
74+
75+
- task: PoliCheck@1
76+
condition: succeededOrFailed()
77+
inputs:
78+
targetType: F
79+
optionsFC: 0
80+
optionsXS: 0
81+
optionsPE: '1|2|3|4'
82+
optionsHMENABLE: 0
83+
optionsFTPATH: '$(Build.SourcesDirectory)\tools\terms\FileTypeSet.xml'
84+
# toolVersion: 5.8.2.1
85+
86+
- task: CredScan@2
87+
condition: succeededOrFailed()
88+
89+
# Publish results as artifacts
90+
- task: PublishSecurityAnalysisLogs@3
91+
condition: succeededOrFailed()
92+
inputs:
93+
ArtifactName: 'CodeAnalysisLogs'
94+
ArtifactType: 'Container'
95+
96+
# Publish to TSA server
97+
- task: TSAUpload@1
98+
condition: succeededOrFailed()
99+
continueOnError: true
100+
inputs:
101+
tsaVersion: 'TsaV2'
102+
codebase: 'Existing'
103+
tsaEnvironment: 'PROD'
104+
codeBaseName: 'PowerShell_PowerShellEditorServices_20190917'
105+
uploadAPIScan: false
106+
uploadBinSkim: false
107+
uploadCredScan: true
108+
uploadFortifySCA: false
109+
uploadFxCop: false
110+
uploadModernCop: false
111+
uploadPoliCheck: true
112+
uploadPREfast: false
113+
uploadRoslyn: false
114+
uploadTSLint: false
115+
uploadAsync: true
116+
117+
- task: PowerShell@1
118+
displayName: 'Upload artifacts'
119+
inputs:
120+
scriptType: inlineScript
121+
inlineScript: 'Write-Host "##vso[artifact.upload containerfolder=vscode-powershell;artifactname=vscode-powershell]$(System.ArtifactsDirectory)\Signed"'

tools/releaseBuild/Image/DockerFile

Lines changed: 0 additions & 34 deletions
This file was deleted.

tools/releaseBuild/Image/build.ps1

Lines changed: 0 additions & 13 deletions
This file was deleted.

tools/releaseBuild/Image/dockerInstall.psm1

Lines changed: 0 additions & 114 deletions
This file was deleted.

tools/releaseBuild/build.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

tools/releaseBuild/findPsesBuild.ps1

Lines changed: 18 additions & 6 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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" />
66
</job>
77
</SignConfigXML>

0 commit comments

Comments
 (0)