# attach to the fd.io.dev apt repo
echo 'deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./' >> /etc/apt/sources.list
+
+ # Configure Ubuntu mirror
+ perl -pi -e 'unless(m{(security|fd\.io)}){ s{://[^/]+/}{://ca.archive.ubuntu.com/} }' /etc/apt/sources.list
;;
*)
# Do nothing on other distros for now
- 'csit-vpp-verify-perf-master-nightly-all'
- 'csit-docs-merge-{stream}'
- 'csit-docs-verify-{stream}'
+ - 'csit-report-merge-{stream}'
project: 'csit'
branch: 'master'
build-timeout: '1440'
triggers:
- - timed: '0 20 * * *'
+ - timed: '0 20 * * Sun,Tue,Thu'
builders:
- shell: 'echo "BRANCH_ID={branch-id}" > $WORKSPACE/variables.prop'
- fdio-infra-shiplogs:
maven-version: 'mvn33-new'
+- job-template:
+ name: 'csit-report-merge-{stream}'
+
+ project-type: freestyle
+ node: 'ubuntu1604-basebuild-4c-4g'
+ concurrent: false
+
+ 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}'
+ - maven-exec:
+ maven-version: 'mvn33-new'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: 'jenkins-gerrit-credentials'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'default'
+
+ wrappers:
+ - fdio-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - fdio-infra-wrappers-non-activity-timeout:
+ build-timeout: 360
+
+ triggers:
+ - gerrit:
+ server-name: 'Primary'
+ trigger-on:
+ - comment-added-contains-event:
+ comment-contains-value: 'run-report'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ skip-vote:
+ successful: true
+ failed: true
+ unstable: true
+ notbuilt: true
+
+ builders:
+ - maven-target:
+ maven-version: 'mvn33-new'
+ goals: '--version'
+ settings: 'csit-settings'
+ settings-type: cfp
+ global-settings: 'global-settings'
+ global-settings-type: cfp
+ - provide-maven-settings:
+ settings-file: 'csit-settings'
+ global-settings-file: 'global-settings'
+ - shell:
+ !include-raw-escape: include-raw-csit-report.sh
+
+ publishers:
+ - archive:
+ artifacts: 'resources/tools/report_gen/csit.report.tar.gz'
+ allow-empty: 'true'
+ fingerprint: false
+ only-if-success: true
+ default-excludes: false
+
+ - fdio-infra-shiplogs:
+ maven-version: 'mvn33-new'
+
- parameter:
name: test-type-parameter
parameters:
--- /dev/null
+#!/bin/bash
+
+set -xe -o pipefail
+
+[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site"
+[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/csit
+[ "$DOC_DIR" ] || DOC_DIR=resources/tools/report_gen
+[ "$BUILD_DIR" ] || BUILD_DIR=${DOC_DIR}/_build
+[ "$SITE_DIR" ] || SITE_DIR=build-root/docs/deploy-site
+[ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources/report
+[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn"
+
+cd ${DOC_DIR}
+chmod +x ./run_report.sh
+./run_report.sh ${GERRIT_BRANCH}
+
+retval=$?
+if [ ${retval} -ne "0" ]; then
+ echo "Report generation failed!"
+exit ${retval}
+fi
+
+if [[ ${JOB_NAME} == *merge* ]]; then
+
+ cd ${WORKSPACE}
+
+ mkdir -p ${RESOURCES_DIR}
+ mv -f ${BUILD_DIR}/* ${RESOURCES_DIR}
+ cd ${SITE_DIR}
+
+ cat > pom.xml << EOF
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.csit</groupId>
+ <artifactId>docs</artifactId>
+ <version>1.0.0</version>
+ <packaging>pom</packaging>
+ <properties>
+ <generateReports>false</generateReports>
+ </properties>
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>2.9</version>
+ </extension>
+ </extensions>
+ </build>
+ <distributionManagement>
+ <site>
+ <id>fdio-site</id>
+ <url>dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${GERRIT_BRANCH}</url>
+ </site>
+ </distributionManagement>
+ </project>
+EOF
+
+ ${MVN} site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C
+
+ cd -
+
+fi
default: '{is-csit-vpp-job}'
description: "Parameter is True if this is a CSIT vpp job."
+- parameter:
+ name: stream-parameter
+ parameters:
+ - string:
+ name: STREAM
+ default: '{stream}'
+ description: "Stream job parameter to be used in shell scripts."
+
##### SCMS
- scm:
- 'hc2vpp-csit-integration-{stream}-{os}'
- 'hc2vpp-csit-verify-{stream}-{os}'
project: 'hc2vpp'
- branch: 'master'
- branch-id: 'master'
build-artifact-num-to-keep: 10
stream:
- master:
branch: 'master'
repo-stream-part: 'master'
+ - '1701':
+ branch: 'stable/1701'
+ repo-stream-part: 'stable.1701'
os:
- ubuntu1404:
repo-os-part: 'ubuntu.trusty.main'
name: 'hc2vpp-csit-integration-{stream}-{os}'
project-type: freestyle
- node: 'ubuntu1604-basebuild-4c-4g'
+ node: 'ubuntu1404-basebuild-4c-4g'
concurrent: true
logrotate:
project: '{project}'
- os-parameter:
os: '{os}'
+ - stream-parameter:
+ stream: '{stream}'
scm:
- git-scm:
triggers:
- reverse:
- jobs: 'hc2vpp-verify-{stream}-{os}'
+ jobs: 'hc2vpp-integration-{stream}-{os}'
result: 'success'
prebuilders:
name: 'hc2vpp-csit-verify-{stream}-{os}'
project-type: maven
- node: 'ubuntu1604-basebuild-4c-4g'
+ node: 'ubuntu1404-basebuild-4c-4g'
concurrent: true
logrotate:
maven: 'mvn33-new'
- maven-exec:
maven-version: 'mvn33-new'
+ - stream-parameter:
+ stream: '{stream}'
scm:
- gerrit-trigger-scm:
set -xeu -o pipefail
# Clone csit and start tests
-git clone https://gerrit.fd.io/r/csit --branch master
+if [ ${STREAM} == 'master' ]; then
+ git clone https://gerrit.fd.io/r/csit --branch master
+else
+ git clone https://gerrit.fd.io/r/csit --branch 'rls'${STREAM}
+fi
# If the git clone fails, complain clearly and exit
if [ $? != 0 ]; then
# make sure that bootstrap.sh is executable
chmod +x bootstrap-hc2vpp-integration.sh
# run the script
- ./bootstrap-hc2vpp-integration.sh
+ if [ ${STREAM} == 'master' ]; then
+ ./bootstrap-hc2vpp-integration.sh ${STREAM}
+ else
+ ./bootstrap-hc2vpp-integration.sh 'stable.'${STREAM}
+ fi
fi
# vim: ts=4 ts=4 sts=4 et :
#!/bin/bash
set -xeu -o pipefail
-current_dir = `pwd`
+current_dir=`pwd`
cd ${WORKSPACE}
-# Clone csit and run package download script
-git clone https://gerrit.fd.io/r/csit --branch master
+# Get CSIT branch from which to test from
+# running build-root/scripts/csit-test-branch
+if [ -f csit-test-branch ]; then
+ chmod +x csit-test-branch
+ CSIT_BRANCH=`./csit-test-branch`
+fi
+
+# Clone csit and start tests
+git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
# If the git clone fails, complain clearly and exit
if [ $? != 0 ]; then
- echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch master"
+ echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
exit
fi
-./csit/resources/tools/download_hc_build_pkgs.sh
+if [ ${STREAM} == 'master' ]; then
+ ./csit/resources/tools/download_hc_build_pkgs.sh ${STREAM}
+else
+ ./csit/resources/tools/download_hc_build_pkgs.sh 'stable.'${STREAM}
+fi
cd ${current_dir}
--- /dev/null
+#!/bin/bash
+set -e -o pipefail
+echo $WORKSPACE
+git clone https://github.com/google/googletest.git $WORKSPACE/googletest
+cmake $WORKSPACE/googletest/CMakeLists.txt
+make -C $WORKSPACE/googletest
+echo GTEST_DIR=$WORKSPACE/googletest/googletest > gtest-env.prop
+echo GMOCK_DIR=$WORKSPACE/googletest/googlemock >> gtest-env.prop
+
+echo "*******************************************************************"
+echo "* GTEST BUILD SUCCESSFULLY COMPLETED"
+echo "*******************************************************************"
+
echo "sha1sum of this script: ${0}"
sha1sum $0
+# Make TLDK
make
echo "*******************************************************************"
echo "* TLDK BUILD SUCCESSFULLY COMPLETED"
echo "*******************************************************************"
+
+# Run unit tests application
+$WORKSPACE/x86_64-native-linuxapp-gcc/app/gtest-rfc --lcores=0 -n 2
+
+echo "*******************************************************************"
+echo "* TLDK UNIT TESTS SUCCESSFUL"
+echo "*******************************************************************"
branch: '{branch}'
builders:
+ - shell:
+ !include-raw-escape: gtest-build.sh
+ - inject:
+ properties-file: gtest-env.prop
- shell:
!include-raw-escape: include-raw-build.sh
notbuilt: true
builders:
+ - shell:
+ !include-raw-escape: gtest-build.sh
+ - inject:
+ properties-file: gtest-env.prop
- shell:
!include-raw-escape: include-raw-build.sh
branch: '{branch}'
builders:
+ - shell:
+ !include-raw-escape: gtest-build.sh
+ - inject:
+ properties-file: gtest-env.prop
- shell:
!include-raw-escape: include-raw-build.sh
# DEB Install VPP packages to shorten build times
echo "---> Installing VPP DEB_DEPENDS packages $(date +'%Y%m%dT%H%M%S')"
- VPP_PKGS="curl build-essential autoconf automake bison libssl-dev ccache debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd libconfuse-dev git-review exuberant-ctags cscope indent"
+ VPP_PKGS="curl build-essential autoconf automake bison libssl-dev ccache debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd libconfuse-dev git-review exuberant-ctags cscope indent pkg-config"
apt install -y ${VPP_PKGS}
# DEB Install latest kernel and uio
# separate group installs from package installs since a non-existing
# group with dnf based systems (F21+) will fail the install if such
# a group does not exist
- yum install -y -q unzip xz puppet git perl-XML-XPath wget make
+ yum install -y -q unzip xz puppet git git-review perl-XML-XPath wget make
# All of our systems require Java (because of Jenkins)
# Install all versions of the OpenJDK devel but force 1.7.0 to be the
alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64
;;
esac
+
+ # Needed to parse OpenStack commands used by infra
+ # stack commands to initialize Heat template based systems.
+ yum install -y jq
}
ubuntu_systems() {
# add in stuff we know we need
echo "---> Installing base packages"
- apt-get install -qq unzip xz-utils puppet git libxml-xpath-perl make wget > /dev/null
+ apt-get install -qq unzip xz-utils puppet git git-review libxml-xpath-perl make wget > /dev/null
# install Java 7
echo "---> Configuring OpenJDK"
update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
+ # Needed to parse OpenStack commands used by infra
+ # stack commands to initialize Heat template based systems.
+ apt-get install -qq jq > /dev/null
+
# disable unattended upgrades & daily updates
echo '---> Disabling automatic daily upgrades'
- apt-get remove unattended-upgrades
- if [ -f /usr/bin/systemctl ]
- then
- systemctl stop apt.systemd.daily
- systemctl disable apt.systemd.daily
- else
- /etc/init.d/unattended-upgrades stop
- update-rc.d -f unattended-upgrades remove
- fi
+ sed -ine 's/"1"/"0"/g' /etc/apt/apt.conf.d/10periodic
+ echo 'APT::Periodic::Unattended-Upgrade "0";' >> /etc/apt/apt.conf.d/10periodic
}
all_systems() {