symfonyAppPipeline: fix hook stages
This commit is contained in:
parent
ff382b25ba
commit
a6b8706753
|
@ -7,9 +7,9 @@ def call(String name) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
def hook = load(filepath)
|
def hook = load(filepath)
|
||||||
if(hook.metaClass.respondsTo(hook, 'exec')) {
|
if (hook.metaClass.respondsTo(hook, 'exec')) {
|
||||||
hook.exec()
|
hook.exec()
|
||||||
} else {
|
} else {
|
||||||
error("Hook script '${filepath}' exists but does not expose an exec() function.")
|
error("Hook script '${filepath}' exists but does not expose an exec() function.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,7 @@ def call(String baseImage = 'ubuntu:22.04') {
|
||||||
checkout(scm)
|
checkout(scm)
|
||||||
}
|
}
|
||||||
stage('Run pre hooks') {
|
stage('Run pre hooks') {
|
||||||
steps {
|
hook('pre-symfony-app')
|
||||||
script {
|
|
||||||
hook('pre-symfony-app')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
stage('Run in Symfony image') {
|
stage('Run in Symfony image') {
|
||||||
def symfonyImage = buildDockerImage(baseImage)
|
def symfonyImage = buildDockerImage(baseImage)
|
||||||
|
@ -91,11 +87,7 @@ def call(String baseImage = 'ubuntu:22.04') {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Run post hooks') {
|
stage('Run post hooks') {
|
||||||
steps {
|
hook('post-symfony-app')
|
||||||
script {
|
|
||||||
hook('post-symfony-app')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue