summaryrefslogtreecommitdiffstats
path: root/build-composite.sh
blob: 4cda205b2c0e31f0b928d309d0058d75bb1d9f25 (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
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

GIT_CLONE_BASE=${GIT_CLONE_BASE:-ssh://gerrit.opnfv.org:29418}
GERRIT_BRANCH=${GERRIT_BRANCH:-master}


git_clone() {
    _repo="$1"

    [[ -d "$_repo" ]] && return 0
    git clone -b $GERRIT_BRANCH --depth 1 --quiet $GIT_CLONE_BASE/$_repo
}


git_clone releng

repos=$(grep -v '^#' releng/jjb/opnfvdocs/project.cfg | sort)

[[ -e docs/projects ]] && rm -rf docs/projects
mkdir -p docs/projects

echo
echo "Cloning repos of participating OPNFV Projects and copying docs"
echo
mkdir -p docs_build/projects
pushd docs_build/projects
for repo in $repos; do
    echo "    $repo ($GERRIT_BRANCH)"
    git_clone $repo
    cp -r $repo/docs ../../docs/projects/$repo
done
popd

# NOTE: automated link generation is not ready...
#echo
#echo "Creating document links"
#echo
#for guide in configguide userguide
#do
#    link_list=$WORKSPACE/docs/$guide/projects-$guide.rst
#    for repo in $repos
#    do
#        file=projects/$repo/$guide/$guide.rst
#        [[ -e $WORKSPACE/docs/$file ]] || continue
#        echo "" >> $link_list
#        echo "$repo:" >> $link_list
#        echo ".. include:: ../$file" >> $link_list
#    done
#done

./releng/utils/docs-build.sh

echo "Done"