Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
ThreadJob/.pipelines/threadjobs-official.yml at main · PowerShell/ThreadJob · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
PowerShell
ThreadJob
Repository navigation
Code
Issues
14
(14)
Pull requests
10
(10)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
ThreadJob
/
.pipelines
/
threadjobs-official.yml
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
213 lines (207 loc) · 8.2 KB
main
Breadcrumbs
ThreadJob
/
.pipelines
/
threadjobs-official.yml
Copy path
Top
File metadata and controls
Code
Blame
213 lines (207 loc) · 8.2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name
:
ThreadJob-ModuleBuild-$(Build.BuildId)
trigger
:
none
pr
:
none
schedules
:
-
cron
:
'
0 3 * * 1
'
displayName
:
Weekly Build
branches
:
include
:
-
onebranch-pipelines
always
:
true
parameters
:
-
name
:
'
publishOfficialToPowerShellGallery
'
displayName
:
'
Publish official module to PowerShell gallery
'
type
:
boolean
default
:
false
-
name
:
'
publishProxyToPowerShellGallery
'
displayName
:
'
Publish proxy module to PowerShell gallery
'
type
:
boolean
default
:
false
-
name
:
ReleaseEnvironment
displayName
:
'
Release environment
'
type
:
string
default
:
'
Production
'
variables
:
BuildConfiguration
:
Release
DOTNET_NOLOGO
:
true
DOTNET_GENERATE_ASPNET_CERTIFICATE
:
false
DOTNET_CLI_TELEMETRY_OPTOUT
:
1
POWERSHELL_TELEMETRY_OPTOUT
:
1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE
:
1
WindowsContainerImage
:
onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
resources
:
repositories
:
-
repository
:
templates
type
:
git
name
:
OneBranch.Pipelines/GovernedTemplates
ref
:
refs/heads/main
extends
:
#
https://aka.ms/obpipelines/templates
template
:
v2/OneBranch.Official.CrossPlat.yml@templates
parameters
:
release
:
category
:
NonAzure
featureFlags
:
WindowsHostVersion
:
Version
:
2022
Network
:
Netlock
globalSdl
:
#
https://aka.ms/obpipelines/sdl
asyncSdl
:
enabled
:
true
forStages
:
[build]
#
credscan:
#
enabled: true
#
scanfolder: $(Build.SourcesDirectory)
#
suppressionsFile: $(Build.SourcesDirectory)\.config\suppress.json
stages
:
-
stage
:
build
jobs
:
-
job
:
main
templateContext
:
sdl
:
codeSignValidation
:
targetPathExclusionPattern
:
\"^(?!.*\\.nupkg$).*\"
displayName
:
Build package
pool
:
type
:
windows
variables
:
-
name
:
ob_outputDirectory
value
:
'
$(Build.ArtifactStagingDirectory)
'
-
name
:
ob_sdl_sbom_enabled
value
:
true
#
- name: ob_sdl_credscan_suppressionsFile
#
value: $(Build.SourcesDirectory)\.config\suppress.json
steps
:
-
pwsh
:
|
Write-Verbose -Verbose $(Build.SourcesDirectory)
Get-ChildItem $(Build.SourcesDirectory) -Recurse -File -Name | Write-Verbose -Verbose
$manifestData = Import-PowerShellDataFile -Path src/Microsoft.PowerShell.ThreadJob.psd1
$moduleVersion = $manifestData.ModuleVersion
Write-Host "##vso[task.setvariable variable=version;isOutput=true]$moduleVersion"
$proxyManifestData = Import-PowerShellDataFile -Path src/ThreadJob/ThreadJob.psd1
$proxyModuleVersion = $proxyManifestData.ModuleVersion
Write-Host "##vso[task.setvariable variable=proxyVersion;isOutput=true]$proxyModuleVersion"
name: package
displayName: Get version from project properties
-
task
:
onebranch.pipeline.version@1
displayName
:
Set OneBranch version
inputs
:
system
:
Custom
customVersion
:
$(package.version)
-
task
:
UseDotNet@2
displayName
:
Use .NET SDK
inputs
:
packageType
:
sdk
useGlobalJson
:
true
-
pwsh
:
|
Get-ChildItem | Write-Verbose -Verbose
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet -MinimumVersion 1.0.5
.\build.ps1 -clean -Build -BuildConfiguration Release -BuildFramework netstandard2.0
displayName: Build
#
Add signing for all files for now.
-
task
:
onebranch.pipeline.signing@1
displayName
:
Sign 1st-party files
inputs
:
command
:
sign
signing_profile
:
external_distribution
search_root
:
$(Build.SourcesDirectory)/out
files_to_sign
:
|
**/*.psd1;
**/*.ps1xml;
**/*.psm1;
**/Microsoft.PowerShell.*.dll;
-
pwsh
:
|
Get-ChildItem | Write-Verbose -Verbose
Write-Verbose -Verbose -Message "Install Microsoft.PowerShell.ThreadJob module"
Copy-Item -Path $(Build.SourcesDirectory)/out/Microsoft.PowerShell.ThreadJob -Destination ($env:PSModulePath -split ';')[0] -Recurse -Force
Write-Verbose -Verbose -Message "Test ThreadJob module manifest"
Test-ModuleManifest -Path $(Build.SourcesDirectory)/out/ThreadJob/ThreadJob.psd1
.\build.ps1 -Publish
Write-Verbose -Verbose ((Get-Item .).FullName)
Write-Verbose -Verbose $(Build.SourcesDirectory)
Get-ChildItem $(Build.SourcesDirectory) -Recurse -File -Name | Write-Verbose -Verbose
displayName: Package module
-
task
:
onebranch.pipeline.signing@1
displayName
:
Sign NuGet package
inputs
:
command
:
sign
signing_profile
:
external_distribution
search_root
:
$(Build.SourcesDirectory)
files_to_sign
:
"
**/*.nupkg
"
-
pwsh
:
|
Get-ChildItem -Path $(Build.SourcesDirectory)/out -Filter '*.nupkg' -Recurse
| ForEach-Object {
Write-Verbose -Verbose "Copying $($_.FullName) to $(ob_outputDirectory)"
Copy-Item -Path $_.FullName -Destination $(ob_outputDirectory) -Force
}
Get-ChildItem -Path $(ob_outputDirectory) -Recurse -File -Name | Write-Verbose -Verbose
displayName: Upload Signed Nupkgs
-
stage
:
release_official_MicrosoftPowerShellThreadJob_module
displayName
:
release official
variables
:
ob_release_environment
:
${{ parameters.ReleaseEnvironment }}
drop
:
$(Pipeline.Workspace)/drop_build_main
version
:
$[ stageDependencies.build.main.outputs['package.version'] ]
dependsOn
:
[build]
condition
:
${{ parameters.publishOfficialToPowerShellGallery }}
jobs
:
-
job
:
publish
templateContext
:
inputs
:
-
input
:
pipelineArtifact
artifactName
:
drop_build_main
displayName
:
Publish to PowerShell Gallery
pool
:
type
:
release
os
:
windows
variables
:
-
group
:
ThreadJob_Gallery_API
steps
:
-
task
:
PowerShell@2
inputs
:
targetType
:
'
inline
'
script
:
|
Get-ChildItem "$(Pipeline.Workspace)/" -Recurse | Write-Verbose -Verbose
displayName
:
Find Nupkg
-
task
:
NuGetCommand@2
displayName
:
Push Official ThreadJob module to PSGallery
inputs
:
command
:
push
packagesToPush
:
'
$(Pipeline.Workspace)/Microsoft.PowerShell.ThreadJob.$(version).nupkg
'
nuGetFeedType
:
external
publishFeedCredentials
:
'
PSThreadJob-PSGalleryPush
'
-
stage
:
release_proxy_ThreadJob_module
displayName
:
release proxy
variables
:
ob_release_environment
:
${{ parameters.ReleaseEnvironment }}
drop
:
$(Pipeline.Workspace)/drop_build_main
version
:
$[ stageDependencies.build.main.outputs['package.proxyVersion'] ]
dependsOn
:
[build]
condition
:
${{ parameters.publishProxyToPowerShellGallery }}
jobs
:
-
job
:
publish
templateContext
:
inputs
:
-
input
:
pipelineArtifact
artifactName
:
drop_build_main
displayName
:
Publish to PowerShell Gallery
pool
:
type
:
release
os
:
windows
variables
:
-
group
:
ThreadJob_Gallery_API
steps
:
-
task
:
PowerShell@2
inputs
:
targetType
:
'
inline
'
script
:
|
Get-ChildItem "$(Pipeline.Workspace)/" -Recurse | Write-Verbose -Verbose
displayName
:
Find Nupkg
-
task
:
NuGetCommand@2
displayName
:
Push Proxy ThreadJob module to PSGallery
inputs
:
command
:
push
packagesToPush
:
'
$(Pipeline.Workspace)/ThreadJob.$(version).nupkg
'
nuGetFeedType
:
external
publishFeedCredentials
:
'
PSThreadJob-PSGalleryPush
'
You can’t perform that action at this time.