Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Dependency to Allow Linux Build and Added OneBranch Pipeline #41

Closed
wants to merge 207 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
15fbbda
Initial commit
PaulHigin Jan 18, 2018
99bd8fc
Add files via upload
PaulHigin Jan 18, 2018
94de3f4
Merge pull request #1 from PaulHigin/PaulHigin-ThreadJob-Initial
PaulHigin Jan 22, 2018
383698d
Update README.md
PaulHigin Jan 24, 2018
e22a79e
Change to initialize job runspace only when job is started. Also cle…
PaulHigin Feb 6, 2018
53393db
Added test left out in original change
PaulHigin Feb 6, 2018
39d5efe
Merge pull request #7 from PaulHigin/fix-runspace-cleanup
PaulHigin Feb 6, 2018
34fd695
Remove platform specific binaries
PaulHigin Feb 6, 2018
5beba6c
Merge pull request #8 from PaulHigin/remove-platform-bins
PaulHigin Feb 6, 2018
c9b9fbb
Added test for Receive-Job -AutoRemoveJob
PaulHigin Feb 7, 2018
9a221c8
Merge pull request #9 from PaulHigin/added-test
PaulHigin Feb 7, 2018
bb4d179
Added support for Using keyword
PaulHigin Jun 19, 2018
c25fffe
Fixed method accessibility
PaulHigin Jun 19, 2018
dfd4cd1
Changed file encoding to UTF-8
PaulHigin Jun 19, 2018
0ff22e2
ThreadJob now derives from Job2 so that it can properly handle termin…
PaulHigin Jun 19, 2018
b5eb2fe
New tests and some clean up
PaulHigin Jun 20, 2018
7f81f28
Addresses CR comments
PaulHigin Jun 20, 2018
be8d8ed
Merge pull request #12 from PaulHigin/add-using-support
PaulHigin Jun 21, 2018
1a3e365
Updated version for publishing. Also merged contribution to enable i…
PaulHigin Jun 21, 2018
610c9c1
Merge pull request #13 from PaulHigin/fixup-for-publish
PaulHigin Jun 21, 2018
474a16b
Removed InformationStream change because it is not compatible withdow…
PaulHigin Jun 21, 2018
6e3a653
Merge pull request #15 from PaulHigin/fix-downlevel-break
PaulHigin Jun 21, 2018
7fd29fe
Added support for Windows CL support
PaulHigin Jun 29, 2018
1d22682
Merge pull request #17 from PaulHigin/add-cl-check
PaulHigin Jun 29, 2018
050767a
Remove unwanted validation of ArgumentList param
jazzdelightsme Aug 1, 2018
229f8a5
Fix StrictMode test errors: array-ify empty collections
jazzdelightsme Aug 1, 2018
384cf02
Merge pull request #21 from jazzdelightsme/user/danthom/fixStrictMode…
PaulHigin Aug 6, 2018
b05bd42
Merge pull request #19 from jazzdelightsme/user/danthom/removeArgList…
PaulHigin Aug 6, 2018
211f60b
Update version to 1.1.2
PaulHigin Aug 14, 2018
6539e3e
Merge pull request #23 from PaulHigin/update-version-2
PaulHigin Aug 14, 2018
9b523f4
additional example
iricigor Oct 16, 2018
522fcaa
installing section
iricigor Oct 16, 2018
85fce34
testing PR
iricigor Oct 16, 2018
46b9a76
Merge pull request #1 from iricigor/iricigor-patch-1
iricigor Oct 16, 2018
a9a2643
Enlarge ThrottleLimit to 1000000.
coin8086 Jan 30, 2019
62b3611
Merge pull request #28 from coin8086/ThrottleLimit
PaulHigin Mar 7, 2019
fb55e22
Merge pull request #27 from iricigor/master
PaulHigin Mar 7, 2019
502df3a
Add system lock down check to -File argument file path, so that polic…
PaulHigin Mar 7, 2019
13fa369
Merge branch 'master' of https://github.com/PaulHigin/PSThreadJob int…
PaulHigin Mar 7, 2019
60683ee
Add check for untrusted intialization script
PaulHigin Mar 8, 2019
c4dda06
Updated comment per review request
PaulHigin Mar 8, 2019
f979be5
Merge pull request #29 from PaulHigin/add-systemlockdown-filecheck
PaulHigin Mar 8, 2019
78fa08c
Added ability to stream information data to host
PaulHigin Apr 15, 2019
0ac86a6
Removed unneeded parameter null restriction
PaulHigin Apr 22, 2019
9bf5df9
Merge pull request #30 from PaulHigin/add-hoststreaming
PaulHigin Apr 22, 2019
ceb7606
Removed ThreadJob PSHost for collecting host data. Bumped version to…
PaulHigin May 6, 2019
0a3f047
Merge pull request #31 from PaulHigin/add-hoststreaming
PaulHigin May 6, 2019
6efe3d1
Build pipeline (#36)
PaulHigin May 22, 2019
4537bfc
Fixed using keyword bug by removing unneeded support for V3-4 (#37)
PaulHigin Jun 24, 2019
6e0c15d
Normalize line endings (#39)
KirkMunro Jul 1, 2019
fe58004
add .gitattributes and .gitignore (#38)
KirkMunro Jul 1, 2019
8e5258f
Added IJobDebugger to enable Debug-Job debugging (#40)
PaulHigin Jul 9, 2019
4d539ed
Add setting the current working directory in the job runspace. (#47)
PaulHigin Oct 24, 2019
c6f463e
Add `HelpInfoURI` to `psd1` to point to updatable help content (#50)
adityapatwardhan Dec 17, 2019
d6f97e3
Add help Uri to module. (#51)
PaulHigin Dec 17, 2019
abbf930
Update TSA upload to use latest version. (#52)
PaulHigin Dec 17, 2019
99bfe5a
Fix TSA project (#53)
PaulHigin Dec 19, 2019
89bdaf5
Move PSThreadJob to PSPackageProject form
PaulHigin Apr 28, 2020
d6da1bd
Remove unneeded ps1xml file copy
PaulHigin Apr 28, 2020
129de9e
Remove unneeded build files
PaulHigin Apr 28, 2020
0636bc2
Fix typos
PaulHigin Apr 28, 2020
817d944
Add tsaStamp
PaulHigin Apr 28, 2020
a6abd29
Update to new TSA code name
PaulHigin Apr 29, 2020
98b1784
Add build signed artifacts
PaulHigin Apr 30, 2020
9935455
Remove typo
PaulHigin Apr 30, 2020
f6745fe
Fix build
PaulHigin Apr 30, 2020
f590004
Add debug output A
PaulHigin Apr 30, 2020
8eb553e
Fix attempt 1
PaulHigin Apr 30, 2020
2ba0b6a
Debug A
PaulHigin Apr 30, 2020
26ee60a
Debug 2
PaulHigin Apr 30, 2020
1c71c36
Debug 3
PaulHigin Apr 30, 2020
22cea5d
Debug 4
PaulHigin Apr 30, 2020
9fd5467
Fix 1
PaulHigin Apr 30, 2020
1dfb6b1
Fix signed path
PaulHigin Apr 30, 2020
0f73ccb
Debug 4
PaulHigin Apr 30, 2020
0dd7bb0
Enable release push to nuget
PaulHigin May 1, 2020
128f734
Add push
PaulHigin May 1, 2020
62d4a7c
Debug2
PaulHigin May 1, 2020
966531f
Debug4
PaulHigin May 1, 2020
4a2ef5b
Debug5
PaulHigin May 1, 2020
4d11fb3
Debug6
PaulHigin May 1, 2020
a66a3b1
Debug6
PaulHigin May 1, 2020
7d07574
Typo
PaulHigin May 4, 2020
071f59e
Add NuGet install
PaulHigin May 4, 2020
8990c0f
Fix feed
PaulHigin May 4, 2020
757ae4d
Fix artifact path
PaulHigin May 4, 2020
7cfb458
Add PSGallery publish
PaulHigin May 6, 2020
9bcb464
Temp remove azFeed push
PaulHigin May 6, 2020
5f5cdd8
Fix Test for Pester5
PaulHigin Aug 12, 2020
395f19d
Specify Pester install version
PaulHigin Aug 12, 2020
b4aebac
Ensure Pester5 is not installed
PaulHigin Aug 12, 2020
456e613
Update CI to latest
PaulHigin Sep 11, 2020
984d065
Fix Pester version
PaulHigin Sep 11, 2020
8c573dd
Remove pester 5.x
PaulHigin Sep 11, 2020
0194b72
Fix scope test issue
PaulHigin Sep 11, 2020
8fbda8e
Fix tests
PaulHigin Sep 11, 2020
d0db30a
Update test pester install
PaulHigin Sep 11, 2020
ff23c92
Add temp module directory and component detection for compliance
PaulHigin Oct 6, 2020
6d17a78
Use new ESRP signing process
PaulHigin Oct 20, 2020
ef655cb
Set up CI with Start Right
TravisEz13 Aug 23, 2024
56c3172
bringing gitrepo to mscodehub
Aug 23, 2024
c1fc775
Set up CI with Start Right
TravisEz13 Aug 23, 2024
a57af39
Merge branch 'onebranch-pipelines'
Aug 23, 2024
ae09e06
made pipeline file based on Jim's texteditor
Aug 23, 2024
c823bb5
now building with net8.0
Aug 26, 2024
ec8700a
added tsa json
Aug 27, 2024
7794e59
added dependabot
Aug 27, 2024
5d17bfe
fixed yml to sign code.
Aug 28, 2024
4d785bb
revert dotnet back to 8.0
Aug 28, 2024
55e07ec
revert back to privateassets for PowerShellStandardLibrary
Aug 28, 2024
cdc5061
Deleted Microsoft.PowerShell.Threadjob.csproj
Aug 28, 2024
dd71210
fixed build.psm1 and yml to fix code signing error
Aug 28, 2024
786768a
Merge branch 'onebranch-pipelines' of https://mscodehub.visualstudio.…
Aug 28, 2024
b31cb86
Revert "Deleted Microsoft.PowerShell.Threadjob.csproj"
Aug 28, 2024
d1f649d
Deleted Microsoft.PowerShell.ThreadJob.csproj
Aug 28, 2024
1cb2bc8
debugging build...
Aug 28, 2024
7fa0d1b
Merged PR 32351: Revert "Deleted Microsoft.PowerShell.ThreadJob.csproj"
Aug 28, 2024
4b9eb86
debugging build
Aug 28, 2024
a3a2a51
Updated nuget.config
Aug 28, 2024
26ec154
fixing powershellget import with netlock
Aug 29, 2024
e37edc8
Deleted Microsoft.PowerShell.Threadjob.csproj
Aug 29, 2024
8aca1b4
trying to install PSResourceGet
Aug 29, 2024
910392c
Trying to import PSReousrceGet
Aug 29, 2024
f750aad
updated yml
Aug 29, 2024
4b33243
updated yml and moved install of psresourceget to build
Aug 29, 2024
1744170
updated yml fixed Install-Module line
Aug 29, 2024
78a6af3
updated yml fixed version to MinimumVersion
Aug 29, 2024
a70aef6
added settings for linux
Aug 30, 2024
4e646a2
testing csproj powershel.sdk for unix
Aug 30, 2024
991854d
testing csproj powershel.sdk for unix
Aug 30, 2024
2504e5d
add dll in a separate folder. Fixed issues with relfection.
Sep 3, 2024
6786744
removed the local dll reference and the unix condition.
Sep 3, 2024
9ba6ed0
conditionally added SMA.Security
Sep 3, 2024
2aff27d
added conditional fomatting
Sep 3, 2024
1dbf726
using reflection for Security Policy removed dependency to SMA target…
Sep 4, 2024
563d47e
updated pipeline with new build command netstandard2.0
Sep 5, 2024
8339612
fixed an issue with reflection. Abstracted the assembly to a method. …
Sep 5, 2024
1b0f220
Added DeployBoxProducts release pipeline update
Sep 10, 2024
bdea457
edits to deploybox pipeline
Sep 10, 2024
6cd9def
edits to release pipeline
Sep 10, 2024
2fb376a
moved manual validation to a separate stage
Sep 11, 2024
719793c
removed nuget task and changed to PublishExtension@5 task
Sep 11, 2024
b659c77
Updated threadjobs-official.yml removed download
Sep 12, 2024
29741be
Updated threadjobs-official.yml fixed dependsOn
Sep 12, 2024
64b079b
changed method of grabbing location of SMA
Sep 13, 2024
2b7d382
Updated versions to 3.0.0.
Sep 16, 2024
89ee3f4
replaced periods with _ in stage name
Sep 16, 2024
ff05f43
removed spaces from stage name
Sep 16, 2024
161e063
added two separate boolean parameters for proxy and official in the o…
Sep 16, 2024
e68b5c8
fixed error in parameters
Sep 16, 2024
93dd11d
removed spaces from stage name
Sep 16, 2024
4356dfd
added import threadjob for psd1 required module
Sep 17, 2024
45cc508
Added test module manifest to pipeline
Sep 17, 2024
ddae31e
changed import module from dll to entire mdoule
Sep 17, 2024
f2d0bff
Install-Module instead of import
Sep 17, 2024
f4793ea
Copied the Microsoft.PowerShell.ThreadJob module to env:PSModule path
Sep 17, 2024
c3ec125
fixed signing. added archive for ThreadJob
Sep 17, 2024
4896d72
Trying to add tfx
Sep 18, 2024
42c83ba
fixed indentation
Sep 18, 2024
aab4e73
Revert "fixed signing. added archive for ThreadJob"
Sep 18, 2024
085e08f
trying nugetcommand
Sep 18, 2024
1c8af3a
Trying Publish-PSResource
Sep 18, 2024
15e9268
trying task: powershell@2
Sep 19, 2024
e1c20ec
fixed signing again. git revert error
Sep 19, 2024
e70c1c2
changed gallery api to 2. added verbose messages to release
Sep 19, 2024
e49ed10
added error actions for release pwsh script commands
Sep 19, 2024
0625552
trying to add dotnet sdk
Sep 19, 2024
91e2f63
dotnet version 8.x
Sep 19, 2024
9874679
added pwsh true
Sep 19, 2024
ca85b84
changed os to linux
Sep 19, 2024
1920f08
added sudo
Sep 20, 2024
132323a
force install psresourceget and Register-PSRepositroy -Default instea…
Sep 20, 2024
6a4a5dd
fixed official release to Default and removed source location
Sep 20, 2024
1d2585c
removed PSGallery registration
Sep 20, 2024
daec51b
added variable group for api key
Sep 20, 2024
1eb11ea
trying to debug variable group
Sep 20, 2024
aef4005
mapping from env
Sep 20, 2024
29b6557
trying version
Sep 20, 2024
8bb673c
trying package.version
Sep 20, 2024
56e7fe0
moved version variable to job scope and added build as dependson in r…
Sep 20, 2024
6f48dee
added download current
Sep 20, 2024
f031e49
trying templateContext to pass nupkg artifact to release stage
Sep 20, 2024
9460e45
removed download:current's
Sep 20, 2024
715ae02
removed publish task. trying to find pukg
Sep 23, 2024
f6b7c3e
trying to find nupkg
Sep 23, 2024
c33fecb
just checking pipeline.workspace
Sep 23, 2024
1d15e87
found the nupkgs
Sep 23, 2024
fe91eaf
uploading morudle folder and not the jupkg because probably -NupkgPat…
Sep 23, 2024
d1a9964
outputtig GalleryPAT for validation
Sep 23, 2024
a95ecf6
gallerypat output
Sep 23, 2024
ed57abf
trying runtime expression
Sep 23, 2024
f162999
moved variable group to stage variable
Sep 23, 2024
981f915
should work now
Sep 23, 2024
4238d8b
added var group as a job variable
Sep 23, 2024
46d8980
added name value for variable apikey
Sep 23, 2024
01bedbb
fixed indentation issue with stage variables
Sep 23, 2024
72219e7
switch version order
Sep 23, 2024
22b49cd
removed - in group
Sep 23, 2024
d72e0c2
trying to output env
Sep 23, 2024
9d4ae38
trying to add it as a stage variable
Sep 23, 2024
3ac0382
got rid of ob release environment
Sep 23, 2024
09c0fcd
moved everything to stage vars. left group only in job vars
Sep 23, 2024
2df02fc
removed Gallery[PAT] installing Microsoft.PowerShell.ThreadJob to mac…
Sep 23, 2024
f8ef5f4
added verbose statements and copy-item verbose and test-module manife…
Sep 23, 2024
f179690
PSModulePath separator is : in linux ; in windows.
Sep 23, 2024
8fc6fdf
Changed version numbers
Sep 24, 2024
6cb79ca
Update src/ThreadJob/ThreadJob.psd1
jshigetomi Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions .ci/compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
steps:

- powershell: |
$powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell'
Invoke-WebRequest -Uri https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.ps1 -outfile ./install-powershell.ps1
./install-powershell.ps1 -Destination $powerShellPath
$vstsCommandString = "vso[task.setvariable variable=PATH]$powerShellPath;$env:PATH"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"
displayName: Install PowerShell Core

- task: DownloadBuildArtifacts@0
displayName: 'Download artifacts'
inputs:
buildType: current
downloadType: specifc
itemPattern: '**/*.nupkg'
downloadPath: '$(System.ArtifactsDirectory)'

- pwsh: |
Get-ChildItem -Path "$(System.ArtifactsDirectory)" -Recurse
displayName: Capture artifacts directory

- pwsh: |
$modulePath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'TempModules'
if (Test-Path -Path $modulePath) {
Write-Verbose -Verbose "Deleting existing temp module path: $modulePath"
Remove-Item -Path $modulePath -Recurse -Force -ErrorAction Ignore
}
if (! (Test-Path -Path $modulePath)) {
Write-Verbose -Verbose "Creating new temp module path: $modulePath"
$null = New-Item -Path $modulePath -ItemType Directory
}
displayName: Create temporary module path

- pwsh: |
$modulePath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'TempModules'
Write-Verbose -Verbose "Install PowerShellGet V3 to temp module path"
Save-Module -Name PowerShellGet -Path $modulePath -MinimumVersion 3.0.0-beta10 -AllowPrerelease -Force
Write-Verbose -Verbose "Install PlatyPS to temp module path"
Save-Module -Name "platyPS" -Path $modulePath -Force
Write-Verbose -Verbose "Install PSScriptAnalyzer to temp module path"
Save-Module -Name "PSScriptAnalyzer" -Path $modulePath -RequiredVersion 1.18.0 -Force
Write-Verbose -Verbose "Install Pester 4.X to temp module path"
Save-Module -Name "Pester" -MaximumVersion 4.99 -Path $modulePath -Force
Write-Verbose -Verbose "Install PSPackageProject to temp module path"
Save-Module -Name PSPackageProject -Path $modulePath -Force
displayName: Install PSPackageProject and dependencies

- pwsh: |
$modulePath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'TempModules'
$env:PSModulePath = $modulePath + [System.IO.Path]::PathSeparator + $env:PSModulePath
$sourceName = 'pspackageproject-local-repo'
Register-PackageSource -Name $sourceName -Location "$(System.ArtifactsDirectory)" -ProviderName PowerShellGet -Force -ErrorAction Ignore
Get-PackageSource -Name $sourceName
$config = Get-PSPackageProjectConfiguration
$buildOutputPath = $config.BuildOutputPath
$null = New-Item -ItemType Directory -Path $buildOutputPath -Verbose
$moduleName = $config.ModuleName
Write-Verbose -Verbose "Saving package $sourceName to $($config.BuildOutputPath)"
Save-Package -Name $moduleName -Source $sourceName -ProviderName PowerShellGet -Path $config.BuildOutputPath -AllowPrereleaseVersions -Force
Write-Verbose -Verbose "Writing BUILD_SOURCE variable"
$vstsCommandString = "vso[task.setvariable variable=BUILD_SOURCE]$($config.BuildOutputPath)"
Write-Host "sending " + $vstsCommandString
Write-Host "##$vstsCommandString"
displayName: Extract product artifact

- pwsh: |
$modulePath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'TempModules'
$env:PSModulePath = $modulePath + [System.IO.Path]::PathSeparator + $env:PSModulePath
$config = Get-PSPackageProjectConfiguration
dir "$($config.BuildOutputPath)/*" -r 2>$null
displayName: 'BuildOutputPath directory'

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
sourceScanPath: '$(Build.SourcesDirectory)'
snapshotForceEnabled: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3
displayName: 'Run Defender Scan'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Run CredScan'
inputs:
toolMajorVersion: V2
debugMode: false
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
displayName: 'Run BinSkim '
inputs:
InputType: Basic
AnalyzeTarget: '$(BUILD_SOURCE)\Microsoft.PowerShell.ThreadJob\Microsoft.PowerShell.ThreadJob.dll'
AnalyzeSymPath: 'SRV*'
AnalyzeVerbose: true
AnalyzeHashes: true
AnalyzeStatistics: true
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
displayName: 'Run PoliCheck'
inputs:
targetType: F
optionsFC: 0
optionsXS: 0
optionsPE: '1|2|3|4'
optionsHMENABLE: 0
# optionsRulesDBPath: '$(Build.SourcesDirectory)\tools\terms\PowerShell-Terms-Rules.mdb'
# optionsFTPATH: '$(Build.SourcesDirectory)\tools\terms\FileTypeSet.xml'
toolVersion: 5.8.2.1
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs to Build Artifacts'
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-uploadtotsa.TSAUpload@1
displayName: 'TSA upload to Codebase: PSThreadJob_201912 Stamp: Azure'
inputs:
tsaStamp: Azure
codeBaseName: PSThreadJob_202004
tsaVersion: TsaV2
uploadFortifySCA: false
uploadFxCop: false
uploadModernCop: false
uploadPREfast: false
uploadRoslyn: false
uploadTSLint: false
uploadAPIScan: false

- task: securedevelopmentteam.vss-secure-development-tools.build-task-report.SdtReport@1
displayName: 'Create Security Analysis Report'
inputs:
TsvFile: false
APIScan: false
BinSkim: false
CredScan: true
PoliCheck: true
PoliCheckBreakOn: Severity2Above

- pwsh: |
Unregister-PSRepository -Name 'pspackageproject-local-repo' -ErrorAction Ignore
displayName: Unregister temporary PSRepository
condition: always()
79 changes: 79 additions & 0 deletions .ci/templates/sign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
parameters:
- name: "buildOutputPath"
default: "$(Build.ArtifactStagingDirectory)\\build"
- name: "signOutputPath"
default: "$(Build.ArtifactStagingDirectory)\\signed"
- name: "certificateId"
default: "CP-230012"
- name: "pattern"
default: "*.dll,*.exe"

steps:
- task: UseDotNet@2
displayName: 'Install .NET Core sdk 2.x for ESRP'
inputs:
version: 2.x

- pwsh: |
[string] $CertificateId = "${{ parameters.certificateId }}"
Write-Verbose "CertificateId - $CertificateId" -Verbose

[string] $VariableName = "EsrpJson"

[string] $SigningServer = '$(SigningServer)'
Write-Verbose "SigningServer - $SigningServer" -Verbose

$esrpParameters = @(
@{
ParameterName = "OpusName"
ParameterValue = "Microsoft"
}
@{
ParameterName = "OpusInfo"
ParameterValue = "http://www.microsoft.com"
}
@{
ParameterName = "PageHash"
ParameterValue = "/NPH"
}
@{
ParameterName = "FileDigest"
ParameterValue = "/fd sha256"
}
@{
ParameterName = "TimeStamp"
ParameterValue = "/tr ""$SigningServer"" /td sha256"
}
)

$esrp = @(@{
keyCode = $CertificateId
operationSetCode = "SigntoolSign"
parameters = $esrpParameters
toolName = "signtool.exe"
toolVersion = "6.2.9304.0"
})

$vstsCommandString = "vso[task.setvariable variable=$VariableName][$($esrp | ConvertTo-Json -Compress)]"
Write-Verbose -Message ("sending " + $vstsCommandString) -Verbose
Write-Host "##$vstsCommandString"
displayName: Generate signing JSON
condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], ''))

- pwsh: |
Write-Verbose "BUILD_OUTPUT_PATH- ${{ parameters.buildOutputPath}}" -Verbose
Write-Verbose "SIGNED_OUTPUT_PATH- ${{ parameters.signOutputPath }}" -Verbose
Copy-Item ${{ parameters.buildOutputPath }}\* ${{ parameters.signOutputPath }}\ -Recurse -Force -Verbose
displayName: Prepare output folder
timeoutInMinutes: 10

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: Sign files
inputs:
ConnectedServiceName: pwshSigning
FolderPath: '${{ parameters.signOutputPath }}'
UseMinimatch: false
signConfigType: inlineSignParams
inlineOperation: $(EsrpJson)
Pattern: ${{ parameters.pattern }}
condition: and(and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')), ne(variables['SigningServer'], ''))
8 changes: 8 additions & 0 deletions .config/tsaoptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"instanceUrl": "https://msazure.visualstudio.com",
"projectName": "One",
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell\\PowerShell Core\\ThreadJob",
"codebaseName": "TFSMSAzure_ThreadJob",
"notificationAliases": [ "[email protected]", "[email protected]" ],
"tools": [ "CredScan", "PoliCheck", "BinSkim" ]
}
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/src/code" # Location of package manifests
schedule:
interval: "daily"

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: nuget
directory: /
schedule:
interval: daily
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ xhtml/
**/.vscode/**
**/out/**
**/bin/**
.vs/**/*
**/*.sln
Loading