-
Notifications
You must be signed in to change notification settings - Fork 684
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
Autobuild with Travis + Docker image #152
base: master
Are you sure you want to change the base?
Changes from all commits
4c04b29
3c9b503
2f395ec
723c9d9
70eca58
1bb41b9
9ebe24f
64c5ac0
01e2362
53aa458
a3c1e51
ed557be
c18cc5c
4f5c493
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sudo: required | ||
services: | ||
- docker | ||
before_install: | ||
- sudo apt-get update | ||
- sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine | ||
- docker build -t phd-latex . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. образ должен именно строиться с нуля, а не скачиваться с хаба, иначе будет невозможно контролировать зависимости для сборки при добавлении новых зависимостей |
||
- sudo chmod -R 777 $(pwd) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. костыль для трависа - докерный образ будет записывать результат в ту же дирку с исходниками, но докер сохраняет права и юзера! родительской системы, поэтому без этой команды сборка не сможет записать результат |
||
script: | ||
- docker run -v `pwd`:/data phd-latex | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. собственно, основная проверка - запуск образа с текущим исходником латеха. Если что-то зафейлится - билд будет считаться проваленным |
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: eYTdj7sP8WkEqzcR6fW3oyc+MgKM1ofjhLh+F6rBZRgWxXJcOGxBbi8L7jCxRveRrOi4x299jgebkoE43D5NlwLDdDO1WikSbId6LSSwC4cGdxoffb03UtYx2dI5X7C+XCb960V1ieXL6g/TmGW1C91i4jl8R8+bg9BsbCZj+s0M2xynOQof1NQ9pzRrtxbAj9exPcX2cuW279W0LmNe2rrG/rI2km0GqPCf/8XJf/7G/H+HByZP+HThRP1A7d8XER7HkAXTMehbhb3P6XZ6/nspoOLbFwhBiWLtGQw+tdFRdZUuzGpVCZuHg10MWTHDGNsZf1uXSlfDabHIubW0TkeiWpSUBzck+Kh2O4jTedmS/8wc3vkST7VObj8R06xQCQEDbbelCANlr2TgdYbQtGdy3y7Zhi7ajLKEtqnlk/jc2jlmzuUQ6ziLEkvOjsCylAZaNdrXayy0kv7EBz0OKkBs0ZxAc98gWGEbASuJsIdS9uyfg9hizfyROjAK3af4lbOZmKio7KjXSNAujZNsmti5ZK2ElSwkdi5J56nR6C4g0xr8XTbHF4wgsccDghZkBRJ9/J8pOO370Y7u6fnV+WcZyOdfJsdgPKMgbISBADRsOSIpQoJPzDbUZbgvxQJv+fzIDW0qkxyWPQ3l5R4e+BdhaIN1sW/llTOa0L11aJM= | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. этот ключ надо будет генерить для репы, данный подходит только для моей There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Где этот ключ для тревиса генерить? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Да, это у оунера делается, либо у проекта, если бы у нас был проект. |
||
file: dissertation.pdf | ||
skip_cleanup: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. если не указать, то травис сотрёт все новые файлы после билда |
||
on: | ||
repo: tonkonogov/Russian-Phd-LaTeX-Dissertation-Template | ||
branch: travis | ||
tags: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Релиз только по добавлению тега - это требование трависа, потому как по другим триггерам публиковать артефакты некуда |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM ubuntu:latest | ||
MAINTAINER Dmitry Tonkonogov <tonkonogovdv@gmail.com> | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY provision/installation.profile provision/packages.list / | ||
|
||
RUN apt-get update \ | ||
&& apt-get install wget perl make -y \ | ||
&& useradd --create-home --shell /bin/bash user \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. создаю юзера, чтобы не сидеть под рутом. Возможно, излишне парюсь |
||
&& cd /opt \ | ||
&& wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. скачать и установить tlmgr с сайта texlive |
||
&& tar -xvf install-tl-unx.tar.gz \ | ||
&& rm install-tl-unx.tar.gz \ | ||
&& mv install-tl-* install-tl \ | ||
&& mv /installation.profile /opt/install-tl/installation.profile \ | ||
&& mv /packages.list /opt/install-tl/packages.list \ | ||
&& mkdir -p /opt/texlive/2016 \ | ||
&& chown -R user * | ||
|
||
USER user | ||
|
||
RUN cd /opt/install-tl \ | ||
&& ./install-tl --profile installation.profile \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. установка предустановленного захардкоженого профиля |
||
&& /opt/texlive/2016/bin/x86_64-linux/tlmgr install $(grep '' packages.list | tr '\n' ' ') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. установка моего списка пакетов |
||
|
||
ENV PATH /opt/texlive/2016/bin/x86_64-linux:$PATH | ||
|
||
WORKDIR /data | ||
VOLUME ["data"] | ||
|
||
CMD ["make", "pdflatex"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
selected_scheme scheme-custom | ||
TEXDIR /opt/texlive/2016 | ||
TEXMFCONFIG ~/.texlive2016/texmf-config | ||
TEXMFHOME ~/texmf | ||
TEXMFLOCAL /opt/texlive/texmf-local | ||
TEXMFSYSCONFIG /opt/texlive/2016/texmf-config | ||
TEXMFSYSVAR /opt/texlive/2016/texmf-var | ||
TEXMFVAR ~/.texlive2016/texmf-var | ||
binary_x86_64-linux 1 | ||
collection-basic 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. главное в этом файле - устанавливается только collection-basic |
||
in_place 0 | ||
option_adjustrepo 1 | ||
option_autobackup 1 | ||
option_backupdir tlpkg/backups | ||
option_desktop_integration 1 | ||
option_doc 1 | ||
option_file_assocs 1 | ||
option_fmt 1 | ||
option_letter 0 | ||
option_menu_integration 1 | ||
option_path 0 | ||
option_post_code 1 | ||
option_src 1 | ||
option_sys_bin /usr/local/bin | ||
option_sys_info /usr/local/share/info | ||
option_sys_man /usr/local/share/man | ||
option_w32_multi_user 1 | ||
option_write18_restricted 1 | ||
portable 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
latexmk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. нестандартизованный список пакетов. Возможно, стоит по алфавиту упорядочить |
||
latex | ||
latex-bin | ||
nag | ||
memoir | ||
iftex | ||
oberdiek | ||
graphics | ||
geometry | ||
amscls | ||
amsmath | ||
mathtools | ||
tools | ||
cmap | ||
cyrillic | ||
lh | ||
babel | ||
babel-english | ||
babel-russian | ||
colortbl | ||
multirow | ||
makecell | ||
soul | ||
was | ||
hyperref | ||
url | ||
enumitem | ||
caption | ||
totcount | ||
totpages | ||
ms | ||
cleveref | ||
tabu | ||
varwidth | ||
tabulary | ||
floatrow | ||
fancyvrb | ||
listings | ||
biblatex | ||
etoolbox | ||
logreq | ||
xstring | ||
biblatex-gost | ||
biber |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
у трависа стоит старый докер, а dockerfile использует новые директивы, поэтому надо обновить в образе, благо это быстро делается