我是 Gitlab Pipelines 的新手,想为我的一个 Python 项目设置一个。我将 docker GitLab-runner 容器与此配置文件一起使用:
version: '3'
services:
runner:
container_name: runner
image: gitlab/gitlab-runner:latest
restart: unless-stopped
environment:
- TZ=Europe/Berlin
volumes:
- ./data:/etc/gitlab-runner/
- /var/run/docker.sock:/var/run/docker.sock
Run Code Online (Sandbox Code Playgroud)
每当执行管道时,我都会收到以下错误消息:
Running with GitLab-runner 14.10.1 (f761588f)
on docker xxxxxxx
Preparing the "docker" executor
Using Docker executor with image python:latest ...
Pulling docker image python:latest ...
Using docker image sha256:8dec8e39f2eca1ee1f1b668619023da929039a39983de4433d42d25a7b79267c for python:latest with digest python@sha256:567018293e51a89db96ce4c9679fdefc89b3d17a9fe9e94c0091b04ac5bb4e89 ...
Preparing environment
Running on runner-xxxxxxxxx-project-38-concurrent-0 via xxxxxxxx...
Getting source from Git repository
Fetching changes with git depth set …
Run Code Online (Sandbox Code Playgroud) 我想创建从配置中读取的多个 Flask 端点。是否可以创建 for 或 while 循环来创建它们?端点地址是可变的,但我需要的数量没有限制。
我的想法是:
for x in myList:
@app.route(var, ...)
def route():
do smt ...
Run Code Online (Sandbox Code Playgroud)
感谢您的帮助