Commit 2dac2fa3 authored by daidekun's avatar daidekun

fixbugs

parent 58633cf7
import libs.stage;
def call(body) {
branchName = env.BRANCH_NAME
gitRepo = env.GIT_REPO
namespace = env.NAMESPACE
isDeploy = env.IS_DEPLOY
def config = [:]
def stage = new libs.stage()
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body()
node {
try {
stage('Checkout') {
print config.type
print branchName
stage.checkout()
}
stage('Build') {
stage.build()
}
stage('Docker Build And Push') {
stage.docker_build_and_push()
}
stage('Deploy') {
stage.deploy()
}
stage("Clean") {
stage.clean()
}
} 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