blob: d1922b6f12d9bffc749a1cb9aaf64628e41aade4 [file] [log] [blame]
Kailash Khalasie43352e2018-06-15 18:46:40 -07001/* mcord-in-a-box 6.0 pipeline build and test*/
2
3pipeline {
4
5 /* no label, executor is determined by JJB */
6 agent {
7 label "${params.executorNode}"
8 }
9
10 stages {
11
12 stage ('Checkout Automation-Tools Repo') {
13 steps {
14 sh '''
15 pushd $WORKSPACE
16 git clone https://gerrit.opencord.org/automation-tools
17 popd
18 '''
19 }
20 }
21
22 stage ('Install MCORD') {
23 steps {
24 sh '''
25 pushd $WORKSPACE
26 ./automation-tools/mcord/mcord-in-a-box.sh
27 popd
28 '''
29 }
30 }
31
32 stage ('Test MCORD') {
33 steps {
34 sh '''
35 pushd $WORKSPACE
36 git clone https://gerrit.opencord.org/mcord
37 cd mcord/test
38 ansible-playbook -i localhost, mcord-cavium-test-playbook.yml
39 popd
40 '''
41 }
42 }
43 }
44
45 post {
46 always {
47 sh '''
48 pushd $WORKSPACE
49 kubectl get pods --all-namespaces
50 if [ -x "/usr/bin/helm" ]; then
51 helm list
52 helm delete --purge xos-core
53 helm delete --purge mcord
54 helm delete --purge base-openstack
55 helm reset --force
56 fi
57 if [ -x "/usr/bin/kubelet" ]; then
58 sudo rm /usr/bin/kubelet
59 fi
60 popd
61 '''
62 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
63 }
64 }
65}