summaryrefslogtreecommitdiffstats
path: root/jjb/vpp/include-raw-vpp-docs.sh
blob: 076004b13c40649d02c80f2b9ee849698e783e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
set -e
[ "$DOCS_REPO_URL" ] || DOCS_REPO_URL="https://nexus.fd.io/content/sites/site/"
[ "$PROJECT_PATH" ] || PROJECT_PATH=io/fd/vpp
[ "$DOCS_FILE" ] || DOC_FILE=vpp.docs.zip
[ "$DOC_DIR" ] || DOC_DIR=build-root/docs/html
if [ ${BRANCH} == "stable/1609"]; then
  VERSION=16.09
else
  echo "************************************"
  echo "* ${BRANCH} does not publish docs  *"
  echo "************************************"
  exit
fi
MVN="/opt/apache/maven/bin/mvn"

make doxygen
cd ${DOC_DIR}
zip ${DOC_FILE} .
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.vpp</groupId>
  <artifactId>docs</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>maven-upload-plugin</artifactId>
        <version>0.0.1</version>
        <executions>
          <execution>
            <id>publish-site</id>
            <phase>deploy</phase>
            <goals>
              <goal>upload-file</goal>
            </goals>
            <configuration>
              <serverId>opendaylight-log-archives</serverId>
              <repositoryUrl>$DOCS_REPO_URL/content-compressed</repositoryUrl>
              <file>${DOC_FILE}</file>
              <repositoryPath>${PROJECT_PATH}</repositoryPath>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
EOF
${MVN} deploy -gs $GLOBAL_SETTINGS_FILE -s $SETTINGS_FILE
cd -