Loading .gitlab-ci.yml +8 −9 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ variables: generate_temp_docx: stage: preprocessing script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && python3 preprocessing.py './API.docx'" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && python3 preprocessing.py './API.docx'" artifacts: paths: - temp.docx Loading @@ -26,9 +26,9 @@ generate_temp_docx: images_extraction: stage: preprocessing script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && pandoc --extract-media ./ -f docx -t html -s API.docx -o API.html" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && pandoc --extract-media ./ -f docx -t html -s API.docx -o API.html" after_script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data/media && libreoffice --headless --convert-to png *.emf && mogrify -trim *.png" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data/media && libreoffice --headless --convert-to png *.emf && mogrify -trim *.png" artifacts: paths: - media Loading @@ -39,7 +39,7 @@ chunk_html: - "generate_temp_docx" - "images_extraction" script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && pandoc --extract-media ./ -f docx -t chunkedhtml -L filter_1.lua -L filter_2.lua --css=styling.css --css=API.css -s temp.docx -o ./API.zip --toc --toc-depth 4 --template=template.html --split-level=1" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && pandoc --extract-media ./ -f docx -t chunkedhtml -L filter_1.lua -L filter_2.lua --css=styling.css --css=API.css -s temp.docx -o ./API.zip --toc --toc-depth 4 --template=template.html --split-level=1" artifacts: paths: - ./API.zip Loading @@ -54,11 +54,10 @@ saving_script: - cp -r ./dist ./API - cp pre-save_script.js ./API script: - docker run --entrypoint "/bin/sh" -v "./API:/data" serafinopirronitto/test-image:v3 -c "cd data && apt-get install nodejs -y && apt-get install npm -y && npm init -y &&\ npm install puppeteer-core fs && apk --update --upgrade add chromium &&\ export ENV PUPPETEER_EXECUTABLE_PATH=\"/usr/bin/chromium-browser\" && node pre-save_script.js &&\ rm ./*.html" - docker run --entrypoint "/bin/sh" -v "./API:/data" serafinopirronitto/test-image:v4 -c "cd data && umask 0000 && npm init -y &&\ npm install puppeteer fs && node pre-save_script.js" after_script: - rm ./*.html - cd saved_files - for file in *_updated*; do mv "$file" "$(echo "../$file" | sed 's/_updated//g')"; done artifacts: Loading @@ -71,7 +70,7 @@ docx: - "saving_script" - "images_extraction" script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && python3 html_to_docx.py ./API && python3 postprocessing.py html_to_docx_output.docx ./media" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && python3 html_to_docx.py ./API && python3 postprocessing.py html_to_docx_output.docx ./media" artifacts: paths: - html_to_docx_output_fixed.docx Loading Loading
.gitlab-ci.yml +8 −9 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ variables: generate_temp_docx: stage: preprocessing script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && python3 preprocessing.py './API.docx'" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && python3 preprocessing.py './API.docx'" artifacts: paths: - temp.docx Loading @@ -26,9 +26,9 @@ generate_temp_docx: images_extraction: stage: preprocessing script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && pandoc --extract-media ./ -f docx -t html -s API.docx -o API.html" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && pandoc --extract-media ./ -f docx -t html -s API.docx -o API.html" after_script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data/media && libreoffice --headless --convert-to png *.emf && mogrify -trim *.png" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data/media && libreoffice --headless --convert-to png *.emf && mogrify -trim *.png" artifacts: paths: - media Loading @@ -39,7 +39,7 @@ chunk_html: - "generate_temp_docx" - "images_extraction" script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && pandoc --extract-media ./ -f docx -t chunkedhtml -L filter_1.lua -L filter_2.lua --css=styling.css --css=API.css -s temp.docx -o ./API.zip --toc --toc-depth 4 --template=template.html --split-level=1" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && pandoc --extract-media ./ -f docx -t chunkedhtml -L filter_1.lua -L filter_2.lua --css=styling.css --css=API.css -s temp.docx -o ./API.zip --toc --toc-depth 4 --template=template.html --split-level=1" artifacts: paths: - ./API.zip Loading @@ -54,11 +54,10 @@ saving_script: - cp -r ./dist ./API - cp pre-save_script.js ./API script: - docker run --entrypoint "/bin/sh" -v "./API:/data" serafinopirronitto/test-image:v3 -c "cd data && apt-get install nodejs -y && apt-get install npm -y && npm init -y &&\ npm install puppeteer-core fs && apk --update --upgrade add chromium &&\ export ENV PUPPETEER_EXECUTABLE_PATH=\"/usr/bin/chromium-browser\" && node pre-save_script.js &&\ rm ./*.html" - docker run --entrypoint "/bin/sh" -v "./API:/data" serafinopirronitto/test-image:v4 -c "cd data && umask 0000 && npm init -y &&\ npm install puppeteer fs && node pre-save_script.js" after_script: - rm ./*.html - cd saved_files - for file in *_updated*; do mv "$file" "$(echo "../$file" | sed 's/_updated//g')"; done artifacts: Loading @@ -71,7 +70,7 @@ docx: - "saving_script" - "images_extraction" script: - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v3 -c "cd data && python3 html_to_docx.py ./API && python3 postprocessing.py html_to_docx_output.docx ./media" - docker run -u $(id -u):$(id -g) --entrypoint "/bin/sh" -v "./:/data" serafinopirronitto/test-image:v4 -c "cd data && python3 html_to_docx.py ./API && python3 postprocessing.py html_to_docx_output.docx ./media" artifacts: paths: - html_to_docx_output_fixed.docx Loading