【发布时间】:2021-11-23 10:14:01
【问题描述】:
我运行了近六个月的 gitlab 管道现在意外失败。
之前的每一行都成功运行,然后发生这种情况:
Setting up curl (7.52.1-5+deb9u16) ...
$ curl -s https://deb.nodesource.com/setup_12.x | bash
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1
我终其一生都无法弄清楚发生了什么变化。我认为这可能与 this issue 有关,但我没有遇到任何网络问题、超时等。
我的 .gitlab-ci.yml 的轻度混淆版本。 显然我正在使用 .gitlab-ci.yml 来配置我的管道,并且我也在使用共享的 GitLab 运行器。
image: python:3.6-stretch
variables:
ACCESS_KEY_ID: **********
SECRET_ACCESS_KEY: **********
before_script:
- apt-get update
- apt-get install -y curl
- curl -s https://deb.nodesource.com/setup_12.x | bash
- apt-get install -y nodejs
- apt-get install -y npm
- npm install -g serverless
- pip install --upgrade awscli
- python --version
- nodejs --version
stages:
- deploy
deploy:
stage: deploy
only:
- master # We will run the CD only when something is going to change in master branch.
script:
- npm install # Archive the code repository.
- pip install -r requirements.txt
- cd services/service1/
- sls deploy -v --stage production
- cd ../../
- cd services/service2/
- sls deploy -v --stage production
- cd ../../
- cd services/service3/
- sls deploy -v --stage production
- cd ../../
environment:
name: master
【问题讨论】:
-
如果您使用的是在使用 gitlab.com 时提供的共享 GitLab Runners(相对于您自己的自托管 GitLab 实例),那么您应该联系支持/raise an Issue。此错误似乎与您的管道定义无关。
标签: python powershell gitlab cicd