Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy artifacts only for master branch #423

Merged
merged 1 commit into from Jan 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions Jenkinsfile
Expand Up @@ -36,7 +36,7 @@ final def jdks = [18, 17, 8]

final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
final def goals = ['clean', 'install']
final def goalsDepl = ['clean', 'deploy', 'jacoco:report']
final def goalsDepl = ['clean', 'deploy']
final Map stages = [:]

oses.eachWithIndex { osMapping, indexOfOs ->
Expand Down Expand Up @@ -69,7 +69,9 @@ oses.eachWithIndex { osMapping, indexOfOs ->
allOptions += '--no-transfer-progress'
}
ws(dir: "${os == 'windows' ? "${TEMP}\\${BUILD_TAG}" : pwd()}") {
buildProcess(stageKey, jdkName, mvnName, first ? goalsDepl : goals, allOptions, mavenOpts, first)
buildProcess(stageKey, jdkName, mvnName,
first && env.BRANCH_NAME == 'master' ? goalsDepl : goals,
allOptions, mavenOpts, first)
}
}
}
Expand Down Expand Up @@ -164,6 +166,10 @@ def buildProcess(String stageKey, String jdkName, String mvnName, goals, options
unstable(" executing command status= " + errorStatus)
}
}

} catch (Throwable e) {
println "Throwable: ${e}"
throw e
} finally {
try {
if (makeReports) {
Expand Down