Commit 76565cba authored by daidekun's avatar daidekun

qg

parent a3738069
// src/org/foo/Stage.groovy
package org.foo;
package org.qg;
def debug() {
print "123"
......
// src/org/foo/Utils.groovy
package org.foo;
package org.qg;
def contextDir(workspace) {
uuid = UUID.randomUUID().toString()
......
import org.qg
def call(body) {
def config = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body()
node {
try {
stage ('Clone') {
checkout scm
}
stage ('Build') {
sh "echo 'building ${config.projectName} ...'"
}
stage ('Tests') {
parallel 'static': {
sh "echo 'shell scripts to run static tests...'"
},
'unit': {
sh "echo 'shell scripts to run unit tests...'"
},
'integration': {
sh "echo 'shell scripts to run integration tests...'"
}
}
stage ('Deploy') {
sh "echo 'deploying to server ${config.serverDomain}...'"
}
} catch (err) {
currentBuild.result = 'FAILED'
throw err
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment