Skip to content

Commit

Permalink
BMO e2e pipeline matrix
Browse files Browse the repository at this point in the history
This adds a matrix to the BMO e2e pipeline so that both VBMC and
sushy-tools can be tested in parallel.
  • Loading branch information
lentzi90 committed Dec 12, 2023
1 parent bfab53e commit db67df9
Showing 1 changed file with 49 additions and 33 deletions.
82 changes: 49 additions & 33 deletions jenkins/jobs/bmo_e2e_tests.pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,60 @@ def branch = env.ghprbActualCommit ?: "main"
def repoUrl = env.ghprbAuthorRepoGitUrl ?: "https://github.com/metal3-io/baremetal-operator.git"

pipeline {
agent { label "metal3-workers" }
agent none
stages {
stage("Checkout source code") {
steps {
checkout scmGit(
branches: [[name: branch]],
userRemoteConfigs: [[url: repoUrl, credentialsId: "metal3-jenkins-github-token"]],
extensions: [[$class: "WipeWorkspace"],
[$class: "CleanCheckout"],
[$class: "CleanBeforeCheckout"]],
submoduleCfg: [],)
script {
CURRENT_START_TIME = System.currentTimeMillis()
}
}
}
stage("Run Baremetal Operator e2e tests") {
options {
timeout(time: TIMEOUT, unit: "SECONDS")
ansiColor("xterm")
}
steps {
withCredentials([string(credentialsId: "metal3-clusterctl-github-token", variable: "GITHUB_TOKEN")]) {
sh "./hack/ci-e2e.sh"
matrix {
agent { label "metal3-workers" }
axes {
axis {
name 'BMO_E2E_EMULATOR'
values 'vbmc', 'sushy-tools'
}
}
}
post {
always {
script {
CURRENT_END_TIME = System.currentTimeMillis()
if ((((CURRENT_END_TIME - CURRENT_START_TIME)/1000) - TIMEOUT) > 0) {
echo "Failed due to timeout"
currentBuild.result = "FAILURE"
environment {
BMO_E2E_EMULATOR = "${BMO_E2E_EMULATOR}"
}
stages {
stage("Checkout source code") {
steps {
checkout scmGit(
branches: [[name: branch]],
userRemoteConfigs: [[url: repoUrl, credentialsId: "metal3-jenkins-github-token"]],
extensions: [[$class: "WipeWorkspace"],
[$class: "CleanCheckout"],
[$class: "CleanBeforeCheckout"]],
submoduleCfg: [],)
script {
CURRENT_START_TIME = System.currentTimeMillis()
}
}
}
stage("Run Baremetal Operator e2e tests") {
options {
timeout(time: TIMEOUT, unit: "SECONDS")
ansiColor("xterm")
}
steps {
withCredentials([string(credentialsId: "metal3-clusterctl-github-token", variable: "GITHUB_TOKEN")]) {
sh "./hack/ci-e2e.sh"
}
}
post {
always {
script {
CURRENT_END_TIME = System.currentTimeMillis()
if ((((CURRENT_END_TIME - CURRENT_START_TIME)/1000) - TIMEOUT) > 0) {
echo "Failed due to timeout"
currentBuild.result = "FAILURE"
}
}
archiveArtifacts "artifacts.tar.gz"
/* Clean up */
sh "make clean-e2e"
}
}
}
archiveArtifacts "artifacts.tar.gz"
/* Clean up */
sh "make clean-e2e"
}
}
}
Expand Down

0 comments on commit db67df9

Please sign in to comment.