首页 > 解决方案 > .gitlab-ci.yml 如何修复这个配置更好 *gitlab-tunner without docker"

问题描述

我在我的 gitlab 上有这个配置,这个配置在我安装了一些节点包并将 package.json 推送到 gitlab repo 之前是有效的,我得到了错误。

如果我只是更新我的 /pages/index.vue 就可以了。我使用 gitlab-runner 和 ssh 而没有 docker

这是我的配置:

before_script:
  - echo "Before script"
  - cd /var/www/stagging.domain.com/public_html/client
build:
  stage: build
  script: 
    - echo "Run build"
    - git pull origin dev
    - yarn install
test:
  stage: test
  script:
    - echo "Run test"
    - git pull origin dev
    - yarn install
    - yarn test
stagging:
  stage: deploy
  script:
    - echo "Deploy stagging"
    - git pull origin dev
    - yarn install --production
    - yarn build
  only:
    - dev
  tags:
    - dev
production:
  stage: deploy
  script:
    - cd /var/www/domain.com/public_html/client
    - echo "Deploy production"
    - git pull origin master
    - yarn install --production
    - yarn build
  only:
    - master
  tags:
    - master

标签: gitlabgitlab-ci

解决方案


推荐阅读