mirror of
https://github.com/corda/corda.git
synced 2024-12-18 12:46:29 +00:00
dockerize docs building
This commit is contained in:
parent
365471d9f4
commit
fe0cafd06e
3
docs/.gitattributes
vendored
Normal file
3
docs/.gitattributes
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Set line endings to LF, even on Windows. Otherwise, execution within Docker fails.
|
||||
# See https://help.github.com/articles/dealing-with-line-endings/
|
||||
*.sh text eol=lf
|
@ -62,16 +62,8 @@ task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
|
||||
task buildDocs(dependsOn: ['apidocs', 'makeDocs'])
|
||||
task apidocs(dependsOn: ['dokka', 'dokkaJavadoc'])
|
||||
|
||||
task makeDocs(type: Exec, dependsOn: ['installDocsiteRequirements']) {
|
||||
// TODO: Non-msys Windows script
|
||||
commandLine 'cmd', '/c', 'bash make-docsite.sh' // Windows
|
||||
commandLine 'bash', './make-docsite.sh' // Linux
|
||||
}
|
||||
|
||||
task installDocsiteRequirements(type: Exec) {
|
||||
// TODO: Non-msys Windows script
|
||||
commandLine 'cmd', '/c', 'bash install-docsite-requirements.sh' // Windows
|
||||
commandLine 'bash', './install-docsite-requirements.sh' // Linux
|
||||
task makeDocs(type: Exec) {
|
||||
commandLine "docker", "run", "-v", "${project.projectDir}:/opt/docs_builder", "roastario/docs-builder:latest", "bash", "-c", "rm -rf build && rm -rf virtualenv && install-docsite-requirements.sh && make-docsite.sh"
|
||||
}
|
||||
|
||||
apidocs.shouldRunAfter makeDocs
|
||||
|
6
docs/docs_builder/Dockerfile
Normal file
6
docs/docs_builder/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM python:2-stretch
|
||||
|
||||
RUN apt-get update && apt-get install -y texlive preview-latex-style texlive-generic-extra texlive-latex-extra latexmk dos2unix
|
||||
VOLUME /opt/docs_builder
|
||||
ENV PATH="/opt/docs_builder:${PATH}"
|
||||
WORKDIR /opt/docs_builder
|
Loading…
Reference in New Issue
Block a user