Add Intel TestInfra pipeline
@@ -13,7 +13,6 @@ AGENTS_LABELS = [
// Jenkinsfiles and actual testing logic located <TBD>
def TriggerIntelJob(String jobname) {
stage("${jobname}") {
- node(AGENTS_LABELS["ubuntu-nonsgx"]) {
withCredentials([
usernamePassword(credentialsId: 'intel-jenkins-builder', passwordVariable: 'INTEL_TOKEN', usernameVariable: 'JENKINS_USER'),
string(credentialsId: 'intel-jenkins-url', variable: 'INTEL_URL')]) {
@@ -23,8 +22,11 @@ def TriggerIntelJob(String jobname) {
def image = docker.image('openenclave/jenkinsoperator:intel')
image.pull()
image.inside() {
+ withEnv(["JOBNAME=${jobname}"]) {
dir("${WORKSPACE}") {
- sh "python3 /scripts/intel/jenkins_trigger.py --job Pipelines/job/${jobname} --jenkins-user ${JENKINS_USER} --url ${INTEL_URL} --jenkins-password ${INTEL_TOKEN} --sleep 60"
+ sh '''
+ echo $JOBNAME && python3 /scripts/intel/jenkins_trigger.py --job Pipelines/job/$JOBNAME --jenkins-user $JENKINS_USER --url $INTEL_URL --jenkins-password $INTEL_TOKEN --sleep 60
+ '''
}
}
}
@@ -32,14 +34,26 @@ def TriggerIntelJob(String jobname) {
}
}
+node("ubuntu-nonsgx") {
+ properties(
+ [
+ parameters(
+ [
+ string(name: 'PULL_NUMBER', defaultValue: 'master'),
+ booleanParam(name: 'FULL_TEST_SUITE', defaultValue: 'false')
+ ]
+ )
+ ]
+ )
+ stage('Trigger') {
try{
// We only test against the Intel infrastructure if full test is enabled. As the Intel CI
// Jenkinsfiles are not integrated yet we have no sanity check, no need to not block PR's.
-
- if(FULL_TEST_SUITE == "true") {
+ if("${FULL_TEST_SUITE}" == "true") {
def testing_stages = [
"Intel Agnostic-SGX-FLC-Linux ": { TriggerIntelJob('Agnostic-SGX-FLC-Linux')},
- "Intel Agnostic-SGX1-Linux ": { TriggerIntelJob('Agnostic-SGX1-Linux')}
+ "Intel Agnostic-SGX1-Linux ": { TriggerIntelJob('Agnostic-SGX1-Linux')},
+ "Intel OpenEnclave-TestInfra": { TriggerIntelJob('OpenEnclave-TestInfra')}
]
parallel testing_stages
}
@@ -48,7 +62,7 @@ try{
GLOBAL_ERROR = e
throw e
} finally {
- // As builds are failing out of our control, unblock E2E builds by overriding build result to success
- // currentBuild.result = (GLOBAL_ERROR != null) ? 'FAILURE' : "SUCCESS"
- currentBuild.result = 'SUCCESS'
+ currentBuild.result = (GLOBAL_ERROR != null) ? 'FAILURE' : "SUCCESS"
+ }
+ }
}
