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
c4ff8827
Commit
c4ff8827
authored
Apr 04, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffff
parent
8bc153bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
StageBucket.groovy
src/org/qg/docker_new/StageBucket.groovy
+19
-20
No files found.
src/org/qg/docker_new/StageBucket.groovy
View file @
c4ff8827
...
@@ -82,14 +82,13 @@ def prepare_python(systemName, contextDir) {
...
@@ -82,14 +82,13 @@ def prepare_python(systemName, contextDir) {
def
checkout
(
buildType
,
systemName
,
branchName
)
{
def
checkout
(
buildType
,
systemName
,
branchName
)
{
def
projectAttr
=
project_attr
(
systemName
)
def
gitPath
=
projectAttr
[
"gitPath"
]
switch
(
buildType
){
switch
(
buildType
){
case
"java"
:
case
"java"
:
build_java
(
gitPath
,
branchName
)
build_java
(
systemName
,
branchName
)
break
break
case
"nodejs"
:
case
"nodejs"
:
build_nodejs
(
gitPath
,
branchName
)
build_nodejs
(
systemName
,
branchName
)
break
break
case
"python"
:
case
"python"
:
build_python
(
gitPath
,
branchName
)
build_python
(
gitPath
,
branchName
)
...
@@ -103,13 +102,15 @@ def checkout(buildType,systemName, branchName) {
...
@@ -103,13 +102,15 @@ def checkout(buildType,systemName, branchName) {
}
}
}
}
def
checkout_java
(
gitPath
,
branchName
)
{
def
checkout_java
(
systemName
,
branchName
)
{
def
projectAttr
=
project_attr
(
systemName
)
def
gitPath
=
projectAttr
[
"gitPath"
]
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
gitPath
git
branch:
branchName
,
credentialsId:
'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db'
,
url:
gitPath
}
}
def
checkout_nodejs
(
systemName
,
branchName
)
{
def
checkout_nodejs
(
gitPth
,
branchName
)
{
def
projectAttr
=
project_attr
(
systemName
)
def
gitPath
=
projectAttr
[
"gitPath"
]
currentPath
=
sh
(
currentPath
=
sh
(
script:
'pwd'
,
script:
'pwd'
,
returnStdout:
true
returnStdout:
true
...
@@ -132,12 +133,12 @@ def checkout_nodejs(gitPth, branchName) {
...
@@ -132,12 +133,12 @@ def checkout_nodejs(gitPth, branchName) {
}
}
}
}
def
checkout_lua_ui
(
gitPaths
,
branchName
)
{
def
checkout_lua_ui
(
systemNames
,
branchNames
)
{
if
(
gitPath
s
.
contains
(
"--"
)){
if
(
systemName
s
.
contains
(
"--"
)){
t1
=
gitPth
s
.
split
(
"/"
)
t1
=
systemName
s
.
split
(
"/"
)
groups
=
t1
[
0
].
split
(
"--"
)
projects
=
t1
[
1
].
split
(
"--"
)
projects
=
t1
[
1
].
split
(
"--"
)
branches
=
branchName
.
split
(
"--"
)
branches
=
branchName
s
.
split
(
"--"
)
t1
.
size
().
times
{
t1
.
size
().
times
{
...
@@ -169,11 +170,10 @@ def checkout_lua_ui(gitPaths, branchName) {
...
@@ -169,11 +170,10 @@ def checkout_lua_ui(gitPaths, branchName) {
}
}
}
}
else
{
else
{
t1
=
gitRepo
.
split
(
"/"
)
def
systemName
=
systemNames
project
=
t1
[
1
]
def
branchName
=
branchNames
dir
(
systemName
)
{
dir
(
project
)
{
projectAttr
=
project_attr
(
systemName
)
projectAttr
=
project_attr
(
project
)
gitPath
=
projectAttr
[
"gitPath"
]
gitPath
=
projectAttr
[
"gitPath"
]
currentPath
=
sh
(
currentPath
=
sh
(
...
@@ -223,14 +223,13 @@ def build(buildType,systemName, contextDir){
...
@@ -223,14 +223,13 @@ def build(buildType,systemName, contextDir){
}
}
def
build_java
(
systemName
,
contextDir
)
{
def
build_java
(
systemName
,
contextDir
)
{
def
res_json
=
project_attr
(
systemName
)
def
res_json
=
project_attr
(
systemName
)
buildCmd
=
res_json
[
"buildCmd"
]
buildCmd
=
res_json
[
"buildCmd"
]
jarFilePath
=
project_attr
[
"jarFilePath"
]
jarFilePath
=
project_attr
[
"jarFilePath"
]
sh
"${buildCmd}"
sh
buildCmd
sh
"cp ${jarFilePath}/*.jar ${contextDir}/app.jar"
sh
"cp ${jarFilePath}/*.jar ${contextDir}/app.jar"
}
}
...
...
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