Установил node, так как с nvm не получилось, не видит путь
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
stages:
- build
- lint
- test
cache:
paths:
- node_modules/
install_dependencies:
stage: build
script:
- npm install
artifacts:
paths:
- node_modules/
tags:
- my_server
run_lint:
stage: lint
script:
- npm run lint
tags:
- my_server
run_test:
stage: test
script:
- npm run test
tags:
- my_server
Использование кэша при выполнении stage lint
Checking cache for default...
Successfully extracted cache
Downloading artifacts for install_dependencies (125982)...
Downloading artifacts from coordinator... ok id=125982 responseStatus=200 OK token=5poY2XJb
$ npm run lint
> my_server@1.0.0 lint /home/gitlab-runner/builds/92c49bi8/0/my_project
> eslint "**.js" "src/**/**.js" "migrations/**/**.js"
Creating cache default...
node_modules/: found 22300 matching files
Created cache
Job succeeded
Successfully extracted cache
Downloading artifacts for install_dependencies (125982)...
Downloading artifacts from coordinator... ok id=125982 responseStatus=200 OK token=5poY2XJb
$ npm run lint
> my_server@1.0.0 lint /home/gitlab-runner/builds/92c49bi8/0/my_project
> eslint "**.js" "src/**/**.js" "migrations/**/**.js"
Creating cache default...
node_modules/: found 22300 matching files
Created cache
Job succeeded
Комментариев нет:
Отправить комментарий