Skip to content

Commit 9073ef2

Browse files
committed
First shot at getting Jenkins to build fast docs
1 parent 2d1aef7 commit 9073ef2

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

Jenkinsfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,38 @@ node {
2020
deleteDir()
2121
checkout scm
2222
sh "git fetch"
23+
24+
dir('ReDoc-Customized') {
25+
checkout poll: false, scm: [
26+
$class: 'GitSCM',
27+
branches: [[name: 'development']],
28+
doGenerateSubmoduleConfigurations: false,
29+
credentialsId: "baker",
30+
extensions: [[
31+
$class: 'WipeWorkspace',
32+
], [
33+
$class: 'RelativeTargetDirectory',
34+
relativeTargetDir: 'ReDoc-customized',
35+
], [
36+
$class: 'CloneOption',
37+
noTags: false,
38+
]],
39+
userRemoteConfigs: [[
40+
refspec: "+refs/heads/*:refs/remotes/origin/*",
41+
url: '[email protected]:LinodeAPI/ReDoc-customized',
42+
]]
43+
]
44+
}
2345
}
2446

2547
stage('Build Docker') {
2648
BUILD_NAME = URLDecoder.decode(env.BUILD_TAG, "UTF-8").replaceAll("[^a-zA-Z0-9_.-]", "_")
2749
image = docker.build(BUILD_NAME.toLowerCase(), '.')
50+
image.inside() { c ->
51+
dir('ReDoc-customized/ReDoc-customized') {
52+
sh "yarn install"
53+
sh "yarn bundle"
54+
}
2855
}
2956

3057
stage ('Apply Substitutions') {

build-docs.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ set -x -e
88
# if run from the vagrant project switch to linode-api-docs to mimic baker
99
[[ -d "linode-api-docs" ]] && cd linode-api-docs
1010

11+
# run the static site builder
12+
redoc-cli bundle openapi.yaml --options.hideDownloadButton=true --options.pathInMiddlePanel=true --options.requiredPropsFirst=true --options.expandResponses="200,"
13+
14+
1115
export HOME='/target'
1216
echo $HOME
1317

0 commit comments

Comments
 (0)