diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-02-11 13:47:44 +0100 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-02-15 10:18:53 +0100 |
commit | ad682cc1bcc04b8ea27f1e535c45240702769a7c (patch) | |
tree | 3901f3fae3f89416da249b2238da261c8cfabbac /jjb/jvpp | |
parent | 4b64bb80416e67acacb3408b6703a1f39ca8e195 (diff) |
JVPP-22: introduce jvpp-verify job
Change-Id: Ie762e087046224b458eda9184b741ce2707edccb
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'jjb/jvpp')
-rw-r--r-- | jjb/jvpp/include-raw-jvpp-build.sh | 56 | ||||
-rw-r--r-- | jjb/jvpp/jvpp.yaml | 92 |
2 files changed, 148 insertions, 0 deletions
diff --git a/jjb/jvpp/include-raw-jvpp-build.sh b/jjb/jvpp/include-raw-jvpp-build.sh new file mode 100644 index 000000000..7a0a5fa71 --- /dev/null +++ b/jjb/jvpp/include-raw-jvpp-build.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# basic build script example +set -xe -o pipefail + +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') + +echo OS_ID: ${OS_ID} +echo OS_VERSION_ID: ${OS_VERSION_ID} + +# do nothing but print the current slave hostname +hostname +export CCACHE_DIR=/tmp/ccache +if [[ -d ${CCACHE_DIR} ]];then + echo ${CCACHE_DIR} exists + du -sk ${CCACHE_DIR} +else + echo ${CCACHE_DIR} does not exist. This must be a new slave. +fi + +echo "cat /etc/bootstrap.sha" +if [[ -f /etc/bootstrap.sha ]];then + cat /etc/bootstrap.sha +else + echo "Cannot find cat /etc/bootstrap.sha" +fi + +echo "cat /etc/bootstrap-functions.sha" +if [[ -f /etc/bootstrap-functions.sha ]];then + cat /etc/bootstrap-functions.sha +else + echo "Cannot find cat /etc/bootstrap-functions.sha" +fi + +echo "sha1sum of this script: ${0}" +sha1sum $0 + +echo "CC=${CC}" + +echo "Building using \"make package\"" +# ensure that we build from scratch +./clean.sh +[[ "x${DRYRUN}" == "xTrue" ]] || cd Requirements && make UNATTENDED=yes install-dep && cd .. +[[ "x${DRYRUN}" == "xTrue" ]] || pwd +if [[ "${OS_ID}" == "centos" ]]; then + [[ "x${DRYRUN}" == "xTrue" ]] || cmake3 . +else + [[ "x${DRYRUN}" == "xTrue" ]] || cmake . +fi + +[[ "x${DRYRUN}" == "xTrue" ]] || make package +# This will build deb or rpm JVPP package based on OS. Built packages are located in build-root/packages/ + +echo "*******************************************************************" +echo "* JVPP BUILD SUCCESSFULLY COMPLETED" +echo "*******************************************************************" diff --git a/jjb/jvpp/jvpp.yaml b/jjb/jvpp/jvpp.yaml new file mode 100644 index 000000000..1a99ed2cb --- /dev/null +++ b/jjb/jvpp/jvpp.yaml @@ -0,0 +1,92 @@ +--- +- project: + name: jvpp + jobs: + - 'jvpp-verify-{stream}-{os}' + project: 'jvpp' + os: + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + skip-site: 'false' + skip-jar-deploy: 'false' + - ubuntu1804: + repo-os-part: 'ubuntu.bionic.main' + skip-site: 'false' + skip-jar-deploy: 'false' + - centos7: + repo-os-part: 'centos7' + skip-site: 'true' + skip-jar-deploy: 'true' + stream: + - master: + branch: 'master' + repo-stream-part: 'master' + +- project: + name: jvpp-view + views: + - project-view + project-name: jvpp + +- job-template: + name: 'jvpp-verify-{stream}-{os}' + + project-type: freestyle + node: '{os}-us' + concurrent: true + + build-discarder: + 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}' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + - stream-parameter: + stream: '{stream}' + + 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: + - ../scripts/setup_jvpp_dev_env.sh + - include-raw-jvpp-build.sh + + publishers: + - archive: + artifacts: > + **/build-root/packages/*.rpm, + **/build-root/packages/*.deb + + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - naginator: + rerun-unstable-builds: false + max-failed-builds: 2 + fixed-delay: 90 + - email-notification: + email-prefix: '[jvpp]' |