diff options
Diffstat (limited to 'jjb/csit')
-rw-r--r-- | jjb/csit/csit.yaml | 77 | ||||
-rw-r--r-- | jjb/csit/include-raw-csit-report.sh | 63 |
2 files changed, 140 insertions, 0 deletions
diff --git a/jjb/csit/csit.yaml b/jjb/csit/csit.yaml index 734749872..5fd970c3d 100644 --- a/jjb/csit/csit.yaml +++ b/jjb/csit/csit.yaml @@ -11,6 +11,7 @@ - 'csit-vpp-verify-perf-master-nightly-all' - 'csit-docs-merge-{stream}' - 'csit-docs-verify-{stream}' + - 'csit-report-merge-{stream}' project: 'csit' branch: 'master' @@ -760,6 +761,82 @@ - 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: '' + 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: diff --git a/jjb/csit/include-raw-csit-report.sh b/jjb/csit/include-raw-csit-report.sh new file mode 100644 index 000000000..059c09db7 --- /dev/null +++ b/jjb/csit/include-raw-csit-report.sh @@ -0,0 +1,63 @@ +#!/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 +[ "$REPORT_DIR" ] || REPORT_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 ${REPORT_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 |