Skip to content

Commit

Permalink
Merge pull request #535 from SteveL-MSFT/createmsixbundle
Browse files Browse the repository at this point in the history
Update build pipeline for creating msixbundle
  • Loading branch information
SteveL-MSFT authored Sep 4, 2024
2 parents f42d1fb + b896cd0 commit c7709ec
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 93 deletions.
41 changes: 15 additions & 26 deletions .pipelines/DSC-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extends:
WindowsHostVersion:
Disk: Large
Version: 2022
Network: KS3 # this retricts network access to public upstream repositories
Network: KS1 # note that this property is sticky so commenting out will use the previous set one
# Currently can't be used as some NPM pkgs like tree-sitter-cli reach out to GitHub to get the actual zip pkg
# Network: NetLock
customTags: 'ES365AIMigrationTooling'
Expand Down Expand Up @@ -201,16 +201,20 @@ extends:
dependsOn: BuildWin
variables:
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
ob_sdl_tsa_configFile: '$(Build.SourcesDirectory)\DSC\.config\tsaoptions.json'
ob_sdl_sbom_enabled: true
ob_signing_setup_enabled: true
ob_sdl_codeql_compiled_enabled: true
pool:
type: windows
steps:
- checkout: self
- download: current
artifact: drop_BuildAndSign_BuildWinx64
patterns: '*.msix'
- download: current
artifact: drop_BuildAndSign_BuildWinarm64
patterns: '*.msix'
- checkout: self
- pwsh: |
Set-Location "$(Build.SourcesDirectory)/DSC"
$null = New-Item -ItemType Directory -Path "./bin/msix" -Force -ErrorAction Ignore
Expand All @@ -221,25 +225,6 @@ extends:
displayName: 'Create msixbundle'
condition: succeeded()
- job: PublishSigned
dependsOn: BuildWin
variables:
signOutPath: $[ dependencies.BuildWin.outputs['signOutPath.signOutPath'] ]
ob_sdl_tsa_configFile: $(Build.SourcesDirectory)\DSC\.config\tsaoptions.json
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
ob_sdl_sbom_enabled: false
ob_signing_setup_enabled: false
ob_sdl_codeql_compiled_enabled: false
pool:
type: windows
steps:
- task: CopyFiles@2
displayName: "Copy Files for 'PublishPipelineArtifact@1' publish task"
inputs:
SourceFolder: $(signOutPath)
Contents: '**'
TargetFolder: $(Build.ArtifactStagingDirectory)/signed

- job: BuildLinux
dependsOn: SetPackageVersion
variables:
Expand Down Expand Up @@ -382,12 +367,9 @@ extends:
- stage: Release
dependsOn: BuildAndSign
condition: ne(variables['Build.Reason'], 'Schedule')
variables:
PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
ob_sdl_sbom_enabled: false
ob_signing_setup_enabled: false
ob_sdl_codeql_compiled_enabled: false
drop: $(Pipeline.Workspace)/drop_build_main
jobs:
- job: Validation
displayName: Manual validation
Expand All @@ -407,10 +389,17 @@ extends:
pool:
type: windows
variables:
ob_outputDirectory: '$(Build.SourcesDirectory)'
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
ob_sdl_sbom_enabled: false
ob_signing_setup_enabled: false
ob_sdl_codeql_compiled_enabled: false
drop: $(Pipeline.Workspace)/drop_build_main
steps:
- download: current
displayName: Download artifacts
patterns: |
'**/*.zip'
'**/*.tar.gz'
- task: GitHubRelease@1
displayName: Create GitHub release
inputs:
Expand Down
9 changes: 5 additions & 4 deletions tree-sitter-dscexpression/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if ($null -eq (Get-Command npm -ErrorAction Ignore)) {
}
}

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

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

Invoke-NativeCommand 'npx node-gyp configure'
Invoke-NativeCommand 'npx tree-sitter generate --build'
Invoke-NativeCommand 'npx tree-sitter test'
69 changes: 11 additions & 58 deletions tree-sitter-dscexpression/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tree-sitter-dscexpression/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
],
"dependencies": {
"gyp": "^0.3.0",
"node-gyp-build": "^4.8.0",
"node-addon-api": "^7.1.0",
"node-gyp": "^10.2.0"
"node-addon-api": "^7.1.1",
"node-gyp": "^10.2.0",
"node-gyp-build": "^4.8.2"
},
"devDependencies": {
"prebuildify": "^6.0.0",
"tree-sitter-cli": "^0.22.2"
"prebuildify": "^6.0.1",
"tree-sitter-cli": "^0.22.6"
},
"peerDependencies": {
"tree-sitter": "^0.21.0"
Expand Down

0 comments on commit c7709ec

Please sign in to comment.