Add jobs for stc runs on bazel built onos
Change-Id: I959482ae94770ded761b6652e9f5cc10d96b09eb
diff --git a/jjb/onos/onos-run-bazel-stc-hag.sh b/jjb/onos/onos-run-bazel-stc-hag.sh
new file mode 100644
index 0000000..067cd78
--- /dev/null
+++ b/jjb/onos/onos-run-bazel-stc-hag.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# exit on errors
+set -eu -o pipefail
+
+# initialize build environment
+ONOS_ROOT=`pwd`
+. tools/build/envDefaults
+
+# initialize development environment for STC
+export JAVA_HOME=
+. tools/dev/bash_profile
+
+# Install bazel
+curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.15.2/bazel-0.15.2-installer-linux-x86_64.sh
+chmod +x bazel.sh
+./bazel.sh --user
+PATH=$PATH:/home/jenkins/bin
+
+# always free the cell when exiting
+function cleanup {
+ cell return jenkins-${ONOS_VERSION}
+}
+
+trap cleanup EXIT
+
+# grab a cell to run on
+cell borrow 30 3+1 jenkins-${ONOS_VERSION}
+
+# build onos bits
+bazel build onos
+
+# set up STC parameters
+topo default
+export stcDumpLogs="true"
+export stcColor="false"
+export stcHaltOnError="false"
+export TERM="vt100"
+
+# run STC
+stc setup && stc net-trellis-hag-smoke
diff --git a/jjb/onos/onos-run-bazel-stc.sh b/jjb/onos/onos-run-bazel-stc.sh
new file mode 100644
index 0000000..55b8587
--- /dev/null
+++ b/jjb/onos/onos-run-bazel-stc.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# exit on errors
+set -eu -o pipefail
+
+# initialize build environment
+ONOS_ROOT=`pwd`
+. tools/build/envDefaults
+
+# initialize development environment for STC
+export JAVA_HOME=
+. tools/dev/bash_profile
+
+# Install bazel
+curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.15.2/bazel-0.15.2-installer-linux-x86_64.sh
+chmod +x bazel.sh
+./bazel.sh --user
+PATH=$PATH:/home/jenkins/bin
+
+# always free the cell when exiting
+function cleanup {
+ cell return jenkins-${ONOS_VERSION}
+}
+
+trap cleanup EXIT
+
+# grab a cell to run on
+cell borrow 30 3+1 jenkins-${ONOS_VERSION}
+
+# build onos bits
+bazel build onos
+
+# set up STC parameters
+topo default
+export stcDumpLogs="true"
+export stcColor="false"
+export stcHaltOnError="false"
+export TERM="vt100"
+
+# run STC
+stc
diff --git a/jjb/onos/onos-verify.yaml b/jjb/onos/onos-verify.yaml
index ebf6181..7fa5a3d 100644
--- a/jjb/onos/onos-verify.yaml
+++ b/jjb/onos/onos-verify.yaml
@@ -598,6 +598,17 @@
#put shell scripts in file then make sure shell check is installed on verify vms
- shell: !include-raw-escape: onos-run-stc.sh
+- job-template:
+ name: 'onos-{stream}-bazel-stc-verify'
+
+ <<: *job_boiler_plate
+ # yamllint disable-line rule:key-duplicates
+ <<: *hourly_boiler_plate
+
+ builders:
+ #put shell scripts in file then make sure shell check is installed on verify vms
+ - shell: !include-raw-escape: onos-run-bazel-stc.sh
+
- job-template:
name: 'onos-{stream}-stc-hag-verify'
@@ -611,6 +622,18 @@
- shell: !include-raw-escape: onos-run-stc-hag.sh
+- job-template:
+ name: 'onos-{stream}-bazel-stc-hag-verify'
+
+ <<: *job_boiler_plate
+ # yamllint disable-line rule:key-duplicates
+ <<: *hourly_boiler_plate
+
+ builders:
+ #put shell scripts in file then make sure shell check is installed on verify vms
+ - shell: !include-raw-escape: onos-run-bazel-stc-hag.sh
+
+
- project:
name: onos
project-name: onos
@@ -816,6 +839,20 @@
- 'onos-{stream}-stc-verify'
- project:
+ name: onos-bazel-stc-verify
+ project-name: onos-bazel-stc-verify
+ project: onos
+
+ build-timeout: '30'
+ build-node: 'ubuntu16.04-basebuild-8c-15g'
+
+ stream:
+ - 'master'
+
+ jobs:
+ - 'onos-{stream}-bazel-stc-verify'
+
+- project:
name: onos-stc-hag-verify
project-name: onos-stc-hag-verify
project: onos
@@ -830,3 +867,17 @@
jobs:
- 'onos-{stream}-stc-hag-verify'
+
+- project:
+ name: onos-bazel-stc-hag-verify
+ project-name: onos-bazel-stc-hag-verify
+ project: onos
+
+ build-timeout: '30'
+ build-node: 'ubuntu16.04-basebuild-8c-15g'
+
+ stream:
+ - 'master'
+
+ jobs:
+ - 'onos-{stream}-bazel-stc-hag-verify'