summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-11-28 08:44:14 -0600
committerEd Warnicke <eaw@cisco.com>2016-11-28 08:44:14 -0600
commit3ac86aceb13ba8b6f025e7152315a24c5b6242ec (patch)
treecc386d0d95bbe8d2a590860e7da2194b590bce47
parent57e450b4bd17336d9ded0de27a4143f6035e6196 (diff)
Update to trex job to build from trex repo
Change-Id: I2a619c74d1318447f6e64e0fbc6e9b46889b146d Signed-off-by: Ed Warnicke <eaw@cisco.com>
-rw-r--r--jjb/trex/include-raw-trex-build.sh47
-rw-r--r--jjb/trex/trex.yaml67
2 files changed, 66 insertions, 48 deletions
diff --git a/jjb/trex/include-raw-trex-build.sh b/jjb/trex/include-raw-trex-build.sh
index 24049ac0b..4fe22b556 100644
--- a/jjb/trex/include-raw-trex-build.sh
+++ b/jjb/trex/include-raw-trex-build.sh
@@ -1,53 +1,26 @@
#!/bin/bash -ex
-# emulate unique name for now
-GERRIT_NEWREV=hash`date +%s%N`
-WS=${PWD}/$GERRIT_NEWREV
-
-# temporary don't fail
-set +e
-
-function clean_ws {
- rm -rf "$WS"
-}
-trap clean_ws EXIT
-
-echo "$WS"
-clean_ws
-mkdir "$WS"
-cd "$WS"
-
-# cloning
-
-git clone https://github.com/cisco-system-traffic-generator/trex-core.git
-git clone https://github.com/cisco-system-traffic-generator/trex-doc.git
-ls -l
-
# building core
-cd trex-core/linux_dpdk
+cd linux_dpdk
./b configure
./b build
cd -
-cd trex-core/linux
+cd linux
./b configure
./b build
cd -
-which asciidoc
-which sphinx-build
-which dblatex
-which python
-which python3
-which pip
-
# building docs
+# Commented out to trex-docs is integrated into trex repo
-cd trex-doc
-./b configure
-./b build
-cd -
+#cd trex-doc
+#./b configure
+#./b build
+#cd -
-echo Done
+echo "*******************************************************************"
+echo "* TREX BUILD SUCCESSFULLY COMPLETED"
+echo "*******************************************************************"
diff --git a/jjb/trex/trex.yaml b/jjb/trex/trex.yaml
index 21863c62b..065f05198 100644
--- a/jjb/trex/trex.yaml
+++ b/jjb/trex/trex.yaml
@@ -2,6 +2,7 @@
name: trex
jobs:
- 'trex-verify-{stream}-{os}'
+ - 'trex-merge-{stream}-{os}'
project: 'trex'
os:
@@ -22,10 +23,10 @@
concurrent: true
logrotate:
- artifactDaysToKeep: '-1'
- artifactNumToKeep: '-1'
- daysToKeep: '30'
- numToKeep: '100'
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
parameters:
- project-parameter:
@@ -34,20 +35,64 @@
branch: '{branch}'
- os-parameter:
os: '{os}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: 'jenkins-gerrit-credentials'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - fdio-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ triggers:
+ - gerrit-trigger-patch-submitted:
+ name: '{project}'
+ branch: '{branch}'
+
+ builders:
+ - shell:
+ !include-raw-escape: include-raw-trex-build.sh
+
+- job-template:
+ name: 'trex-merge-{stream}-{os}'
+
+ project-type: freestyle
+ node: 'verify-{os}'
+ concurrent: true
+
+ logrotate:
+ daysToKeep: '{build-days-to-keep}'
+ numToKeep: '{build-num-to-keep}'
+ artifactDaysToKeep: '{build-artifact-days-to-keep}'
+ artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: '{branch}'
+ - os-parameter:
+ os: '{os}'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: 'jenkins-gerrit-credentials'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
wrappers:
- fdio-infra-wrappers:
build-timeout: '{build-timeout}'
triggers:
- - timed: H */6 * * *
+ - gerrit-trigger-patch-merged:
+ name: '{project}'
+ branch: '{branch}'
builders:
- shell:
!include-raw-escape: include-raw-trex-build.sh
- description: "!!! Playground to verify that TRex and docs can be built. !!!\r\n\
- \r\n\
- TODO:\r\n\
- 1) merge doc and core repos\r\n\
- 2) replace pull from github by fd.io gerrit with triggering\r\n\
- 3) add a real regression\r\n\r\n"
+