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
c6e67c68
Commit
c6e67c68
authored
Nov 16, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
java
parent
9a383a6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
StageBucket.groovy
src/org/qg/StageBucket.groovy
+18
-2
qgDockerPipeline.groovy
vars/qgDockerPipeline.groovy
+3
-0
No files found.
src/org/qg/StageBucket.groovy
View file @
c6e67c68
...
...
@@ -28,8 +28,24 @@ def checkout(branchName, gitRepo) {
}
def
build_java
(
namespace
,
systemName
,
contextDir
)
{
sh
"ansible-playbook /etc/ansible/build.yml -e prefix=${namespace} -e project_name=pre.${systemName} -e workspace=${contextDir} -vv"
/* sh '/usr/share/maven/bin/mvn clean package -P test -D maven.test.skip=true'*/
/* sh "ansible-playbook /etc/ansible/build.yml -e prefix=${namespace} -e project_name=pre.${systemName} -e workspace=${contextDir} -vv"*/
sh
'/usr/share/maven/bin/mvn clean package -P test -D maven.test.skip=true'
}
def
copy_files_java
(
systemName
,
contextDir
)
{
switch
(
systemName
)
{
case
"baitiao-zhitou"
:
jar_path
=
"xyqb-btzt-internal/target/*.jar"
break
case
"baitiao"
:
jar_path
=
"baitiao-api/target/*.jar"
break
default:
jar_path
=
"target/*.jar"
break
}
sh
"cp ${jar_path} ${contextDir}/"
}
def
build_nodejs_and_ui
(
namespace
,
systemName
,
contextDir
)
{
...
...
vars/qgDockerPipeline.groovy
View file @
c6e67c68
...
...
@@ -76,6 +76,9 @@ def call(body) {
}
stage
(
'Docker Build And Push'
)
{
if
(
config
.
buildType
==
"java"
)
{
_stage
.
copy_files_java
(
systemName
,
contextDir
)
}
imageTag
=
_stage
.
dockerbuild_and_push
(
buildNumber
,
branchName
,
harborGroup
,
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