-
Notifications
You must be signed in to change notification settings - Fork 6
Add build scripts v2 #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add build scripts v2 #32
Conversation
Fixes: Error producing PDF. ! LaTeX Error: File `hardwrap.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. <read *> l.49 \RequirePackage{hardwrap}[2011/02/12] Signed-off-by: William Roberts <[email protected]>
Fixes: ! LaTeX Error: File `catchfile.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. <read *> l.14 \newif Signed-off-by: William Roberts <[email protected]>
Add a script build.sh that runs all the pre-processing and build steps required for the user. This will help pull out steps from the github action so folks can build locally. Update the docker file to pull in said build.sh script. Signed-off-by: William Roberts <[email protected]>
Use git-describe --always --tags formating to determing document version and revision according to the following semantics: - no tag (commit abcdefg12345): version 0.0 revision is count of commits on branch. - tag major: version major.0 revision 0 - tag major w/commits: version major.0 revision is count of commits over tag. - tag major.minor: version major.minor revision 0 - tag major.minor w/commits: version major.minor revision is count of commits over tag. Fixes: TrustedComputingGroup#31 Signed-off-by: William Roberts <[email protected]>
Containers need to be launched in a specific way to make things available to the container at run time and ensure uid/gid settings are preserved. To simplify this, add a wrapper script. Example run from markdown repo as CWD: DOCKER_IMAGE=c53378db2a42 ../pandoc/docker_run --pdf=bill.pdf sample1.md Starting Build with file: sample1.md puppeteer: no docx: none pdf: bill.pdf latex: none use tmp: yes resource dir: / build dir: /tmp/tmp.pGvXefGXaT browser: /usr/bin/chromium-browser Signed-off-by: William Roberts <[email protected]>
e986fa5
to
6395d61
Compare
6395d61
to
1e0f5d0
Compare
Use the git describe output to determine the document status of DRAFT or PUBLISHED. A hard git tag results in PUBLISHED and something not on a tag results in DRAFT. git tag 4.0 /build.sh --gitstatus --pdf=1.pdf sample1.md Git Generated Document Version Information version: 4.0 revision: 0 status: PUBLISHED git tag -d 4.0 /build.sh --gitstatus --pdf=1.pdf sample1.md Git Generated Document Version Information version: 0.3.1 revision: 6 status: DRAFT Signed-off-by: William Roberts <[email protected]>
mktexpk uses a home directory for generation and its not clear how to change this behavior or pass options through pandoc. Thus, give it what it wants by exporting HOME to /home/user and setting the mode to 0777 so that it can be utilized by whatever uid is mounted into the container. Fix errors like: kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 tctt1000 mkdir: cannot create directory ‘././.texlive’: Permission denied mktexpk: /opt/texlive/texdir/texmf-dist/web2c/mktexdir /.texlive/texmf-var/fonts/pk/ljfour/jknappen/ec failed. kpathsea: Appending font creation commands to missfont.log. Signed-off-by: William Roberts <[email protected]>
1e0f5d0
to
63c70ed
Compare
Signed-off-by: William Roberts <[email protected]>
Hi Bill, sorry this languished. Holidays and other urgent matters appeared in December, and now it's April. This PR has a lot of great stuff in it, thanks for all this! I'm going to go ahead and merge this as a 1st step for some fixes I'm working on. Your points are well taken in "Current Issues;" I will file some GH issues based on this feedback. I especially think that with the script work here, the |
Yeah that was the goal. Thanks. |
Add build scripts to make building documentation from source markdown simpler for end users.
TODO:
Current Issues I see:
The PR builds and publishes docker container
a. Requires perms on incoming PRs which should be treated as untrusted even through it's inter-org. Don't trust Bill.
b. PRs race on publishing the image
Proposal: for PRs and pushes, do a docker build and docker run manually. The images for github actions contain all the
docker things, no need to really use the composite actions or reusable workflows for that. Only on push should publish the
container to the registry. Do we really need to publish and check-in the generated files?
Composite Workflows
IIUC it's a composite workflow others are using to generate the markdown rendering. However, it requires users to setup the docker container. I think if we move to a reusable workflow, we can move all of the setup into a reusable workflow so callers of the workflow don't have to do anything but use it. Additionally we can just use docker_run, no real need for the docker actions as docker run will pull the image.
markdown project
Do we need this? The pandoc project builds out the samples anyways, couldn't we just coalesce them or is the markdown project exist soley to test the action.yml composite workflow? It seems confusing to have so much stuff spread out, i'm not seeing the value in the decomposition.