-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathnightly.yml
More file actions
106 lines (106 loc) · 4.23 KB
/
nightly.yml
File metadata and controls
106 lines (106 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: Codeql.Enabled
value: true
schedules:
- cron: 0 0 * * *
branches:
include:
- main
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: CustomPipelineTemplates
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
trigger: none
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@CustomPipelineTemplates
parameters:
pool:
name: VSEng-MicroBuildVSStable
stages:
- stage: Build
jobs:
- job: Job_1
displayName: Agent job 1
templateContext:
mb:
signing:
enabled: true
signType: real
signWithProd: true
zipSources: false
feedSource: 'https://mseng.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
outputs:
- output: pipelineArtifact
artifactName: vsix
targetPath: $(Build.ArtifactStagingDirectory)
displayName: "Publish Artifact: vsix"
steps:
- checkout: self
clean: true
fetchTags: false
- task: NodeTool@0
displayName: Use Node 20.x
inputs:
versionSpec: 20.x
- task: Npm@1
displayName: npm install
inputs:
verbose: false
- task: CmdLine@2
displayName: Replace AI Key
inputs:
script: npx json@9.0.6 -I -f package.json -e "this.aiKey=\"%AI_KEY%\""
- task: PowerShell@2
displayName: update version in package json
inputs:
targetType: inline
script: |-
node ./scripts/prepare-nightly-build.js
Move-Item -Path "./package.insiders.json" -Destination "./package.json" -Force
- task: CmdLine@2
displayName: VSCE package --pre-release
inputs:
script: npx @vscode/vsce@latest package --pre-release -o extension.vsix
### Copy files for APIScan
- task: CopyFiles@2
displayName: "Copy Files for APIScan"
inputs:
Contents: "*.vsix"
TargetFolder: $(Agent.TempDirectory)/APIScanFiles
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
### Run latest version of APIScan listed at https://www.1eswiki.com/wiki/APIScan_Build_Task
- task: APIScan@2
displayName: Run APIScan
inputs:
softwareFolder: $(Agent.TempDirectory)/APIScanFiles
softwareName: "vscode-java-pack"
softwareVersionNum: "$(Build.BuildId)"
isLargeApp: false
toolVersion: "Latest"
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
env:
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
- script: npx @vscode/vsce@latest generate-manifest -i extension.vsix -o extension.manifest
displayName: 'Generate extension manifest'
- script: copy extension.manifest extension.signature.p7s
displayName: 'Prepare manifest for signing'
- task: CmdLine@2
displayName: Sign extension
inputs:
script: dotnet %MBSIGN_APPFOLDER%/ddsignfiles.dll /file:extension.signature.p7s /certs:4014052
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- task: CopyFiles@2
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
inputs:
Contents: |
extension.vsix
extension.manifest
extension.signature.p7s
TargetFolder: $(Build.ArtifactStagingDirectory)