Skip to content

Commit

Permalink
Prepare build and release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
michaljakubis committed May 20, 2024
1 parent 1b80e84 commit dcb96ed
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 20 deletions.
40 changes: 21 additions & 19 deletions .azuredevops/pipelines/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ stages:
- name: Configuration
value: Release

- name: ProjectPath
value: src/PROJECT_NAME/PROJECT_NAME.csproj
- name: slnPath
value: src/Kentico.Xperience.K13Ecommerce.Libs.sln

steps:
- checkout: self
submodules: true

- task: DotNetCoreCLI@2
displayName: Restore dotnet tools
inputs:
Expand All @@ -63,36 +66,35 @@ stages:
displayName: Restore dependencies
inputs:
command: restore
projects: ${{ variables.ProjectPath }}
projects: ${{ variables.slnPath }}
feedsToUse: select
restoreArguments: --locked-mode

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: ${{ variables.ProjectPath }}
projects: ${{ variables.slnPath }}
configuration: ${{ variables.Configuration }}
arguments: --no-restore
env:
AuthenticodeClientSecret: $(AuthenticodeClientSecret)
# Roll-forward behavior set for AzureSignTool dotnet tool (see .config\dotnet-tools.json) which requires .Net 6.0 runtime
DOTNET_ROLL_FORWARD: Major

- task: DotNetCoreCLI@2
displayName: Create NuGet package
inputs:
command: pack
packagesToPack: ${{ variables.ProjectPath }}
configuration: ${{ variables.Configuration }}
packDirectory: $(System.DefaultWorkingDirectory)/packages
includesymbols: true
nobuild: true
versioningScheme: off

- publish: $(System.DefaultWorkingDirectory)/packages
displayName: Publish NuGet package as artifact
artifact: artifact
- template: steps.yml
parameters:
Configuration: $(Configuration)
artifacts:
- K13Ecommerce:
artifactName: "Kentico-Xperience-Shopify"
projectPath: "src/Kentico.Xperience.Shopify"
- StoreApi:
artifactName: "Kentico-Xperience-Shopify-Rcl"
projectPath: "src/Kentico.Xperience.Shopify.Rcl"
- StoreRcl:
artifactName: "Kentico-Xperience-Store-Rcl"
projectPath: "src/Kentico.Xperience.Store.Rcl"

- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
- stage: PublishNuGetPackages
Expand Down Expand Up @@ -132,7 +134,7 @@ stages:
displayName: NuGet push
inputs:
command: push
packagesToPush: $(Pipeline.Workspace)/artifact/*.nupkg
packagesToPush: $(Pipeline.Workspace)/**/*.nupkg
nuGetFeedType: external
publishFeedCredentials: nuget.org
allowPackageConflicts: true
22 changes: 22 additions & 0 deletions .azuredevops/pipelines/steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
parameters:
- name: Configuration
type: string
- name: artifacts
type: object

steps:
- ${{ each artifact in parameters.artifacts }}:
- task: DotNetCoreCLI@2
displayName: Create NuGet package
inputs:
command: pack
packagesToPack: ${{ artifact.projectPath }}/*.csproj
configuration: ${{ parameters.Configuration }}
packDirectory: $(System.DefaultWorkingDirectory)/packages/${{ artifact.artifactName }}
includesymbols: true
nobuild: true
versioningScheme: off

- publish: $(System.DefaultWorkingDirectory)/packages/${{ artifact.artifactName }}
displayName: Publish Artifact ${{ artifact.artifactName }}
artifact: build_${{ artifact.artifactName }}
37 changes: 37 additions & 0 deletions src/Kentico.Xperience.Shopify.Libs.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34622.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kentico.Xperience.Ecommerce.Common", "..\submodules\xperience-by-kentico-ecommerce-common\src\Kentico.Xperience.Ecommerce.Common\Kentico.Xperience.Ecommerce.Common.csproj", "{41275CA4-F178-4F49-9ED4-5AD8BA4F6E37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kentico.Xperience.Shopify", "Kentico.Xperience.Shopify\Kentico.Xperience.Shopify.csproj", "{86AC67CD-62DD-45E8-9C3D-A326AA88E8FB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kentico.Xperience.Shopify.Rcl", "Kentico.Xperience.Shopify.Rcl\Kentico.Xperience.Shopify.Rcl.csproj", "{25E9AB4B-3A21-4319-BB05-F973731198BA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{41275CA4-F178-4F49-9ED4-5AD8BA4F6E37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41275CA4-F178-4F49-9ED4-5AD8BA4F6E37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41275CA4-F178-4F49-9ED4-5AD8BA4F6E37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41275CA4-F178-4F49-9ED4-5AD8BA4F6E37}.Release|Any CPU.Build.0 = Release|Any CPU
{86AC67CD-62DD-45E8-9C3D-A326AA88E8FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86AC67CD-62DD-45E8-9C3D-A326AA88E8FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86AC67CD-62DD-45E8-9C3D-A326AA88E8FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86AC67CD-62DD-45E8-9C3D-A326AA88E8FB}.Release|Any CPU.Build.0 = Release|Any CPU
{25E9AB4B-3A21-4319-BB05-F973731198BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25E9AB4B-3A21-4319-BB05-F973731198BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25E9AB4B-3A21-4319-BB05-F973731198BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25E9AB4B-3A21-4319-BB05-F973731198BA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0BA543EA-D9FD-43EB-8922-73E50AE97454}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Product>Xperience by Kentico Shopify</Product>
<Title>$(Product)</Title>
<Description>Xperience By Kentico - Shopify integration</Description>
<Description>Xperience by Kentico - Shopify integration</Description>
<PackageId>Kentico.Xperience.Shopify</PackageId>
<RootNamespace>Kentico.Xperience.Shopify</RootNamespace>
<PackageTags>$(PackageTags);dynamics</PackageTags>
Expand Down

0 comments on commit dcb96ed

Please sign in to comment.