From c46d93c802c8ad160683501441c30ef55069c400 Mon Sep 17 00:00:00 2001 From: zontreck Date: Mon, 16 Dec 2024 21:05:01 -0700 Subject: [PATCH] Fix jenkinsfile syntax --- Jenkinsfile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6644ae2..c3afcfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,9 +1,11 @@ pipeline { agent any options { - buildDiscarder { - numToKeepStr: '5' - } + buildDiscarder ( + logRotator( + numToKeepStr: '5' + ) + ) } stages { @@ -12,14 +14,19 @@ pipeline { label 'linux' } steps { - sh ''' - dotnet restore - dotnet publish LibAC.csproj --nologo -c Release --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true - ''' + script { + sh ''' + dotnet restore + dotnet publish LibAC.csproj --nologo -c Release --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true + ''' + } + } post { - archiveArtifacts artifacts: "build/Release/net8.0/LibAC.dll" + always { + archiveArtifacts artifacts: "build/Release/net8.0/LibAC.dll" + } } } }