aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-03-22 08:01:16 +0100
committerGerd Hoffmann <kraxel@redhat.com>2018-03-22 08:01:16 +0100
commit971c384ac1653aacf524bea56c07382337e9545c (patch)
treed511210297df7e27940ce6d08d5aef44156281d1
parent6b41118af2cf9201a85d430e080ef821ec25ca7c (diff)
downloadjenkinsfiles-971c384ac1653aacf524bea56c07382337e9545c.tar.gz
libtest: add lib
-rw-r--r--jenkinsfile.libtest6
-rw-r--r--src/org/kraxel/Libtest.groovy7
2 files changed, 13 insertions, 0 deletions
diff --git a/jenkinsfile.libtest b/jenkinsfile.libtest
index 9304b2f..b906f1e 100644
--- a/jenkinsfile.libtest
+++ b/jenkinsfile.libtest
@@ -1,4 +1,5 @@
#!/usr/bin/env groovy
+import org.kraxel.Testlib
pipeline {
agent any
@@ -8,5 +9,10 @@ pipeline {
sh 'echo hello world'
}
}
+ stage ('LibHello') {
+ steps {
+ Testlib.LibHello()
+ }
+ }
}
}
diff --git a/src/org/kraxel/Libtest.groovy b/src/org/kraxel/Libtest.groovy
new file mode 100644
index 0000000..c4ed334
--- /dev/null
+++ b/src/org/kraxel/Libtest.groovy
@@ -0,0 +1,7 @@
+package org.kraxel.Testlib
+
+def LibHello() {
+ sh 'echo Testlib hello'
+}
+
+return this;