From 193ebd9f0618b8425999edb2499ffa1f38d138d2 Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Sat, 29 Apr 2023 00:01:39 +0100 Subject: [PATCH] fixing dotnet home --- .jenkins/jenkinsfile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.jenkins/jenkinsfile b/.jenkins/jenkinsfile index cd2cf87..1b6410b 100644 --- a/.jenkins/jenkinsfile +++ b/.jenkins/jenkinsfile @@ -1,6 +1,10 @@ pipeline { agent any + environment { + DOTNET_CLI_HOME = "/tmp/DOTNET_CLI_HOME" + } + stages { stage('Build C#') { agent { @@ -13,8 +17,8 @@ pipeline { } } steps { - sh "dotnet restore Selector.Core.sln" - sh "dotnet build Selector.Core.sln" + dotnetRestore "Selector.Core.sln" + dotnetBuild "Selector.Core.sln" } } @@ -22,9 +26,6 @@ pipeline { agent { docker { image 'node:16' - // Run the container on the node specified at the - // top-level of the Pipeline, in the same workspace, - // rather than on a new node entirely: reuseNode true } } @@ -39,14 +40,11 @@ pipeline { agent { docker { image 'mcr.microsoft.com/dotnet/sdk:7.0' - // Run the container on the node specified at the - // top-level of the Pipeline, in the same workspace, - // rather than on a new node entirely: reuseNode true } } steps { - sh "dotnet test Selector.Core.sln" + dotnetTest "Selector.Core.sln" } } stage('Deploy') {