Skip to content

Commit c7709ec

Browse files
authored
Merge pull request #535 from SteveL-MSFT/createmsixbundle
Update build pipeline for creating msixbundle
2 parents f42d1fb + b896cd0 commit c7709ec

File tree

4 files changed

+36
-93
lines changed

4 files changed

+36
-93
lines changed

.pipelines/DSC-Official.yml

+15-26
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extends:
3636
WindowsHostVersion:
3737
Disk: Large
3838
Version: 2022
39-
Network: KS3 # this retricts network access to public upstream repositories
39+
Network: KS1 # note that this property is sticky so commenting out will use the previous set one
4040
# Currently can't be used as some NPM pkgs like tree-sitter-cli reach out to GitHub to get the actual zip pkg
4141
# Network: NetLock
4242
customTags: 'ES365AIMigrationTooling'
@@ -201,16 +201,20 @@ extends:
201201
dependsOn: BuildWin
202202
variables:
203203
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
204+
ob_sdl_tsa_configFile: '$(Build.SourcesDirectory)\DSC\.config\tsaoptions.json'
205+
ob_sdl_sbom_enabled: true
206+
ob_signing_setup_enabled: true
207+
ob_sdl_codeql_compiled_enabled: true
204208
pool:
205209
type: windows
206210
steps:
211+
- checkout: self
207212
- download: current
208213
artifact: drop_BuildAndSign_BuildWinx64
209214
patterns: '*.msix'
210215
- download: current
211216
artifact: drop_BuildAndSign_BuildWinarm64
212217
patterns: '*.msix'
213-
- checkout: self
214218
- pwsh: |
215219
Set-Location "$(Build.SourcesDirectory)/DSC"
216220
$null = New-Item -ItemType Directory -Path "./bin/msix" -Force -ErrorAction Ignore
@@ -221,25 +225,6 @@ extends:
221225
displayName: 'Create msixbundle'
222226
condition: succeeded()
223227
224-
- job: PublishSigned
225-
dependsOn: BuildWin
226-
variables:
227-
signOutPath: $[ dependencies.BuildWin.outputs['signOutPath.signOutPath'] ]
228-
ob_sdl_tsa_configFile: $(Build.SourcesDirectory)\DSC\.config\tsaoptions.json
229-
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
230-
ob_sdl_sbom_enabled: false
231-
ob_signing_setup_enabled: false
232-
ob_sdl_codeql_compiled_enabled: false
233-
pool:
234-
type: windows
235-
steps:
236-
- task: CopyFiles@2
237-
displayName: "Copy Files for 'PublishPipelineArtifact@1' publish task"
238-
inputs:
239-
SourceFolder: $(signOutPath)
240-
Contents: '**'
241-
TargetFolder: $(Build.ArtifactStagingDirectory)/signed
242-
243228
- job: BuildLinux
244229
dependsOn: SetPackageVersion
245230
variables:
@@ -382,12 +367,9 @@ extends:
382367
383368
- stage: Release
384369
dependsOn: BuildAndSign
370+
condition: ne(variables['Build.Reason'], 'Schedule')
385371
variables:
386372
PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
387-
ob_sdl_sbom_enabled: false
388-
ob_signing_setup_enabled: false
389-
ob_sdl_codeql_compiled_enabled: false
390-
drop: $(Pipeline.Workspace)/drop_build_main
391373
jobs:
392374
- job: Validation
393375
displayName: Manual validation
@@ -407,10 +389,17 @@ extends:
407389
pool:
408390
type: windows
409391
variables:
410-
ob_outputDirectory: '$(Build.SourcesDirectory)'
392+
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
393+
ob_sdl_sbom_enabled: false
394+
ob_signing_setup_enabled: false
395+
ob_sdl_codeql_compiled_enabled: false
396+
drop: $(Pipeline.Workspace)/drop_build_main
411397
steps:
412398
- download: current
413399
displayName: Download artifacts
400+
patterns: |
401+
'**/*.zip'
402+
'**/*.tar.gz'
414403
- task: GitHubRelease@1
415404
displayName: Create GitHub release
416405
inputs:

tree-sitter-dscexpression/build.ps1

+5-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if ($null -eq (Get-Command npm -ErrorAction Ignore)) {
2929
}
3030
}
3131

32-
npm install
32+
npm ci --omit:optional --force --registry https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/npm/registry/
3333

3434
#npm list tree-sitter-cli
3535
#if ($LASTEXITCODE -ne 0) {
@@ -46,10 +46,11 @@ if ($UpdatePackages) {
4646
rm ./package-lock.json
4747
rm -r ./node_modules
4848
npm cache clean --force
49-
npm logout
50-
vsts-npm-auth -config .npmrc -F -V
51-
npm install --force --verbose --registry https://pkgs.dev.azure.com/mseng/_packaging/OneESD-DevOps/npm/registry/
49+
# npm logout
50+
# vsts-npm-auth -config .npmrc -F -V
51+
npm install --omit:optional --force --verbose #--registry https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/npm/registry/
5252
}
5353

54+
Invoke-NativeCommand 'npx node-gyp configure'
5455
Invoke-NativeCommand 'npx tree-sitter generate --build'
5556
Invoke-NativeCommand 'npx tree-sitter test'

tree-sitter-dscexpression/package-lock.json

+11-58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tree-sitter-dscexpression/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
],
2323
"dependencies": {
2424
"gyp": "^0.3.0",
25-
"node-gyp-build": "^4.8.0",
26-
"node-addon-api": "^7.1.0",
27-
"node-gyp": "^10.2.0"
25+
"node-addon-api": "^7.1.1",
26+
"node-gyp": "^10.2.0",
27+
"node-gyp-build": "^4.8.2"
2828
},
2929
"devDependencies": {
30-
"prebuildify": "^6.0.0",
31-
"tree-sitter-cli": "^0.22.2"
30+
"prebuildify": "^6.0.1",
31+
"tree-sitter-cli": "^0.22.6"
3232
},
3333
"peerDependencies": {
3434
"tree-sitter": "^0.21.0"

0 commit comments

Comments
 (0)