forked from PowerShell/vscode-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
1 parent
329696b
commit 75d3138
Showing
11 changed files
with
567 additions
and
263 deletions.
There are no files selected for viewing
This file contains 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,43 @@ | ||
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr) | ||
|
||
variables: | ||
# Don't download unneeded packages | ||
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE | ||
value: 'true' | ||
# Improve performance by not sending telemetry | ||
- name: DOTNET_CLI_TELEMETRY_OPTOUT | ||
value: 'true' | ||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- master | ||
- legacy/1.x | ||
paths: | ||
exclude: | ||
- /.dependabot/* | ||
- /.poshchan/* | ||
- /.github/**/* | ||
- /.vscode/**/* | ||
- /.vsts-ci/misc-analysis.yml | ||
- /tools/**/* | ||
- .editorconfig | ||
- .gitattributes | ||
- .gitignore | ||
- /docs/**/* | ||
- /CHANGELOG.md | ||
- /CONTRIBUTING.md | ||
- /README.md | ||
- /LICENSE | ||
- /CODE_OF_CONDUCT.md | ||
|
||
jobs: | ||
|
||
- job: 'ReleaseBuild' | ||
displayName: 'Build release' | ||
pool: | ||
name: 'Package ES CodeHub Lab E' | ||
demands: DotNetFramework | ||
steps: | ||
- template: templates/release-general.yml |
This file contains 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,121 @@ | ||
steps: | ||
- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))" | ||
displayName: Set Build Name for Non-PR | ||
condition: ne(variables['Build.Reason'], 'PullRequest') | ||
|
||
- pwsh: | | ||
Get-ChildItem -Path env: | ||
displayName: Capture environment | ||
condition: succeededOrFailed() | ||
|
||
- task: PkgESSetupBuild@10 | ||
displayName: 'Package ES - Setup Build' | ||
inputs: | ||
productName: vscode-powershell | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Set environment variables for VSTS (Phase 1)' | ||
inputs: | ||
targetType: filePath | ||
filePath: ./tools/releaseBuild/setVstsVariables.ps1 | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Find PowerShellEditorServices build' | ||
env: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
inputs: | ||
targetType: filePath | ||
filePath: ./tools/releaseBuild/findPsesBuild.ps1 | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download Build Artifacts from PowerShell Editor Services' | ||
inputs: | ||
buildType: specific | ||
project: '8e2735c1-3674-408a-bcab-87f089ea29d5' | ||
pipeline: 1056 | ||
buildVersionToDownload: specific | ||
buildId: '$(PSES_BUILDID)' | ||
downloadType: single | ||
artifactName: 'PowerShellEditorServices' | ||
downloadPath: '$(Build.SourcesDirectory)' | ||
|
||
- pwsh: | | ||
Install-Module InvokeBuild -Force | ||
Invoke-Build Release | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testRunner: JUnit | ||
testResultsFiles: '**/test-results.xml' | ||
condition: succeededOrFailed() | ||
|
||
- task: PkgESCodeSign@10 | ||
displayName: 'CodeSign tools/releaseBuild/signing.xml' | ||
env: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
inputs: | ||
signConfigXml: tools/releaseBuild/signing.xml | ||
inPathRoot: '$(Build.ArtifactStagingDirectory)' | ||
outPathRoot: '$(Build.ArtifactStagingDirectory)\Signed' | ||
|
||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | ||
displayName: 'Component Detection' | ||
|
||
- task: AntiMalware@3 | ||
inputs: | ||
InputType: 'Basic' | ||
ScanType: 'CustomScan' | ||
FileDirPath: '$(Build.ArtifactStagingDirectory)' | ||
EnableServices: false | ||
SupportLogOnError: false | ||
TreatSignatureUpdateFailureAs: 'Warning' | ||
SignatureFreshness: 'UpToDate' | ||
TreatStaleSignatureAs: 'Error' | ||
|
||
- task: PoliCheck@1 | ||
condition: succeededOrFailed() | ||
inputs: | ||
targetType: F | ||
optionsFC: 0 | ||
optionsXS: 0 | ||
optionsPE: '1|2|3|4' | ||
optionsHMENABLE: 0 | ||
optionsFTPATH: '$(Build.SourcesDirectory)\tools\terms\FileTypeSet.xml' | ||
# toolVersion: 5.8.2.1 | ||
|
||
- task: CredScan@2 | ||
condition: succeededOrFailed() | ||
|
||
# Publish results as artifacts | ||
- task: PublishSecurityAnalysisLogs@3 | ||
condition: succeededOrFailed() | ||
inputs: | ||
ArtifactName: 'CodeAnalysisLogs' | ||
ArtifactType: 'Container' | ||
|
||
# Publish to TSA server | ||
- task: TSAUpload@1 | ||
condition: succeededOrFailed() | ||
continueOnError: true | ||
inputs: | ||
tsaVersion: 'TsaV2' | ||
codebase: 'Existing' | ||
tsaEnvironment: 'PROD' | ||
codeBaseName: 'PowerShell_PowerShellEditorServices_20190917' | ||
uploadAPIScan: false | ||
uploadBinSkim: false | ||
uploadCredScan: true | ||
uploadFortifySCA: false | ||
uploadFxCop: false | ||
uploadModernCop: false | ||
uploadPoliCheck: true | ||
uploadPREfast: false | ||
uploadRoslyn: false | ||
uploadTSLint: false | ||
uploadAsync: true | ||
|
||
- task: PowerShell@1 | ||
displayName: 'Upload artifacts' | ||
inputs: | ||
scriptType: inlineScript | ||
inlineScript: 'Write-Host "##vso[artifact.upload containerfolder=vscode-powershell;artifactname=vscode-powershell]$(System.ArtifactsDirectory)\Signed"' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,9 +1,21 @@ | ||
$branch = [uri]::EscapeDataString($env:PSES_BRANCH) | ||
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch | ||
$headers = @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"} | ||
$builds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers | ||
Write-Host "Got PSES_BRANCH: ${env:PSES_BRANCH}" | ||
|
||
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch, "succeeded" | ||
$succeededBuilds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers | ||
Write-Host "Requested URL: $buildsUrl" | ||
Write-Host "Got response:`n$(ConvertTo-Json $succeededBuilds)" | ||
|
||
$buildsUrl = $env:VSTS_PSES_URL_TEMPLATE -f $branch, "partiallySucceeded" | ||
$partiallySucceededBuilds = Invoke-RestMethod -ContentType application/json -Uri $buildsUrl -Headers $headers | ||
Write-Host "Requested URL: $buildsUrl" | ||
Write-Host "Got response:`n$(ConvertTo-Json $builds)" | ||
Write-Host "setting PSES_BUILDID to $($builds.value[0].Id)" | ||
Write-Host "##vso[task.setvariable variable=PSES_BUILDID]$($builds.value[0].Id)" | ||
Write-Host "Got response:`n$(ConvertTo-Json $partiallySucceededBuilds)" | ||
|
||
$builds = @( | ||
$succeededBuilds.value | ||
$partiallySucceededBuilds.value | ||
) | Sort-Object finishTime -Descending | ||
|
||
Write-Host "Got PSES_BRANCH: ${env:PSES_BRANCH}" | ||
Write-Host "setting PSES_BUILDID to $($builds[0].Id)" | ||
Write-Host "##vso[task.setvariable variable=PSES_BUILDID]$($builds[0].Id)" |
This file contains 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<SignConfigXML> | ||
<job platform="" configuration="" dest="__OUTPATHROOT__\signed" jobname="vscode powershell" approvers="vigarg;gstolt"> | ||
<file src="__INPATHROOT__\release\out\PowerShell-insiders.vsix" signType="Vsix" | ||
<file src="__INPATHROOT__\PowerShell-insiders.vsix" signType="100040160" | ||
dest="__OUTPATHROOT__\PowerShell-insiders.vsix" /> | ||
</job> | ||
</SignConfigXML> |
Oops, something went wrong.