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 /jjb/csit/include-raw-csit-cpta.sh | |
parent | de41dd26f5c342c486c23d8e21bab32e58d50f0c (diff) |
Add the trending job
Change-Id: I49ab44eed3326fd0b3490d70900c93a07ff9b394
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'jjb/csit/include-raw-csit-cpta.sh')
-rw-r--r-- | jjb/csit/include-raw-csit-cpta.sh | 60 |
1 files changed, 60 insertions, 0 deletions
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 |