|
|
@ -11,37 +11,41 @@ node("Diligence") { |
|
|
|
git branch: env.BRANCH_NAME, credentialsId: 'Ionite', url: "https://github.com/${author}/${repoName}.git" |
|
|
|
git branch: env.BRANCH_NAME, credentialsId: 'Ionite', url: "https://github.com/${author}/${repoName}.git" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stage('Test') { |
|
|
|
try { |
|
|
|
sh "dotnet test StabilityMatrix.Tests" |
|
|
|
stage('Test') { |
|
|
|
} |
|
|
|
sh "dotnet test StabilityMatrix.Tests" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (env.BRANCH_NAME == 'main') { |
|
|
|
if (env.BRANCH_NAME == 'main') { |
|
|
|
|
|
|
|
|
|
|
|
stage('Set Version') { |
|
|
|
stage('Set Version') { |
|
|
|
script { |
|
|
|
script { |
|
|
|
if (env.TAG_NAME) { |
|
|
|
if (env.TAG_NAME) { |
|
|
|
version = env.TAG_NAME.replaceFirst(/^v/, '') |
|
|
|
version = env.TAG_NAME.replaceFirst(/^v/, '') |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
version = VersionNumber projectStartDate: '2023-06-21', versionNumberString: '${BUILDS_ALL_TIME}', worstResultForIncrement: 'SUCCESS' |
|
|
|
version = VersionNumber projectStartDate: '2023-06-21', versionNumberString: '${BUILDS_ALL_TIME}', worstResultForIncrement: 'SUCCESS' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stage('Publish Windows') { |
|
|
|
stage('Publish Windows') { |
|
|
|
sh "dotnet publish ./StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj -c Release -o out -r win-x64 -p:PublishSingleFile=true -p:VersionPrefix=2.0.0 -p:VersionSuffix=${version} -p:IncludeNativeLibrariesForSelfExtract=true" |
|
|
|
sh "dotnet publish ./StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj -c Release -o out -r win-x64 -p:PublishSingleFile=true -p:VersionPrefix=2.0.0 -p:VersionSuffix=${version} -p:IncludeNativeLibrariesForSelfExtract=true" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stage('Publish Linux') { |
|
|
|
stage('Publish Linux') { |
|
|
|
sh "/home/jenkins/.dotnet/tools/pupnet --runtime linux-x64 --kind appimage --app-version ${version} --clean -y" |
|
|
|
sh "/home/jenkins/.dotnet/tools/pupnet --runtime linux-x64 --kind appimage --app-version ${version} --clean -y" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stage ('Archive Artifacts') { |
|
|
|
stage ('Archive Artifacts') { |
|
|
|
archiveArtifacts artifacts: 'out/*.exe', followSymlinks: false |
|
|
|
archiveArtifacts artifacts: 'out/*.exe', followSymlinks: false |
|
|
|
archiveArtifacts artifacts: 'out/*.appimage', followSymlinks: false |
|
|
|
archiveArtifacts artifacts: 'out/*.appimage', followSymlinks: false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
stage('Cleanup') { |
|
|
|
|
|
|
|
cleanWs() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stage('Cleanup') { |
|
|
|
|
|
|
|
cleanWs() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|