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
5a551e39
Commit
5a551e39
authored
Nov 19, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean
parent
f38b6eec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
StageBucket.groovy
src/org/qg/StageBucket.groovy
+5
-1
qgDockerPipeline.groovy
vars/qgDockerPipeline.groovy
+11
-7
No files found.
src/org/qg/StageBucket.groovy
View file @
5a551e39
...
...
@@ -104,11 +104,15 @@ def deploy(namespace, systemName, imageTag, tier, isDeploy) {
}
}
def
clean
(
contextDir
,
imageTag
)
{
def
clean
_images
(
imageTag
)
{
sh
"docker rmi -f \$(docker images -q ${imageTag})"
}
def
clean_dir
(
contextDir
)
{
sh
"rm -rf ${contextDir}"
}
vars/qgDockerPipeline.groovy
View file @
5a551e39
...
...
@@ -28,7 +28,15 @@ def call(body) {
body
()
node
{
try
{
try
{
stage
(
'Clean'
)
{
_stage
.
clean_dir
(
contextDir
)
}
stage
(
'Checkout'
)
{
_stage
.
checkout
(
branchName
,
gitRepo
)
}
stage
(
'prepare'
)
{
deleteDir
()
echo
"buildType is: ${config.buildType}"
...
...
@@ -52,10 +60,6 @@ def call(body) {
}
}
stage
(
'Checkout'
)
{
_stage
.
checkout
(
branchName
,
gitRepo
)
}
stage
(
'Build'
)
{
switch
(
config
.
buildType
)
{
case
"java"
:
...
...
@@ -88,11 +92,11 @@ def call(body) {
}
stage
(
"Clean"
)
{
_stage
.
clean
(
contextDir
,
imageTag
)
_stage
.
clean
_images
(
imageTag
)
}
}
catch
(
err
)
{
if
(
imageTag
)
{
_stage
.
clean
(
contextDir
,
imageTag
)
_stage
.
clean
_images
(
imageTag
)
}
currentBuild
.
result
=
'FAILED'
throw
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