Skip to content

Commit

Permalink
KX-11751 - Containerization (#37)
Browse files Browse the repository at this point in the history
* KX-11751 - Containerization

* KX-11751 - Roll-forward for tests

* KX-11751 - Testing base/mcr-dotnet-sdk-6.0-servercore-ltsc2022 image

---------

Co-authored-by: Zdenek Strach <ZdenekS@kentico.com>
  • Loading branch information
ZdenekS81 and Zdenek Strach authored Mar 12, 2024
1 parent eb456e0 commit bdc76cd
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ parameters:
- name: AgentPoolName
displayName: Agent pool name
type: string
default: Default
default: ADO Windows Server 2022

- name: AgentName
displayName: Agent name - single char for any
type: string
default: ' '

resources:
repositories:
- repository: self
type: git

containers:
- container: Windows
image: base/mcr-dotnet-sdk-6.0-servercore-ltsc2022:release
endpoint: xperienceagentshub.azurecr.io

stages:
- stage: Build
jobs:
Expand All @@ -25,6 +35,7 @@ stages:
${{ if ne(length(parameters.AgentName), 1) }}:
demands:
- Agent.Name -equals ${{ parameters.AgentName }}
container: Windows

workspace:
clean: resources
Expand All @@ -39,12 +50,6 @@ stages:
value: 5.0.x

steps:
- task: UseDotNet@2
displayName: Select dotnet version
inputs:
packageType: sdk
version: ${{ variables.DotNetSdkVersion }}

- task: DotNetCoreCLI@2
displayName: Restore dotnet tools
inputs:
Expand Down Expand Up @@ -91,6 +96,8 @@ stages:
arguments: --no-restore --configuration ${{ variables.Configuration }}
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: Test
Expand Down Expand Up @@ -129,6 +136,7 @@ stages:
${{ if ne(length(parameters.AgentName), 1) }}:
demands:
- Agent.Name -equals ${{ parameters.AgentName }}
container: Windows

workspace:
clean: resources
Expand Down

0 comments on commit bdc76cd

Please sign in to comment.