From: Mauro Sardara Date: Mon, 27 Mar 2017 12:38:22 +0000 (+0200) Subject: First Jenkins Job Builder configuration for CICN X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=25139553f31c68e8e6f5fba51f706fbec5a7f367;p=ci-management.git First Jenkins Job Builder configuration for CICN Change-Id: I797a5fa2e38c256d1d9ba8b4141d6e8987ceeb11 Signed-off-by: Mauro Sardara --- diff --git a/jjb/cicn/build-package.sh b/jjb/cicn/build-package.sh new file mode 100644 index 000000000..d2d944b58 --- /dev/null +++ b/jjb/cicn/build-package.sh @@ -0,0 +1,151 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +update_cmake_repo_trusty() { + sudo apt-get install -y --allow-unauthenticated software-properties-common + sudo add-apt-repository --yes ppa:george-edison55/cmake-3.x +} + +update_cmake_repo_centos() { + sudo cat << EOF > cmake.repo +[cmake-repo] +name=Repo for cmake3 +baseurl=http://mirror.ghettoforge.org/distributions/gf/el/7/plus/x86_64/ +enabled=1 +gpgcheck=0 +EOF + sudo cat << EOF > jsoncpp.repo +[jsoncp-repo] +name=Repo for jsoncpp +baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64/ +enabled=1 +gpgcheck=0 +EOF + sudo mv cmake.repo /etc/yum.repos.d/cmake.repo + sudo mv jsoncpp.repo /etc/yum.repos.d/jsoncpp.repo +} + +setup() { + + DISTRIB_ID=$1 + DISTRIB_CODENAME=$2 + + if ! [ -z ${REPO_NAME} ]; then + REPO_URL="${NEXUSPROXY}/content/repositories/fd.io.${REPO_NAME}" + echo "REPO_URL: ${REPO_URL}" + else + exit -1 + fi + + if [ $DISTRIB_ID == "Ubuntu" ]; then + if [ "$DISTRIB_CODENAME" == "trusty" ]; then + update_cmake_repo_trusty + fi + + echo "deb ${REPO_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.list + + sudo apt-get update + elif [ "$DISTRIB_ID" == "CentOS" ]; then + update_cmake_repo_centos + sudo cat << EOF > fdio-master.repo +[fdio-master] +name=fd.io master branch latest merge +baseurl=${REPO_URL} +enabled=1 +gpgcheck=0 +EOF + sudo mv fdio-master.repo /etc/yum.repos.d/fdio-master.repo + fi +} + +build_package() { + + ARCHITECTURE=`uname -m` + + # Figure out what system we are running on + if [ -f /etc/lsb-release ];then + . /etc/lsb-release + source ./ubuntu-dependencies + DEB=ON + RPM=OFF + + if [ "$ARCHITECTURE" == "x86_64" ]; then + ARCHITECTURE="amd64" + fi + + elif [ -f /etc/redhat-release ];then + source ./centos-dependencies + sudo yum install -y redhat-lsb + DISTRIB_ID=`lsb_release -si` + DISTRIB_RELEASE=`lsb_release -sr` + DISTRIB_CODENAME=`lsb_release -sc` + DISTRIB_DESCRIPTION=`lsb_release -sd` + + DEB=OFF + RPM=ON + else + echo "ERROR: System configuration not recognized. Build failed" + exit -1 + fi + + echo ARCHITECTURE: $ARCHITECTURE + echo DISTRIB_ID: $DISTRIB_ID + echo DISTRIB_RELEASE: $DISTRIB_RELEASE + echo DISTRIB_CODENAME: $DISTRIB_CODENAME + echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION + + setup $DISTRIB_ID $DISTRIB_CODENAME + + if [ $DISTRIB_ID == "Ubuntu" ]; then + echo $BUILD_TOOLS ${!PACKAGE_DEPS} | xargs sudo apt-get install -y --allow-unauthenticated + elif [ $DISTRIB_ID == "CentOS" ]; then + echo $BUILD_TOOLS_GROUP | xargs sudo yum groupinstall -y --nogpgcheck || true + echo $BUILD_TOOLS_SINGLE | xargs sudo yum install -y --nogpgcheck || true + echo ${!PACKAGE_DEPS} | xargs sudo yum install -y --nogpgcheck || true + fi + + # do nothing but print the current slave hostname + hostname + + # Install package dependencies + + 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 + + # Make the package + mkdir -p build && pushd build + + rm -rf * + cmake -DCMAKE_INSTALL_PREFIX=/usr -DRPM_PACKAGE=$RPM -DDEB_PACKAGE=$DEB -DDISTRIBUTION=$DISTRIB_CODENAME -DARCHITECTURE=$ARCHITECTURE .. + make package + + echo "*******************************************************************" + echo "* $PACKAGE_NAME BUILD SUCCESSFULLY COMPLETED" + echo "*******************************************************************" + + exit 0 +} \ No newline at end of file diff --git a/jjb/cicn/centos-dependencies b/jjb/cicn/centos-dependencies new file mode 100644 index 000000000..7c2a41ed0 --- /dev/null +++ b/jjb/cicn/centos-dependencies @@ -0,0 +1,16 @@ +#!/bin/bash + +set -euo pipefail +IFS=$'\n\t' + +BUILD_TOOLS_GROUP="'Development Tools'" +BUILD_TOOLS_SINGLE="cmake" +LIBSSL_LIBEVENT="libevent-devel openssl-devel" +LONGBOW_DEPS="" +LIBPARC_DEPS="longbow $LIBSSL_LIBEVENT" +LIBCCNX_COMMON_DEPS="$LIBPARC_DEPS libparc" +LIBCCNX_TRANSPORT_RTA_DEPS="$LIBCCNX_COMMON_DEPS libccnx-common" +LIBCCNX_PORTAL_DEPS="$LIBCCNX_TRANSPORT_RTA_DEPS libccnx-transport-rta" +LIBICNET_DEPS="$LIBCCNX_PORTAL_DEPS boost-devel" +METIS_DEPS="$LIBCCNX_TRANSPORT_RTA_DEPS libccnx-transport-rta" +HTTP_SERVER_DEPS="$LIBICNET_DEPS libicnet boost-devel" \ No newline at end of file diff --git a/jjb/cicn/cicn.yaml b/jjb/cicn/cicn.yaml new file mode 100644 index 000000000..2d355a0ad --- /dev/null +++ b/jjb/cicn/cicn.yaml @@ -0,0 +1,711 @@ +- project: + name: cicn-longbow + jobs: + - 'cicn-longbow-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'cframework/master' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- project: + name: cicn-libparc + jobs: + - 'cicn-libparc-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'cframework/libparc' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- project: + name: cicn-libccnx-common + jobs: + - 'cicn-libccnx-common-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'ccnxlibs/master' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- project: + name: cicn-libccnx-transport-rta + jobs: + - 'cicn-libccnx-transport-rta-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'ccnxlibs/master' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- project: + name: cicn-libccnx-portal + jobs: + - 'cicn-libccnx-portal-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'ccnxlibs/master' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- project: + name: cicn-libicnet + jobs: + - 'cicn-libicnet-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'libicnet/master' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- project: + name: cicn-metis + jobs: + - 'cicn-metis-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'sb-forwarder/master' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- project: + name: cicn-http-server + jobs: + - 'cicn-http-server-merge-{stream}-{os}' + project: 'cicn' + os: + - ubuntu1404: + repo-os-part: 'ubuntu.trusty.main' + - ubuntu1604: + repo-os-part: 'ubuntu.xenial.main' + - centos7: + repo-os-part: 'centos7' + stream: + - master: + branch: 'http-server/master' + repo-stream-part: 'cicn.master' + type: + - short + - long + +- job-template: + name: 'cicn-longbow-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-longbow-build.sh + - provide-maven-settings: + settings-file: 'cicn-longbow-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-libparc-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-libparc-build.sh + - provide-maven-settings: + settings-file: 'cicn-libparc-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-libccnx-common-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-libccnx-common-build.sh + - provide-maven-settings: + settings-file: 'cicn-libccnx-common-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-libccnx-transport-rta-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-libccnx-transport-rta-build.sh + - provide-maven-settings: + settings-file: 'cicn-libccnx-transport-rta-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-libccnx-portal-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-libccnx-portal-build.sh + - provide-maven-settings: + settings-file: 'cicn-libccnx-portal-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-libicnet-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-libicnet-build.sh + - provide-maven-settings: + settings-file: 'cicn-libicnet-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-metis-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-metis-build.sh + - provide-maven-settings: + settings-file: 'cicn-metis-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: + name: 'cicn-http-server-merge-{stream}-{os}' + + project-type: freestyle + node: '{os}-basebuild-4c-4g' + + 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}' + - maven-project-parameter: + maven: 'mvn33-new' + - maven-exec: + maven-version: 'mvn33-new' + - repo-name-parameter: + repo-name: '{repo-stream-part}.{repo-os-part}' + + scm: + - gerrit-trigger-scm: + credentials-id: 'jenkins-gerrit-credentials' + refspec: '' + choosing-strategy: 'default' + + wrappers: + - fdio-infra-wrappers: + build-timeout: '{build-timeout}' + + triggers: + - gerrit-trigger-patch-merged: + name: '{project}' + branch: '{branch}' + + builders: + - maven-target: + maven-version: 'mvn33-new' + goals: '--version' + settings: 'cicn-settings' + settings-type: cfp + global-settings: 'global-settings' + global-settings-type: cfp + - shell: + !include-raw-escape: + - include-raw-cicn-http-server-build.sh + - provide-maven-settings: + settings-file: 'cicn-http-server-settings' + global-settings-file: 'global-settings' + - shell: + !include-raw-escape: + - ../scripts/maven_push_functions.sh + - include-raw-cicn-maven-push.sh + publishers: + - archive: + artifacts: 'build/*.rpm,build/*.deb' + allow-empty: 'true' + fingerprint: false + only-if-success: true + default-excludes: false + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-http-server-build.sh b/jjb/cicn/include-raw-cicn-http-server-build.sh new file mode 100644 index 000000000..872b43d4f --- /dev/null +++ b/jjb/cicn/include-raw-cicn-http-server-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +PACKAGE_NAME="HTTP_SERVER" +PACKAGE_DEPS="HTTP_SERVER_DEPS" +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-libccnx-common-build.sh b/jjb/cicn/include-raw-cicn-libccnx-common-build.sh new file mode 100644 index 000000000..02dcee7e0 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-libccnx-common-build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +PACKAGE_NAME="LIBCCNX_COMMON" +PACKAGE_DEPS="LIBCCNX_COMMON_DEPS" +cd libccnx-common +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-libccnx-portal-build.sh b/jjb/cicn/include-raw-cicn-libccnx-portal-build.sh new file mode 100644 index 000000000..ad840308e --- /dev/null +++ b/jjb/cicn/include-raw-cicn-libccnx-portal-build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +PACKAGE_NAME="LIBCCNX_PORTAL" +PACKAGE_DEPS="LIBCCNX_PORTAL_DEPS" +cd libccnx-portal +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-libccnx-transport-rta-build.sh b/jjb/cicn/include-raw-cicn-libccnx-transport-rta-build.sh new file mode 100644 index 000000000..7c7cfef57 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-libccnx-transport-rta-build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +LIBCCNX_TRANSPORT_RTA="LIBCCNX_TRANSPORT_RTA" +LIBCCNX_TRANSPORT_RTA_DEPS="LIBCCNX_TRANSPORT_RTA_DEPS" +cd libccnx-transport-rta +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-libicnet-build.sh b/jjb/cicn/include-raw-cicn-libicnet-build.sh new file mode 100644 index 000000000..c707a6ca1 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-libicnet-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +PACKAGE_NAME="LIBICNET" +PACKAGE_DEPS="LIBICNET_DEPS" +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-libparc-build.sh b/jjb/cicn/include-raw-cicn-libparc-build.sh new file mode 100644 index 000000000..cfbc065c9 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-libparc-build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +PACKAGE_NAME="LIBPARC" +PACKAGE_DEPS="LIBPARC_DEPS" +cd libparc +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-longbow-build.sh b/jjb/cicn/include-raw-cicn-longbow-build.sh new file mode 100644 index 000000000..c2b9e8d69 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-longbow-build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +PACKAGE_NAME="LONGBOW" +PACKAGE_DEPS="LONGBOW_DEPS" +cd longbow +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/include-raw-cicn-maven-push.sh b/jjb/cicn/include-raw-cicn-maven-push.sh new file mode 100644 index 000000000..0d476b581 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-maven-push.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -xe -o pipefail +echo "*******************************************************************" +echo "* STARTING PUSH OF PACKAGES TO REPOS" +echo "* NOTHING THAT HAPPENS BELOW THIS POINT IS RELATED TO BUILD FAILURE" +echo "*******************************************************************" + +[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" +GROUP_ID="io.fd.${PROJECT}" +BASEURL="${NEXUSPROXY}/content/repositories/fd.io." +BASEREPOID='fdio-' + +if [ "${OS}" == "ubuntu1404" ]; then + # Find the files + JARS=$(find . -type f -iname '*.jar') + DEBS=$(find . -type f -iname '*.deb') + for i in $JARS + do + push_jar "$i" + done + + for i in $DEBS + do + push_deb "$i" + done +elif [ "${OS}" == "ubuntu1604" ]; then + DEBS=$(find . -type f -iname '*.deb') + for i in $DEBS + do + push_deb "$i" + done +elif [ "${OS}" == "centos7" ]; then + # Find the files + RPMS=$(find . -type f -iname '*.rpm') + SRPMS=$(find . -type f -iname '*.srpm') + SRCRPMS=$(find . -type f -name '*.src.rpm') + for i in $RPMS $SRPMS $SRCRPMS + do + push_rpm "$i" + done +fi +# vim: ts=4 sw=4 sts=4 et ft=sh : diff --git a/jjb/cicn/include-raw-cicn-metis-build.sh b/jjb/cicn/include-raw-cicn-metis-build.sh new file mode 100644 index 000000000..77d375491 --- /dev/null +++ b/jjb/cicn/include-raw-cicn-metis-build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# basic build script example +set -euo pipefail +IFS=$'\n\t' + +source ./build-package.sh + +PACKAGE_NAME="METIS" +PACKAGE_DEPS="METIS_DEPS" +cd metis +build_package $PACKAGE_NAME $PACKAGE_DEPS \ No newline at end of file diff --git a/jjb/cicn/ubuntu-dependencies b/jjb/cicn/ubuntu-dependencies new file mode 100644 index 000000000..cb349ac26 --- /dev/null +++ b/jjb/cicn/ubuntu-dependencies @@ -0,0 +1,15 @@ +#!/bin/bash + +set -euo pipefail +IFS=$'\n\t' + +BUILD_TOOLS="build-essential cmake" +LIBSSL_LIBEVENT="libevent-dev libssl-dev" +LONGBOW_DEPS="" +LIBPARC_DEPS="longbow $LIBSSL_LIBEVENT" +LIBCCNX_COMMON_DEPS="$LIBPARC_DEPS libparc" +LIBCCNX_TRANSPORT_RTA_DEPS="$LIBCCNX_COMMON_DEPS libccnx-common" +LIBCCNX_PORTAL_DEPS="$LIBCCNX_TRANSPORT_RTA_DEPS libccnx-transport-rta" +LIBICNET_DEPS="$LIBCCNX_PORTAL_DEPS libboost-system-dev" +METIS_DEPS="$LIBCCNX_TRANSPORT_RTA_DEPS libccnx-transport-rta" +HTTP_SERVER_DEPS="$LIBICNET_DEPS libicnet libboost-regex-dev libboost-filesystem-dev" \ No newline at end of file