Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
Project
Project
Details
Activity
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
search_tips
Commits
2f957a8e
Commit
2f957a8e
authored
May 16, 2019
by
胡凯旋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Jenkinsfile
parent
7c431ed7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
Jenkinsfile
Jenkinsfile
+45
-0
No files found.
Jenkinsfile
0 → 100644
View file @
2f957a8e
@Library
(
'gm-pipeline-library'
)
_
pipeline
{
agent
any
options
{
// Console output add timestamps
timestamps
()
// Disallow concurrent executions of the Pipeline
disableConcurrentBuilds
()
// On failure, retry the entire Pipeline the specified number of times.
retry
(
1
)
}
parameters
{
choice
(
name:
'CACHE'
,
choices:
[
''
,
'--no-cache'
],
description:
'docker build 是否使用cache,默认使用,不使用为--no-cache'
)
}
environment
{
// Image Tag branch.time.hash
TAG
=
dockerTag
()
// Image Full Tag
IMAGE
=
"${DOCKER_REGISTRY}/gm-backend/search_tips:$TAG"
}
stages
{
stage
(
"Begin"
)
{
steps
{
dingNotify
"before"
}
}
stage
(
'Build Service Image'
)
{
steps
{
sh
"docker build . ${params.CACHE} -t $IMAGE -f /srv/apps/search_tips/Dockerfile"
sh
"docker push $IMAGE"
}
}
}
post
{
always
{
dingNotify
"after"
,
"${currentBuild.currentResult}"
}
}
}
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