1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Added test timeouts to all stages

This commit is contained in:
Ewout Prangsma 2018-06-14 15:44:09 +02:00
parent 812b861be4
commit a42e8becfd
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698

View file

@ -58,17 +58,19 @@ def kubeConfigRoot = "/home/jenkins/.kube"
def buildBuildSteps(Map myParams) {
return {
timestamps {
withEnv([
"DEPLOYMENTNAMESPACE=${myParams.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${myParams.DOCKERNAMESPACE}",
"IMAGETAG=jenkins-test",
"LONG=${myParams.LONG ? 1 : 0}",
"TESTOPTIONS=${myParams.TESTOPTIONS}",
]) {
sh "make clean"
sh "make"
sh "make run-unit-tests"
sh "make docker-test"
timeout(time: 15) {
withEnv([
"DEPLOYMENTNAMESPACE=${myParams.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${myParams.DOCKERNAMESPACE}",
"IMAGETAG=jenkins-test",
"LONG=${myParams.LONG ? 1 : 0}",
"TESTOPTIONS=${myParams.TESTOPTIONS}",
]) {
sh "make clean"
sh "make"
sh "make run-unit-tests"
sh "make docker-test"
}
}
}
}
@ -77,18 +79,20 @@ def buildBuildSteps(Map myParams) {
def buildTestSteps(Map myParams, String kubeConfigRoot, String kubeconfig) {
return {
timestamps {
withCredentials([string(credentialsId: 'ENTERPRISEIMAGE', variable: 'DEFAULTENTERPRISEIMAGE')]) {
withEnv([
"CLEANDEPLOYMENTS=1",
"DEPLOYMENTNAMESPACE=${myParams.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${myParams.DOCKERNAMESPACE}",
"ENTERPRISEIMAGE=${myParams.ENTERPRISEIMAGE}",
"IMAGETAG=jenkins-test",
"KUBECONFIG=${kubeConfigRoot}/${kubeconfig}",
"LONG=${myParams.LONG ? 1 : 0}",
"TESTOPTIONS=${myParams.TESTOPTIONS}",
]) {
sh "make run-tests"
timeout(time: myParams.LONG ? 180 : 30) {
withCredentials([string(credentialsId: 'ENTERPRISEIMAGE', variable: 'DEFAULTENTERPRISEIMAGE')]) {
withEnv([
"CLEANDEPLOYMENTS=1",
"DEPLOYMENTNAMESPACE=${myParams.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${myParams.DOCKERNAMESPACE}",
"ENTERPRISEIMAGE=${myParams.ENTERPRISEIMAGE}",
"IMAGETAG=jenkins-test",
"KUBECONFIG=${kubeConfigRoot}/${kubeconfig}",
"LONG=${myParams.LONG ? 1 : 0}",
"TESTOPTIONS=${myParams.TESTOPTIONS}",
]) {
sh "make run-tests"
}
}
}
}
@ -98,14 +102,16 @@ def buildTestSteps(Map myParams, String kubeConfigRoot, String kubeconfig) {
def buildCleanupSteps(Map myParams, String kubeConfigRoot, String kubeconfig) {
return {
timestamps {
withEnv([
"DEPLOYMENTNAMESPACE=${myParams.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${myParams.DOCKERNAMESPACE}",
"KUBECONFIG=${kubeConfigRoot}/${kubeconfig}",
]) {
sh "./scripts/collect_logs.sh ${env.DEPLOYMENTNAMESPACE} ${kubeconfig}"
archive includes: 'logs/*'
sh "make cleanup-tests"
timeout(time: 15) {
withEnv([
"DEPLOYMENTNAMESPACE=${myParams.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${myParams.DOCKERNAMESPACE}",
"KUBECONFIG=${kubeConfigRoot}/${kubeconfig}",
]) {
sh "./scripts/collect_logs.sh ${env.DEPLOYMENTNAMESPACE} ${kubeconfig}"
archive includes: 'logs/*'
sh "make cleanup-tests"
}
}
}
}