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
86984f51
Commit
86984f51
authored
Apr 09, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffff
parent
144216ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
StageBucket.groovy
src/org/qg/docker_new/StageBucket.groovy
+19
-0
qgDockerPiplineWithDockerSlave.groovy
vars/qgDockerPiplineWithDockerSlave.groovy
+1
-20
No files found.
src/org/qg/docker_new/StageBucket.groovy
View file @
86984f51
...
@@ -341,3 +341,22 @@ def getDocketPackageImage(buildType){
...
@@ -341,3 +341,22 @@ def getDocketPackageImage(buildType){
}
}
def
checkAndBuild
(
dockerImage
,
dockerArgs
,
buildType
,
systemName
,
branchName
,
contextDir
){
docker
.
image
(
dockerImage
).
inside
(
dockerArgs
){
/*checkout code*/
_utils
().
beautyEcho
(
"checkout"
,
"info"
)
checkout
(
buildType
,
systemName
,
branchName
)
/*prepare config*/
_utils
).
beautyEcho
(
"prepare config"
,
"info"
)
prepare_config
(
buildType
,
systemName
,
contextDir
)
/*build*/
_utils
).
beautyEcho
(
"build"
,
"info"
)
build
(
config
.
buildType
,
systemName
,
contextDir
)
}
}
vars/qgDockerPiplineWithDockerSlave.groovy
View file @
86984f51
...
@@ -55,7 +55,7 @@ def call(body) {
...
@@ -55,7 +55,7 @@ def call(body) {
def
pacegeDockerInfo
=
_stage
.
getDocketPackageImage
(
config
.
buildType
)
def
pacegeDockerInfo
=
_stage
.
getDocketPackageImage
(
config
.
buildType
)
arrSystem
=
systemName
.
split
(
"--"
)
arrSystem
=
systemName
.
split
(
"--"
)
for
(
systemNameSimple
in
arrSystem
)
{
for
(
systemNameSimple
in
arrSystem
)
{
checkAndBuild
(
pacegeDockerInfo
[
"image"
]).
inside
(
pacegeDockerInfo
[
"args"
],
config
.
buildType
,
systemNameSimple
,
branchName
,
contextDir
)
_stage
.
checkAndBuild
(
pacegeDockerInfo
[
"image"
]).
inside
(
pacegeDockerInfo
[
"args"
],
config
.
buildType
,
systemNameSimple
,
branchName
,
contextDir
)
}
}
}
}
...
@@ -111,24 +111,5 @@ def call(body) {
...
@@ -111,24 +111,5 @@ def call(body) {
}
}
def
checkAndBuild
(
dockerImage
,
dockerArgs
,
buildType
,
systemName
,
branchName
,
contextDir
){
docker
.
image
(
dockerImage
).
inside
(
dockerArgs
){
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