-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build] Always archive artifacts in smoke-tests and use no main agent
Always archiving artifacts help to debug failures. Avoiding to use a 'main'-agent to just start all test-configurations running on other machines saves precious resources in the Jenkins instance while waiting for the tests to complete. Additionally simplify post build result notifications. Part of eclipse-platform#2642
- Loading branch information
1 parent
6d29fcd
commit 383d5fb
Showing
2 changed files
with
10 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,24 +5,7 @@ pipeline { | |
timestamps() | ||
buildDiscarder(logRotator(numToKeepStr:'10')) | ||
} | ||
agent { | ||
kubernetes { // a lean basic agent is sufficient. | ||
inheritFrom 'basic' yaml ''' | ||
apiVersion: v1 | ||
kind: Pod | ||
spec: | ||
containers: | ||
- name: "jnlp" | ||
resources: | ||
requests: | ||
memory: "512Mi" | ||
cpu: "500m" | ||
limits: | ||
memory: "1Gi" | ||
cpu: "1000m" | ||
''' | ||
} | ||
} | ||
agent none | ||
stages { | ||
stage('Trigger tests'){ | ||
matrix { | ||
|
@@ -72,27 +55,15 @@ spec: | |
} | ||
} | ||
post { | ||
aborted { | ||
emailext body: "Smoke Tests failed. Please go to ${BUILD_URL} and check the build failure", | ||
subject: "Smoke test for ${buildId} - ABORTED", | ||
to: "[email protected] [email protected] [email protected]", | ||
from:"[email protected]" | ||
} | ||
failure { | ||
emailext body: "Smoke Tests failed. Please go to ${BUILD_URL} and check the build failure", | ||
subject: "Smoke test for ${buildId} - FAILED", | ||
to: "[email protected] [email protected] [email protected]", | ||
from:"[email protected]" | ||
} | ||
unstable { | ||
emailext body: "Smoke Tests failed. Please go to ${BUILD_URL} and check the test failures", | ||
subject: "Smoke test for ${buildId} - UNSTABLE", | ||
unsuccessful { | ||
emailext subject: "Smoke test for ${buildId} - ${currentBuild.currentResult}", | ||
body: "Smoke Tests failed. Please go to ${BUILD_URL} and check the build failure", | ||
to: "[email protected] [email protected] [email protected]", | ||
from:"[email protected]" | ||
} | ||
success { | ||
emailext body: "Smoke Tests successful", | ||
subject: "Smoke test for ${buildId} - SUCCESS", | ||
emailext subject: "Smoke test for ${buildId} - SUCCESS", | ||
body: "Smoke Tests successful: ${BUILD_URL}", | ||
to: "[email protected] [email protected] [email protected]", | ||
from:"[email protected]" | ||
} | ||
|
@@ -104,6 +75,7 @@ def runSmokeTest(Closure executorAgent, String agentId, String os, String arch, | |
cleanWs() | ||
def javaHome = installJDK(javaVersion, os, arch) | ||
def antHome = tool(type:'ant', name:'apache-ant-latest') | ||
try { | ||
dir ("${WORKSPACE}/${agentId}-java${javaVersion}") { // run in a unique directory to allow distinction of archived build artifacts | ||
withEnv([ | ||
"JAVA_HOME=${javaHome}", "ANT_HOME=${ antHome }", | ||
|
@@ -154,8 +126,10 @@ def runSmokeTest(Closure executorAgent, String agentId, String os, String arch, | |
} | ||
} | ||
} | ||
archiveArtifacts '**/eclipse-testing/results/**, **/eclipse-testing/directorLogs/**, */*.properties, */*.txt' | ||
junit keepLongStdio: true, testResults: '**/eclipse-testing/results/xml/*.xml' | ||
} finally { | ||
archiveArtifacts allowEmptyArchive: true, artifacts: '**/eclipse-testing/results/**, **/eclipse-testing/directorLogs/**, */*.properties, */*.txt' | ||
} | ||
}) | ||
} | ||
|
||
|