Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
global-jenkinsfile
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
global-jenkinsfile
Commits
656a30f4
Commit
656a30f4
authored
Apr 09, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fffff
parent
5b8417f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
18 deletions
+29
-18
qgDockerPiplineWithDockerSlave.groovy
vars/qgDockerPiplineWithDockerSlave.groovy
+29
-18
No files found.
vars/qgDockerPiplineWithDockerSlave.groovy
View file @
656a30f4
...
@@ -53,26 +53,15 @@ def call(body) {
...
@@ -53,26 +53,15 @@ def call(body) {
stage
(
'checkout & build'
)
{
stage
(
'checkout & build'
)
{
_utils
.
beautyEcho
(
"checkout & build"
,
"stage"
)
_utils
.
beautyEcho
(
"checkout & build"
,
"stage"
)
def
pacegeDockerInfo
=
_stage
.
getDocketPackageImage
(
config
.
buildType
)
def
pacegeDockerInfo
=
_stage
.
getDocketPackageImage
(
config
.
buildType
)
arrSystem
=
systemName
.
split
(
"--"
)
docker
.
image
(
pacegeDockerInfo
[
"image"
]).
inside
(
pacegeDockerInfo
[
"args"
]){
for
(
systemNameSimple
in
arrSystem
)
{
checkAndBuild
(
config
.
buildType
,
systemNameSimple
,
branchName
,
contextDir
)
def
project_attr
=
_stage
.
project_attr
(
systemName
)
}
def
gitPath
=
project_attr
[
"gitPath"
]
/*checkout code*/
_utils
.
beautyEcho
(
"checkout"
,
"info"
)
_stage
.
checkout
(
config
.
buildType
,
systemName
,
branchName
)
/*prepare config*/
_utils
.
beautyEcho
(
"prepare config"
,
"info"
)
_stage
.
prepare_config
(
config
.
buildType
,
systemName
,
contextDir
)
/*build*/
_utils
.
beautyEcho
(
"build"
,
"info"
)
_stage
.
build
(
config
.
buildType
,
systemName
,
contextDir
)
}
}
}
}
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
_utils
.
beautyEcho
(
"build over"
,
"info"
)
_utils
.
beautyEcho
(
"build over"
,
"info"
)
stage
(
'make docker image'
)
{
stage
(
'make docker image'
)
{
_utils
.
beautyEcho
(
"make docker image"
,
"stage"
)
_utils
.
beautyEcho
(
"make docker image"
,
"stage"
)
...
@@ -121,3 +110,25 @@ def call(body) {
...
@@ -121,3 +110,25 @@ def call(body) {
}
}
}
}
def
checkAndBuild
(
buildType
,
systemName
,
branchName
,
contextDir
){
docker
.
image
(
pacegeDockerInfo
[
"image"
]).
inside
(
pacegeDockerInfo
[
"args"
]){
def
project_attr
=
_stage
.
project_attr
(
systemName
)
def
gitPath
=
project_attr
[
"gitPath"
]
/*checkout code*/
_utils
.
beautyEcho
(
"checkout"
,
"info"
)
_stage
.
checkout
(
buildType
,
systemName
,
branchName
)
/*prepare config*/
_utils
.
beautyEcho
(
"prepare config"
,
"info"
)
_stage
.
prepare_config
(
buildType
,
systemName
,
contextDir
)
/*build*/
_utils
.
beautyEcho
(
"build"
,
"info"
)
_stage
.
build
(
config
.
buildType
,
systemName
,
contextDir
)
}
}
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