diff options
author | Tibor Frank <tifrank@cisco.com> | 2018-03-15 15:25:13 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-03-15 15:25:13 +0100 |
commit | f6a8fd6b8c05a23af37556ee5d33c901ed01ebb2 (patch) | |
tree | 4dc85d8893a356292bfb0698844a69ebcbe690e7 | |
parent | de41dd26f5c342c486c23d8e21bab32e58d50f0c (diff) |
Add the trending job
Change-Id: I49ab44eed3326fd0b3490d70900c93a07ff9b394
Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r-- | jjb/csit/csit.yaml | 71 | ||||
-rw-r--r-- | jjb/csit/include-raw-csit-cpta.sh | 60 |
2 files changed, 131 insertions, 0 deletions
diff --git a/jjb/csit/csit.yaml b/jjb/csit/csit.yaml index cbbea9c1f..4ed4c9270 100644 --- a/jjb/csit/csit.yaml +++ b/jjb/csit/csit.yaml @@ -29,6 +29,7 @@ - 'csit-docs-merge-{stream_timed}' - 'csit-docs-verify-{stream}' - 'csit-report-merge-{stream}' + - 'csit-trending-daily-master' - 'csit-vpp-perf-trend-daily-master' - 'csit-vpp-perf-trend-semi-weekly-master' - 'csit-vpp-perf-check-{stream}' @@ -1654,6 +1655,76 @@ maven-version: 'mvn33-new' - job-template: + name: 'csit-trending-daily-master' + + project-type: freestyle + node: 'ubuntu1604-basebuild-8c-32g' + 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-non-activity-timeout: + build-timeout: '{build-timeout}' + + triggers: + - reverse: + jobs: 'csit-vpp-perf-mrr-daily-master' + result: 'success' + - gerrit: + server-name: 'Primary' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'run-trending' + 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-cpta.sh + + publishers: + - fdio-infra-shiplogs: + maven-version: 'mvn33-new' + +- job-template: name: 'csit-vpp-perf-trend-daily-master' description: | diff --git a/jjb/csit/include-raw-csit-cpta.sh b/jjb/csit/include-raw-csit-cpta.sh new file mode 100644 index 000000000..db37feb78 --- /dev/null +++ b/jjb/csit/include-raw-csit-cpta.sh @@ -0,0 +1,60 @@ +#!/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/presentation +[ "$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/trending +[ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn" + +cd ${DOC_DIR} +chmod +x ./run_cpta.sh +./run_cpta.sh +retval=$? + +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 - + + +if [ ${retval} -ne "0" ]; then + echo "FAIL" +fi +exit ${retval}
\ No newline at end of file |