Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cicd-dame-1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fanqianjie
cicd-dame-1
Commits
bf2aeb21
Commit
bf2aeb21
authored
Mar 13, 2024
by
fanqianjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
081f6c89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
9 deletions
+52
-9
gitlab-ci.yml
gitlab-ci.yml
+52
-9
No files found.
gitlab-ci.yml
View file @
bf2aeb21
before_script
:
-
echo "begore-script!!"
varirbles
:
DOMAIN
:
example.com
-
echo "Hello World!!"
variables
:
USER
:
admin
PASSWORD
:
123.com
stages
:
-
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment