-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #567 from lesserwhirls/docker-docs
Build docs using docker
- Loading branch information
Showing
8 changed files
with
159 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# copies of shared files used by documentation build | ||
**/_data/topnav.yml | ||
**/sitemap*.xml | ||
**/sitemap*.xml | ||
*/.jekyll-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
pipeline { | ||
agent { label 'main' } | ||
stages { | ||
stage('Bootstrap documentation') { | ||
agent { | ||
docker { | ||
image 'docker.unidata.ucar.edu/thredds-test-environment:latest' | ||
// Run the container on the node specified at the | ||
// top-level of the Pipeline, in the same workspace, | ||
// rather than on a new node entirely: | ||
reuseNode true | ||
} | ||
} | ||
steps { | ||
sh '''#!/bin/bash -l | ||
select-java temurin 17 | ||
./gradlew :docs:copySharedJekyllFiles | ||
''' | ||
} | ||
} | ||
stage('Build adminguide') { | ||
steps { | ||
sh '''docker run --rm \ | ||
-e SRC_DIR=/tds/docs/adminguide/src/site \ | ||
-e DOCS_UID=$(id -u) \ | ||
-v .:/tds \ | ||
-v ./docs/build/site/adminguide:/site \ | ||
docker.unidata.ucar.edu/unidata-jekyll-docs:0.0.4 build | ||
''' | ||
} | ||
} | ||
stage('Build devguide') { | ||
steps { | ||
sh '''docker run --rm \ | ||
-e SRC_DIR=/tds/docs/devguide/src/site \ | ||
-e DOCS_UID=$(id -u) \ | ||
-v .:/tds \ | ||
-v ./docs/build/site/devguide:/site \ | ||
docker.unidata.ucar.edu/unidata-jekyll-docs:0.0.4 build | ||
''' | ||
} | ||
} | ||
stage('Build quickstart') { | ||
steps { | ||
sh '''docker run --rm \ | ||
-e SRC_DIR=/tds/docs/quickstart/src/site \ | ||
-e DOCS_UID=$(id -u) \ | ||
-v .:/tds \ | ||
-v ./docs/build/site/quickstart:/site \ | ||
docker.unidata.ucar.edu/unidata-jekyll-docs:0.0.4 build | ||
''' | ||
} | ||
} | ||
stage('Build userguide') { | ||
steps { | ||
sh '''docker run --rm \ | ||
-e SRC_DIR=/tds/docs/userguide/src/site \ | ||
-e DOCS_UID=$(id -u) \ | ||
-v .:/tds \ | ||
-v ./docs/build/site/userguide:/site \ | ||
docker.unidata.ucar.edu/unidata-jekyll-docs:0.0.4 build | ||
''' | ||
} | ||
} | ||
stage('Publish documentation') { | ||
agent { | ||
docker { | ||
image 'docker.unidata.ucar.edu/thredds-test-environment:latest' | ||
// Run the container on the node specified at the | ||
// top-level of the Pipeline, in the same workspace, | ||
// rather than on a new node entirely: | ||
reuseNode true | ||
} | ||
} | ||
steps { | ||
withCredentials([file(credentialsId: 'thredds_vault', variable: 'TV'), file(credentialsId: 'vault_pw', variable: 'AVP')]) { | ||
sh '''#!/bin/bash -l | ||
select-java temurin 17 | ||
set +x | ||
./gradlew \ | ||
-Pnexus.username=`get_pw NEXUS_USER` \ | ||
-Pnexus.password=`get_pw NEXUS_PW` \ | ||
-x :docs:buildAdminGuide \ | ||
-x :docs:buildDevGuide \ | ||
-x :docs:buildQuickstart \ | ||
-x :docs:buildUserGuide \ | ||
-x :docs:buildAllJekyllSites \ | ||
:docs:publishAllJekyllSitesAsVersioned | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
} |