Commit bf2aeb21 authored by fanqianjie's avatar fanqianjie

test

parent 081f6c89
before_script:
- echo "begore-script!!"
varirbles:
DOMAIN: example.com
- echo "Hello World!!"
variables:
USER: admin
PASSWORD: 123.com
stages:
- build
- build
- test
- codescan
- deploy
build:
before_script:
- echo "before_script in job"
- echo "Hello Build !!"
stage: build
script:
- echo "mvn clean"
- echo "mvn install"
- echo "$DOMAIN"
- echo "Start building!!"
- echo "Under construction!!"
after_script:
- echo "after. sccript in buildjob"
\ No newline at end of file
- echo "Build complete"
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