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
c7c9c25f
Commit
c7c9c25f
authored
Apr 19, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0de722b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
30 deletions
+33
-30
StageBucket.groovy
src/org/qg/docker_new/StageBucket.groovy
+26
-13
qgDockerPiplineWithDockerSlave.groovy
vars/qgDockerPiplineWithDockerSlave.groovy
+7
-17
No files found.
src/org/qg/docker_new/StageBucket.groovy
View file @
c7c9c25f
...
@@ -362,6 +362,8 @@ def getDocketPackageImage(buildType,buildEnv){
...
@@ -362,6 +362,8 @@ def getDocketPackageImage(buildType,buildEnv){
def
check_and_build
(
buildType
,
systemName
,
branchName
,
contextDir
){
def
check_and_build
(
buildType
,
systemName
,
branchName
,
contextDir
){
def
buildEnv
=
""
def
buildEnv
=
""
switch
(
buildType
){
switch
(
buildType
){
case
"java"
:
case
"java"
:
...
@@ -383,22 +385,33 @@ def check_and_build(buildType,systemName,branchName,contextDir){
...
@@ -383,22 +385,33 @@ def check_and_build(buildType,systemName,branchName,contextDir){
def
pacegeDockerInfo
=
getDocketPackageImage
(
buildType
,
buildEnv
)
def
pacegeDockerInfo
=
getDocketPackageImage
(
buildType
,
buildEnv
)
if
(
systemName
==
"di-ting-ui"
){
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
)
return
}
docker
.
image
(
pacegeDockerInfo
[
"image"
]).
inside
(
pacegeDockerInfo
[
"args"
]){
docker
.
image
(
pacegeDockerInfo
[
"image"
]).
inside
(
pacegeDockerInfo
[
"args"
]){
/*checkout code*/
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
)
stage
(
'Checkout'
)
{
}
checkout
(
buildType
,
systemName
,
branchName
)
}
}
/*prepare config*/
stage
(
'Prepare'
)
{
def
cpb
(
buildType
,
systemName
,
branchName
,
contextDir
)
{
prepare_config
(
buildType
,
systemName
,
contextDir
)
/*checkout code*/
}
stage
(
'Checkout'
)
{
/*build*/
checkout
(
buildType
,
systemName
,
branchName
)
stage
(
'Build'
){
}
build
(
buildType
,
systemName
,
contextDir
)
/*prepare config*/
}
stage
(
'Prepare'
)
{
prepare_config
(
buildType
,
systemName
,
contextDir
)
}
}
/*build*/
stage
(
'Build'
){
build
(
buildType
,
systemName
,
contextDir
)
}
}
}
def
dockerbuild_and_push
(
imageTagInfo
,
buildNumber
,
systemName
,
branchName
,
cluster
,
timeStemp
,
contextDir
){
def
dockerbuild_and_push
(
imageTagInfo
,
buildNumber
,
systemName
,
branchName
,
cluster
,
timeStemp
,
contextDir
){
...
...
vars/qgDockerPiplineWithDockerSlave.groovy
View file @
c7c9c25f
...
@@ -50,8 +50,13 @@ def call(body) {
...
@@ -50,8 +50,13 @@ def call(body) {
/* 2 */
/* 2 */
echo
originSystemName
echo
originSystemName
if
(
originSystemName
==
"di-ting-ui"
){
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
_utils
.
beautyEcho
(
"checkout & build < ${originSystemName} : ${originBranchName} >"
,
"stage"
)
_utils
.
beautyEcho
(
"checkout & build < ${originSystemName} : ${originBranchName} >"
,
"stage"
)
for
(
def
i
=
0
;
i
<
systemNames
.
length
;
i
++){
for
(
def
i
=
0
;
i
<
systemNames
.
length
;
i
++){
dir
(
systemNames
[
i
]){
dir
(
systemNames
[
i
]){
_stage
.
check_and_build
(
config
.
buildType
,
systemNames
[
i
],
branchNames
[
i
],
contextDir
)
_stage
.
check_and_build
(
config
.
buildType
,
systemNames
[
i
],
branchNames
[
i
],
contextDir
)
...
@@ -60,25 +65,10 @@ def call(body) {
...
@@ -60,25 +65,10 @@ def call(body) {
}
}
_utils
.
beautyEcho
(
"build over"
,
"info"
)
_utils
.
beautyEcho
(
"build over"
,
"info"
)
}
else
{
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
_utils
.
beautyEcho
(
"checkout & build < ${originSystemName} : ${originBranchName} >"
,
"stage"
)
for
(
def
i
=
0
;
i
<
systemNames
.
length
;
i
++){
dir
(
systemNames
[
i
]){
_stage
.
check_and_build
(
config
.
buildType
,
systemNames
[
i
],
branchNames
[
i
],
contextDir
)
}
}
_utils
.
beautyEcho
(
"build over"
,
"info"
)
}
}
}
/* 3 */
/* 3 */
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
withDockerServer
([
uri:
"tcp://192.168.4.96:2375/"
])
{
...
...
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