From 55f07c9d4c7521f57c5b3f4d2eff5b3add21e983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=A4felfinger?= Date: Wed, 30 Aug 2023 23:47:02 +0200 Subject: [PATCH] updates jenkins build file --- Jenkinsfile | 29 +++++-------------- .../PiwigoDirectorySync.csproj | 3 ++ 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f1f725c..20781f6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ pipeline { agent { - docker { image 'mcr.microsoft.com/dotnet/sdk:6.0'} + docker { image 'mcr.microsoft.com/dotnet/sdk:7.0'} } environment { @@ -23,38 +23,25 @@ pipeline { stage('nuget restore') { steps { - sh "dotnet restore ${env.WORKSPACE}/photo.haefelfinger.workflow.sln" + sh "dotnet restore ${env.WORKSPACE}/PiwigoDirectorySync.sln" } } stage('test') { steps { - sh "dotnet test ${env.WORKSPACE}/photo.haefelfinger.workflow.sln --no-restore" + sh "dotnet test ${env.WORKSPACE}/PiwigoDirectorySync.sln --no-restore" } } - stage('build api') { + stage('build linux binary') { steps { - sh "/bin/true" + sh "dotnet publish ${env.WORKSPACE}/PiwigoDirectorySync/PiwigoDirectorySync.csproj -c Release --self-contained true -r linux-x64 -o ${env.WORKSPACE}/publish/linux/PiwigoDirectorySync -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}" } } - - stage('api docker image') { + + stage('build windows binary') { steps { - sh "/bin/true" - } - } - - stage('build cli') { - steps { - sh "dotnet publish ${env.WORKSPACE}/photo.haefelfinger.workflow.cli/photo.haefelfinger.workflow.cli.csproj -c Release --self-contained true -r linux-x64 -o ${env.WORKSPACE}/publish/cli-linux -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}" - sh "dotnet publish ${env.WORKSPACE}/photo.haefelfinger.workflow.cli/photo.haefelfinger.workflow.cli.csproj -c Release --self-contained true -r win-x64 -o ${env.WORKSPACE}/publish/cli-win -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}" - } - } - - stage('publish docker images') { - steps { - sh "/bin/true" + sh "dotnet publish ${env.WORKSPACE}/PiwigoDirectorySync/PiwigoDirectorySync.csproj -c Release --self-contained true -r win-x64 -o ${env.WORKSPACE}/publish/windows/PiwigoDirectorySync.exe -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}" } } diff --git a/PiwigoDirectorySync/PiwigoDirectorySync.csproj b/PiwigoDirectorySync/PiwigoDirectorySync.csproj index 5b179e9..b2c07d8 100644 --- a/PiwigoDirectorySync/PiwigoDirectorySync.csproj +++ b/PiwigoDirectorySync/PiwigoDirectorySync.csproj @@ -35,6 +35,9 @@ .dockerignore + + Jenkinsfile +