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
0e49f799
Commit
0e49f799
authored
Nov 22, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beautyEcho
parent
07ce10c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
StageBucket.groovy
src/org/qg/StageBucket.groovy
+1
-0
Utils.groovy
src/org/qg/Utils.groovy
+4
-0
qgDockerPipeline.groovy
vars/qgDockerPipeline.groovy
+7
-8
No files found.
src/org/qg/StageBucket.groovy
View file @
0e49f799
// src/org/foo/Stage.groovy
package
org.qg
;
import
groovy.json.JsonSlurperClassic
;
import
org.qg.Utils
;
def
prepare_java
(
systemName
,
contextDir
)
{
sh
"rm -rf ${contextDir}"
...
...
src/org/qg/Utils.groovy
View file @
0e49f799
...
...
@@ -5,4 +5,8 @@ def contextDir(workspace) {
uuid
=
UUID
.
randomUUID
().
toString
()
contextDir
=
"tmp-context"
return
contextDir
}
def
beautyEcho
(
no
,
content
)
{
echo
"===============Stage[${no}]==${content}==============="
}
\ No newline at end of file
vars/qgDockerPipeline.groovy
View file @
0e49f799
...
...
@@ -30,18 +30,17 @@ def call(body) {
node
{
try
{
stage
(
'Clean'
)
{
echo
"===============Stage[1] Clean==============="
_utils
.
beautyEcho
(
1
,
'Clean'
)
_stage
.
clean_dir
()
}
stage
(
'Checkout'
)
{
echo
"===============Stage[2] Checkout==============="
_utils
.
beautyEcho
(
2
,
'Checkout'
)
_stage
.
checkout
(
branchName
,
gitRepo
)
}
stage
(
'Prepare'
)
{
echo
"===============Stage[3] prepare==============="
echo
"buildType is: ${config.buildType}"
_utils
.
beautyEcho
(
3
,
'Prepare'
)
contextDir
=
_utils
.
contextDir
(
workspace
)
switch
(
config
.
buildType
)
{
case
"java"
:
...
...
@@ -63,7 +62,7 @@ def call(body) {
}
stage
(
'Build'
)
{
echo
"===============Stage[4] Build==============="
_utils
.
beautyEcho
(
4
,
'Build'
)
switch
(
config
.
buildType
)
{
case
"java"
:
_stage
.
build_java
(
namespace
,
systemName
,
contextDir
)
...
...
@@ -84,7 +83,7 @@ def call(body) {
}
stage
(
'Docker Build And Push'
)
{
echo
"Stage[5] Docker Build And Push"
_utils
.
beautyEcho
(
5
,
'Docker Build And Push'
)
if
(
config
.
buildType
==
"java"
)
{
_stage
.
copy_files_java
(
systemName
,
contextDir
)
}
...
...
@@ -92,12 +91,12 @@ def call(body) {
}
stage
(
'Deploy'
)
{
echo
"===============Stage[6] Docker Build And Push==============="
_utils
.
beautyEcho
(
6
,
'Docker Build And Push'
)
_stage
.
deploy
(
namespace
,
systemName
,
imageTag
,
config
.
tier
,
isDeploy
)
}
stage
(
"Clean"
)
{
echo
"===============Stage[7] Clean==============="
_utils
.
beautyEcho
(
7
,
'Clean'
)
_stage
.
clean_images
(
imageTag
)
}
}
catch
(
err
)
{
...
...
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