-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2856103
commit 403fe6a
Showing
1 changed file
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
pipeline { | ||
agent { label 'main' } | ||
stages { | ||
stage('Build documentation') { | ||
steps { | ||
sh '''docker run --rm \ | ||
-e SRC_DIR=/netcdf-java/docs/src/site \ | ||
-e DOCS_UID=$(id -u) \ | ||
-v .:/netcdf-java \ | ||
-v ./docs/build/site:/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 11 | ||
set +x | ||
./gradlew \ | ||
-Pnexus.username=`get_pw NEXUS_USER` \ | ||
-Pnexus.password=`get_pw NEXUS_PW` \ | ||
-x :docs:buildJekyllSite \ | ||
:docs:publishAsVersionedUserGuide | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
} |