实际上我用的是特拉维斯,但我想换个无人机。
对于所有tex文档,我使用一个带有容器的小型Makefile来生成我的pdf文件并将其部署到我的存储库中。
但是由于我使用的是gitea,所以我想设置我与无人机的集成管道,但我不知道如何配置.drone.yml,以便在每个标记als发行版上部署我的pdf文件。
实际上,我正在使用下面的.drone.yml,而且我很高兴,也就是说,构建过程目前运行良好。
clone:
git:
image: plugins/git
tags: true
pipeline:
pdf:
image: volkerraschek/docker-latex:latest
pull: true
commands:
- make这是我的Makefile
# Docker Image
IMAGE := volkerraschek/docker-latex:latest
# Input tex-file and output pdf-file
FILE := index
TEX_NAME := ${FILE}.tex
PDF_NAME := ${FILE}.pdf
latexmk:
latexmk \
-shell-escape \
-synctex=1 \
-interaction=nonstopmode \
-file-line-error \
-pdf ${TEX_NAME}
docker-latexmk:
docker run \
--rm \
--user="$(shell id -u):$(shell id -g)" \
--net="none" \
--volume="${PWD}:/data" ${IMAGE} \
make latexmk当我推送一个新的git标签时,我的drone.yml中缺少哪些标记和条件来在gitea中部署index.pdf?
沃尔克
发布于 2018-10-06 11:02:19
我把这个装置放在我的吉塔/无人驾驶飞机上。这是我的.drone.yml的MWE
pipeline:
build:
image: tianon/latex
commands:
- pdflatex <filename.tex>
gitea_release:
image: plugins/gitea-release
base_url: <gitea domain>
secrets: [gitea_token]
files: <filename.pdf>
when:
event: tag因此,我们不需要在Makefile中设置对接构建,而是使用带有latex的对接映像添加一个步骤,编译pdf,并使用管道步骤发布。
您还必须设置您的无人机回购以触发标签上的构建,并设置使用gitea API令牌。要设置API令牌,可以使用命令行接口:
$ drone secret add <org/repo> --name gitea_token --value <token value> --image plugins/gitea-release您可以在web中的存储库设置中设置无人机回购以触发构建。
请注意,您可能还必须在gitea设置中允许*.pdf附件,因为默认情况下它们是不允许的。在您的gitea app.ini中,将此添加到附件部分:
[attachment]
ENABLED = true
PATH = /data/gitea/attachments
MAX_SIZE = 10
ALLOWED_TYPES = */*发布于 2020-03-13 10:02:30
除了Gabe的回答之外,如果您使用的是NGINX反向代理,您可能还必须允许在您的nginx.conf中上传更大的文件。(这适用于所有文件类型,而不仅仅是.pdf)
server {
[ ... ]
location / {
client_max_body_size 10M; # add this line
proxy_pass http://gitea:3000;
}
}这解决了我的问题。
https://stackoverflow.com/questions/51440517
复制相似问题