blob: a4a468839e2526f66f585537d340473361fbad84 [file] [log] [blame]
Jeremy Ronquillo257d1e42020-03-17 16:54:26 -07001// Copyright 2020-present Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// comac-in-a-box build+test
16// steps taken from https://guide.opencord.org/profiles/comac/install/ciab.html
17
18pipeline {
19
20 /* no label, executor is determined by JJB */
21 agent {
22 label "${params.buildNode}"
23 }
24
25 options {
26 timeout(time: 1, unit: 'HOURS')
27 }
28
29 stages {
30 stage ("Fetch Helm-Charts Changes"){
31 steps {
32 sh label: 'Fetch helm-charts Gerrit Changes', script: """
33 cd cord/helm-charts/
34 pwd
35 if [ ! -z "${GERRIT_REFSPEC}" ]
36 then
37 echo "Checking out Gerrit patchset: ${GERRIT_REFSPEC}"
38 git fetch ${gitUrl} ${GERRIT_REFSPEC} && git checkout FETCH_HEAD
39 else
40 echo "GERRIT_REFSPEC not provided. Checking out master branch."
41 git checkout master
42 fi
43 """
44 }
45 }
46
47 stage ("Run COMAC-in-a-box"){
48 steps {
49 sh label: 'Run Makefile', script: '''
50 HOME=$(pwd)
51 cd automation-tools/comac-in-a-box/
52 sudo make reset-test
53 sudo make test
54 '''
55 }
56 }
57 }
58}