updates jenkins build file
Some checks failed
PiwigoDirectorySync/pipeline/head There was a failure building this commit

This commit is contained in:
Philipp Häfelfinger 2023-08-30 23:47:02 +02:00
parent 6ee1f1faea
commit 55f07c9d4c
2 changed files with 11 additions and 21 deletions

27
Jenkinsfile vendored
View File

@ -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}"
}
}

View File

@ -35,6 +35,9 @@
<Content Include="..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
<Content Include="..\Jenkinsfile">
<Link>Jenkinsfile</Link>
</Content>
</ItemGroup>
<ItemGroup>