Skip to content

Commit 0524bf0

Browse files
committed
jenkins pipeline doc build
1 parent 2856103 commit 0524bf0

File tree

1 file changed

+41
-0
lines changed
  • project-files/jenkins/pipelines

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
pipeline {
2+
agent { label 'main' }
3+
stages {
4+
stage('Build documentation') {
5+
steps {
6+
sh '''docker run --rm \
7+
-e SRC_DIR=/netcdf-java/docs/src/site \
8+
-e DOCS_UID=$(id -u) \
9+
-v .:/netcdf-java \
10+
-v ./docs/build/site:/site \
11+
docker.unidata.ucar.edu/unidata-jekyll-docs:0.0.4 build
12+
'''
13+
}
14+
}
15+
stage('Publish documentation') {
16+
agent {
17+
docker {
18+
image 'docker.unidata.ucar.edu/thredds-test-environment:latest'
19+
// Run the container on the node specified at the
20+
// top-level of the Pipeline, in the same workspace,
21+
// rather than on a new node entirely:
22+
reuseNode true
23+
}
24+
}
25+
steps {
26+
withCredentials([file(credentialsId: 'thredds_vault', variable: 'TV'), file(credentialsId: 'vault_pw', variable: 'AVP')]) {
27+
sh '''#!/bin/bash -l
28+
select-java temurin 11
29+
set +x
30+
./gradlew \
31+
-Pnexus.username=`get_pw NEXUS_USER` \
32+
-Pnexus.password=`get_pw NEXUS_PW` \
33+
-x :docs:buildJekyllSite \
34+
:docs:publishAsVersionedUserGuide
35+
#./gradlew clean
36+
'''
37+
}
38+
}
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)