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 +