From 1777abc6a69189b5db615579308baa40ea74ff83 Mon Sep 17 00:00:00 2001 From: Yuxiang Zhu Date: Jan 10 2019 02:23:10 +0000 Subject: CI/CD: Fix issues in integration tests I found sometimes an integration test job fails with OOMKilled status in OpenShift log. This pull-request will increase the memory limit of the Jenkins slave pod. Another change is treating `currentBuild.result == null` as success. --- diff --git a/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile b/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile index 265c0e7..91cdb22 100644 --- a/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile +++ b/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile @@ -28,10 +28,10 @@ pipeline { key: '.dockerconfigjson' resources: requests: - memory: 384Mi + memory: 512Mi cpu: 200m limits: - memory: 512Mi + memory: 768Mi cpu: 300m """ } @@ -160,6 +160,9 @@ pipeline { post { always { script { + // currentBuild.result == null || currentBuild.result == 'SUCCESS' indicates a successful build, + // because it's possible that the pipeline engine hasn't set the value nor seen an error when reaching to this line. + // See example code in https://jenkins.io/doc/book/pipeline/jenkinsfile/#deploy def sendResult = sendCIMessage \ providerName: 'Red Hat UMB', \ overrides: [topic: 'VirtualTopic.eng.ci.container-image.test.complete'], \ @@ -198,7 +201,7 @@ pipeline { }], "type": "tier1", "category": "integration", - "status": "${currentBuild.result == 'SUCCESS' ? 'passed':'failed'}", + "status": "${currentBuild.result == null || currentBuild.result == 'SUCCESS' ? 'passed':'failed'}", "xunit": "${env.BUILD_URL}/artifacts/junit-functional-tests.xml", "namespace": "waiverdb-test", "version": "0.1.0"