Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jenkins-shared-library-example
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Muhammad Tehami
jenkins-shared-library-example
Commits
16073697
Commit
16073697
authored
May 29, 2020
by
Muhammad Tehami
💡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add checkout and build step
parent
ceb7a5f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
build.groovy
vars/build.groovy
+7
-0
checkout.groovy
vars/checkout.groovy
+10
-0
hello.groovy
vars/hello.groovy
+0
-3
No files found.
vars/build.groovy
0 → 100644
View file @
16073697
def
call
(
String
buildDirectory
)
{
stage
(
'Build'
)
{
dir
(
buildDirectory
)
{
sh
'mvn clean install'
}
}
}
\ No newline at end of file
vars/check
Status
.groovy
→
vars/check
out
.groovy
View file @
16073697
#
!
/usr/
bin
/
env
groovy
#
!
/usr/
bin
/
env
groovy
def
call
(
body
)
{
def
call
(
body
)
{
echo
"Check status"
stage
(
'Checkout SCM'
)
{
steps
{
(
1
..
3
).
each
{
checkout
scm
echo
"Number: "
+
it
}
}
}
currentBuild
.
result
=
'SUCCESS'
//FAILURE to fail
return
this
return
this
}
}
vars/hello.groovy
deleted
100644 → 0
View file @
ceb7a5f1
def
hello
()
{
echo
"hello() called!"
}
\ No newline at end of file
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