?(下载地址:https://packages.gitlab.com/runner/gitlab-runner)
内容如下:
before_script:
??- date
stages:
??- test
??- build
??- deploy
test:
??stage: test
??script:
????- echo "Running tests"
????- echo $username
????- export
build:
??stage: build
??script:
????- echo "Building the app"
????- curl http://api.newgoai.com/api/index/serverTime
deploy_staging:
??stage: deploy
??script:
????- echo "Deploy to staging server"
??environment:
????name: staging
????url: https://staging.example.com
??only:
??- master
deploy_prod:
??stage: deploy
??script:
????- echo "Deploy to production server"
??environment:
????name: production
????url: https://example.com
??when: manual
??only:
??- master
1、哪个分支发生了push或merge事件,则gitlab-runner执行哪个分支下的.gitlab-ci.yml
1、.gitlab-ci.yml?语法:{gitlabHost}/help/ci/yaml/README.md