为什么在gitlab-ci.yml中无法识别我的delpoy阶段?

时间:2019-12-04 10:42:22

标签: git gitlab

管道成功通过。 前两个是Ruby作业,最后两个是Python作业,但应该引起任何问题。

.gitlab-ci.yml

image: ruby:2.6

variables:
  JEKYLL_ENV: production
  LC_ALL: C.UTF-8

before_script:
  - gem install bundler
  - bundle install

stages:
- test
- build
- deploy


qa_test:
....
qa_build:
....
qa_deploy:
  image : python-latest
  tags:
  - docker
  stage: deploy
  environment:
   name : qa
  before_script:
   - pip install awscli
  script:
    - aws s3 cp ./qa s3://gitlab-jekyll-mycontainer/ --recursive
  artifacts:
    paths:
      - aq
  only:
    - except

通过了前两个阶段,但是它没有尝试运行部署阶段。 enter image description here 为什么?

1 个答案:

答案 0 :(得分:2)

only: 
  - except 

意味着只有在分支机构名为except的情况下,作业才能运行。

创建此分支或删除only关键字,以使作业可以在所有分支上运行。