Commit bf2aeb21 authored by fanqianjie's avatar fanqianjie

test

parent 081f6c89
before_script: before_script:
- echo "begore-script!!" - echo "Hello World!!"
varirbles:
DOMAIN: example.com variables:
USER: admin
PASSWORD: 123.com
stages: stages:
- build - build
- test - test
- codescan - codescan
- deploy - deploy
build: build:
before_script: before_script:
- echo "before_script in job" - echo "Hello Build !!"
stage: build stage: build
script: script:
- echo "mvn clean" - echo "Start building!!"
- echo "mvn install" - echo "Under construction!!"
- echo "$DOMAIN"
after_script: after_script:
- echo "after. sccript in buildjob" - echo "Build complete"
\ No newline at end of file rules: ##规则
- changes: ##文件是否发生了变化
- Dockerfile。##指定哪个文件发生了变化
when: manual。##发生变化后执行什么样子的操作
- when: on_failure ##如果没有发生变化,执行什么样的操作。
test:
before_script:
- echo "Hello test!!"
stage: test
script:
- echo "Start test"
when: manual
codescan:
before_script:
- echo "Hello Codescan"
stage: codescan
script:
- echo "Start Codescan"
when: on_success
rules:
- if: '$USER == "admin"'
when: manual
- if: '$USER == "root"'
when: delayed
start_in: '5'
- when: on_success
deploy:
before_script:
- echo "Hello Deploy"
stage: deploy
script:
- echo "Start Deploy!"
- echo "$USER"
- echo "$PASSWORD"
when: delayed
start_in: '5'
retry: 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment