adding siab e2e test job using pipeline
Change-Id: I7c811f8e16171b0adf83fe7bdcb3f21f612d19e0
diff --git a/jjb/pipeline/siab.groovy b/jjb/pipeline/siab.groovy
new file mode 100644
index 0000000..4ba085b
--- /dev/null
+++ b/jjb/pipeline/siab.groovy
@@ -0,0 +1,95 @@
+/* seba-in-a-box build+test */
+
+pipeline {
+
+ /* no label, executor is determined by JJB */
+ agent {
+ label "${params.executorNode}"
+ }
+
+ options {
+ timeout(20, MINUTES)
+ }
+
+ stages {
+
+ stage ("Clean workspace") {
+ steps {
+ sh 'rm -rf *'
+ }
+ }
+
+ stage ('Checkout Automation-Tools Repo') {
+ steps {
+ sh '''
+ pushd $WORKSPACE
+ git clone https://gerrit.opencord.org/automation-tools
+ popd
+ '''
+ }
+ }
+
+ stage ('Reset Kubeadm') {
+ steps {
+ sh """
+ pushd $WORKSPACE/automation-tools/seba-in-a-box
+ make reset-kubeadm
+ popd
+ """
+ }
+ }
+
+ stage ('Install SEBA') {
+ steps {
+ sh """
+ pushd $WORKSPACE/automation-tools/seba-in-a-box
+ make -j2
+ popd
+ """
+ }
+ }
+
+ stage ('Run E2E Tests') {
+ steps {
+ sh """
+ pushd $WORKSPACE/automation-tools/seba-in-a-box
+ make run-tests
+ popd
+ """
+ }
+ }
+
+ stage('Publish') {
+ steps {
+ sh """
+ if [ -d RobotLogs ]; then rm -r RobotLogs; fi; mkdir RobotLogs
+ cp -r $WORKSPACE/cord/test/cord-tester/src/test/cord-api/Tests/WorkflowValidations/*ml ./RobotLogs
+ """
+ step([$class: 'RobotPublisher',
+ disableArchiveOutput: false,
+ logFileName: 'RobotLogs/log*.html',
+ otherFiles: '',
+ outputFileName: 'RobotLogs/output*.xml',
+ outputPath: '.',
+ passThreshold: 100,
+ reportFileName: 'RobotLogs/report*.html',
+ unstableThreshold: 0]);
+ }
+ }
+
+ }
+
+ post {
+ always {
+ sh '''
+
+ mkdir -p /tmp/logs
+ sudo cp /var/log/containers/*.log /tmp/logs
+ sudo chown cord /tmp/logs/*.log
+
+ '''
+ archiveArtifacts artifacts: '/tmp/logs/*.log'
+ step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "andy@opennetworking.org, kailash@opennetworking.org", sendToIndividuals: false])
+ }
+ }
+}
diff --git a/jjb/siab.yaml b/jjb/siab.yaml
new file mode 100644
index 0000000..33768d8
--- /dev/null
+++ b/jjb/siab.yaml
@@ -0,0 +1,45 @@
+---
+# kubespray installation validation job
+
+- project:
+ name: seba-in-a-box
+
+ project-name: '{name}'
+
+ jobs:
+ - 'siab-build-test'
+
+- job-template:
+ id: 'siab-build-test'
+ name: 'seba-in-a-box-build-test'
+
+ description: |
+ <!-- Managed by Jenkins Job Builder -->
+ Created by {id} job-template from ci-management/jjb/siba.yaml <br /><br />
+ E2E Validation for Seba-in-a-Box
+
+ properties:
+ - cord-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ parameters:
+ - string:
+ name: executorNode
+ default: 'qct-pod3-node1'
+ description: 'Name of the Jenkins node to run the job on'
+
+ project-type: pipeline
+ concurrent: false
+
+ dsl: !include-raw-escape: pipeline/siab.groovy
+
+ triggers:
+ - timed: |
+ TZ=America/Los_Angeles
+ H */4 * * *