Skip to content

Commit

Permalink
Update build pipeline (#423)
Browse files Browse the repository at this point in the history
* Promotes pipeline variables to be parameters as per recent ADO security changes
* Enable SBOM publishing
  • Loading branch information
JamesDawson authored Dec 19, 2022
1 parent 1d67918 commit 91e2f30
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,7 @@ appsettings.json
*.feature.cs
*.ncrunchproject
*.ncrunchsolution

# Local build outputs
_packages/
*.sbom.*
25 changes: 24 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,34 @@ trigger:
include:
- '*'

parameters:
- name: ForcePublish
type: boolean
default: false
displayName: When checked, a new release will be created and NuGet packages published; otherwise only 'master' branch changes will be published
- name: InternalPublish
type: boolean
default: false
displayName: When checked, NuGet packages will be published to an internal feed; this is independent of whether a public release is performed
- name: ForceRelease
type: boolean
default: false
displayName: When checked, a GitHub Release will be created but NuGet packages will not be published (unless other options are enabled)

resources:
repositories:
- repository: recommended_practices
type: github
name: endjin/Endjin.RecommendedPractices.AzureDevopsPipelines.GitHub
endpoint: marain-github
endpoint: marain-dotnet-github

variables:
Endjin.ForcePublish: ${{ parameters.ForcePublish }}
Endjin.InternalPublish: ${{ parameters.InternalPublish }}
Endjin.ForceRelease: ${{ parameters.ForceRelease }}
# non-secret UI variables migrated to YAML
Endjin_Service_Connection_GitHub: marain-dotnet-github
Endjin_Service_Connection_NuGet_Org: marain-dotnet-nuget-org

jobs:
- template: templates/build.and.release.scripted.yml@recommended_practices
Expand All @@ -20,6 +42,7 @@ jobs:
service_connection_nuget_org: $(Endjin_Service_Connection_NuGet_Org)
service_connection_github: $(Endjin_Service_Connection_GitHub)
solution_to_build: $(Endjin_Solution_To_Build)
compileTasksServiceConnection: endjin-acr-reader
postCustomEnvironmentVariables:
- powershell: |
Write-Host "##vso[task.setvariable variable=AzureServicesAuthConnectionString]$Env:ENDJIN_AZURESERVICESAUTHCONNECTIONSTRING"
Expand Down
6 changes: 4 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ param (
[version] $BuildModuleVersion = "1.1.1",

[Parameter()]
[version] $InvokeBuildModuleVersion = "5.7.1"
[version] $InvokeBuildModuleVersion = "5.10.1"
)

$ErrorActionPreference = $ErrorActionPreference ? $ErrorActionPreference : 'Stop'
Expand Down Expand Up @@ -138,7 +138,9 @@ $SkipPublish = $false
#
$SolutionToBuild = (Resolve-Path (Join-Path $here ".\Solutions\Marain.Operations.sln")).Path
$ProjectsToPublish = @(
# "Solutions/MySolution/MyWebSite/MyWebSite.csproj"
"Solutions\Marain.Operations.Hosting.AspNetCore\Marain.Operations.Hosting.AspNetCore.csproj"
"Solutions\Marain.Operations.StatusHost.Functions\Marain.Operations.StatusHost.Functions.csproj"
"Solutions\Marain.Operations.ControlHost.Functions\Marain.Operations.ControlHost.Functions.csproj"
)
$NuSpecFilesToPackage = @(
# "Solutions/MySolution/MyProject/MyProject.nuspec"
Expand Down

0 comments on commit 91e2f30

Please sign in to comment.