У меня возникла следующая проблема с настройкой конвейера Gitlab.
Я узнал, что в bash показан «оболочка», но в файле .yml я использовал «tags: -docker».Если я снова запускаю работу, иногда она работает и использует правильного бегуна, но большую часть времени нет.
Вывод bash:
Running with gitlab-runner 10.8.0 (079cad9e)
on aws-xyz c444133a
Using Shell executor...
Running on ip-xyz...
Fetching changes...
HEAD is now at eb4ea13 xyz: removed data retry queue
Checking out e0461c05 as backend-tests...
Skipping Git submodules setup
Checking cache for default-1...
Successfully extracted cache
$ echo "this is done BEFORE each step"
this is done BEFORE each step
$ echo "updating server software inside container"
updating server software inside container
$ apt-get update -y
Reading package lists...
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
Running after script...
$ echo "this is done AFTER each step"
this is done AFTER each step
ERROR: Job failed: exit status 1
Это задание в файле gitlab-ci.yml:
backend_test:
image: node:6
services:
- name: mysql:5.7
stage: test
variables:
MYSQL_ROOT_PASSWORD: xyz
MYSQL_DATABASE: xyz
MYSQL_USER: xyz
MYSQL_PASSWORD: xyz
DBDIALECT: mysql
DBDATABASE: xyz
DBUSER: xyz
DBPASSWORD: xyz
DBHOST: mysql
DBPORT: "3306"
script:
- echo "updating server software inside container"
- apt-get update -y
- apt-get upgrade -y
- echo "installing dependencies"
- cd api/backend/
- ls -lah
- npm install
- echo "start testing"
- NODE_ENV=test npm run test-code-coverage
tags:
- docker
Есть идеи?