|
1 |
| -Building docs in a container |
2 |
| -============================ |
| 1 | +# Building docs in a container |
3 | 2 |
|
4 | 3 | This set of scripts lets you build docs in a container.
|
5 | 4 | Currently, it's aimed towards using buildah on oslo-dc.
|
6 | 5 |
|
7 |
| -Prereq |
8 |
| ------- |
| 6 | +## Prereq |
9 | 7 |
|
10 | 8 | You will need to have the following repos checked out:
|
11 | 9 |
|
12 |
| -* core (used for changelog, examples) |
13 |
| -* nova (used for changelog) |
14 |
| -* enterprise (used for changelog) |
15 |
| -* masterfiles (used to document masterfies) |
16 |
| -* documentation |
| 10 | +- core (used for changelog, examples) |
| 11 | +- nova (used for changelog) |
| 12 | +- enterprise (used for changelog) |
| 13 | +- masterfiles (used to document masterfies) |
| 14 | +- documentation |
17 | 15 |
|
18 |
| -Usage |
19 |
| ------ |
| 16 | +## Usage |
20 | 17 |
|
21 | 18 | If you have buildah installed:
|
22 | 19 |
|
23 | 20 | 1. clone the above repos (run `clone.sh`)
|
24 | 21 |
|
25 | 22 | 2. export the following env variables:
|
| 23 | + - `$BRANCH` - Branch that we're actually building artifacts for, |
| 24 | + for example, 3.18, master, or pr |
26 | 25 |
|
27 |
| - * `$BRANCH` - Branch that we're actually building artifacts for, |
28 |
| - for example, 3.18, master, or pr |
| 26 | + - `$PACKAGE_JOB` - where to take CFEngine HUB package from, |
| 27 | + a dir at http://buildcache.cloud.cfengine.com/packages/, |
| 28 | + usually `testing-pr` |
29 | 29 |
|
30 |
| - * `$PACKAGE_JOB` - where to take CFEngine HUB package from, |
31 |
| - a dir at http://buildcache.cloud.cfengine.com/packages/, |
32 |
| - usually `testing-pr` |
| 30 | + - `$PACKAGE_UPLOAD_DIRECTORY` - where to take CFEngine HUB package from, |
| 31 | + a dir at http://buildcache.cloud.cfengine.com/packages/testing-pr/, |
| 32 | + for example, `jenkins-master-nightly-pipeline-943` |
33 | 33 |
|
34 |
| - * `$PACKAGE_UPLOAD_DIRECTORY` - where to take CFEngine HUB package from, |
35 |
| - a dir at http://buildcache.cloud.cfengine.com/packages/testing-pr/, |
36 |
| - for example, `jenkins-master-nightly-pipeline-943` |
37 |
| - |
38 |
| - * `$PACKAGE_BUILD` - RELEASE of the build to be downloaded, usually 1 |
| 34 | + - `$PACKAGE_BUILD` - RELEASE of the build to be downloaded, usually 1 |
39 | 35 |
|
40 | 36 | 3. `cd` to directory with all repos and run `run.sh` from this dir
|
41 | 37 |
|
42 |
| -Details |
43 |
| -------- |
| 38 | +## Details |
44 | 39 |
|
45 | 40 | To make a container, cd to this directory and run:
|
46 | 41 |
|
47 |
| - buildah build-using-dockerfile -t docs . |
| 42 | + buildah build-using-dockerfile -t docs . |
48 | 43 |
|
49 | 44 | or
|
50 | 45 |
|
51 |
| - docker build --tag docs . |
| 46 | + docker build --tag docs . |
52 | 47 |
|
53 | 48 | To run docs job in a container, run:
|
54 | 49 |
|
55 |
| - c=$(buildah from -v $PWD:/nt docs) |
56 |
| - buildah run $c bash -x documentation/generator/build/main.sh $BRANCH $PACKAGE_JOB $PACKAGE_UPLOAD_DIRECTORY $PACKAGE_BUILD |
57 |
| - buildah run $c bash -x documentation/generator/_scripts/_publish.sh $BRANCH |
58 |
| - buildah rm $c |
| 50 | + c=$(buildah from -v $PWD:/nt docs) |
| 51 | + buildah run $c bash -x documentation/generator/build/main.sh $BRANCH $PACKAGE_JOB $PACKAGE_UPLOAD_DIRECTORY $PACKAGE_BUILD |
| 52 | + buildah run $c bash -x documentation/generator/_scripts/_publish.sh $BRANCH |
| 53 | + buildah rm $c |
59 | 54 |
|
60 | 55 | or
|
61 | 56 |
|
62 |
| - docker run --rm -it -v $PWD:/nt docs bash -x documentation/generator/build/main.sh $BRANCH $PACKAGE_JOB $PACKAGE_UPLOAD_DIRECTORY $PACKAGE_BUILD |
63 |
| - docker run --rm -it -v $PWD:/nt docs bash -x documentation/generator/_scripts/_publish.sh $BRANCH |
| 57 | + docker run --rm -it -v $PWD:/nt docs bash -x documentation/generator/build/main.sh $BRANCH $PACKAGE_JOB $PACKAGE_UPLOAD_DIRECTORY $PACKAGE_BUILD |
| 58 | + docker run --rm -it -v $PWD:/nt docs bash -x documentation/generator/_scripts/_publish.sh $BRANCH |
0 commit comments