ci: initialize multibranch webhook fixture
This commit is contained in:
1 parent
887715ff9f
commit
faf352663e
1 file changed
+33
Vendored
+33
@@ -0,0 +1,33 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
options { timeout(time: 60, unit: 'SECONDS') }
|
||||||
|
stages {
|
||||||
|
stage('Checkout and identify change') {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
echo "BRANCH_NAME=${env.BRANCH_NAME ?: ''}"
|
||||||
|
echo "CHANGE_ID=${env.CHANGE_ID ?: ''}"
|
||||||
|
echo "CHANGE_TARGET=${env.CHANGE_TARGET ?: ''}"
|
||||||
|
script {
|
||||||
|
def scenario = readFile('ci/scenario.txt').trim()
|
||||||
|
if (!(scenario in ['success', 'unstable', 'failure'])) {
|
||||||
|
error("Unsupported demo scenario: ${scenario}")
|
||||||
|
}
|
||||||
|
env.SCENARIO = scenario
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Build and report') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
int status = sh(script: 'sh ci/demo-build.sh', returnStatus: true)
|
||||||
|
junit 'reports/*.xml'
|
||||||
|
if (status != 0) error("Demo build exited with status ${status}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always { archiveArtifacts artifacts: 'artifacts/*', allowEmptyArchive: true }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user