3 # Copyright (c) 2020 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 [ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site"
19 [ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/csit
20 [ "$DOC_DIR" ] || DOC_DIR=resources/tools/doc_gen
21 [ "$BUILD_DIR" ] || BUILD_DIR=${DOC_DIR}/_build
22 [ "$SITE_DIR" ] || SITE_DIR=build-root/docs/deploy-site
23 [ "$RESOURCES_DIR" ] || RESOURCES_DIR=${SITE_DIR}/src/site/resources/doc
24 [ "$MVN" ] || MVN="/opt/apache/maven/bin/mvn"
28 ./run_doc.sh ${GERRIT_BRANCH}
31 if [ ${retval} -ne "0" ]; then
32 echo "Documentation generation failed!"
36 if [[ ${JOB_NAME} == *merge* ]]; then
40 mkdir -p ${RESOURCES_DIR}
41 mv -f ${BUILD_DIR}/* ${RESOURCES_DIR}
45 <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">
46 <modelVersion>4.0.0</modelVersion>
47 <groupId>io.fd.csit</groupId>
48 <artifactId>docs</artifactId>
49 <version>1.0.0</version>
50 <packaging>pom</packaging>
52 <generateReports>false</generateReports>
57 <groupId>org.apache.maven.wagon</groupId>
58 <artifactId>wagon-webdav-jackrabbit</artifactId>
59 <version>2.10</version>
63 <distributionManagement>
66 <url>dav:${DOCS_REPO_URL}/${PROJECT_PATH}/${GERRIT_BRANCH}</url>
68 </distributionManagement>
72 ${MVN} site:site site:deploy -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}" -T 4C