Skip to content

Commit

Permalink
ref(17): Add more configuration on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanjerome committed Aug 31, 2023
1 parent 8384f61 commit d43fb80
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions vars/wildPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def call() {
"log_path=${env.WORKSPACE}/log",
"current_git_branch=${env.BRANCH_NAME}",
"colored_xterm=${colored_xterm}",
"LOG_LEVEL=DEBUG"
]

podTemplate(
Expand All @@ -21,13 +20,11 @@ def call() {
) {
node(pod_init_label) {

withEnv(env_variables_list) {

logger.bannerLogo(libraryResource('config/banner/wild.txt'))

stage('init') {


withEnv(env_variables_list) {

logger.bannerStage('init')

Expand Down Expand Up @@ -89,22 +86,20 @@ def call() {

workflow.actions.each { action ->
stage(action.name) {
withEnv(["LOG_LEVEL=${action.log_level?action.log_level:"SUCCESS"}"]) {
logger.bannerStage(action.name)
container(action.container) {
if (action.pre_script?.trim()) {
logger.info("Processing PRE action script ${action.pre_script}...")
sh "chmod +x ${action.pre_script}"
sh "./${action.pre_script}"
}
logger.info("Processing MAIN action script ${action.script}...")
sh "chmod +x ${action.script}"
sh "./${action.script}"
if (action.post_script?.trim()) {
logger.info("Processing POST action script ${action.post_script}...")
sh "chmod +x ${action.post_script}"
sh "./${action.post_script}"
}
logger.bannerStage(action.name)
container(action.container) {
if (action.pre_script?.trim()) {
logger.info("Processing PRE action script ${action.pre_script}...")
sh "chmod +x ${action.pre_script}"
sh "./${action.pre_script}"
}
logger.info("Processing MAIN action script ${action.script}...")
sh "chmod +x ${action.script}"
sh "./${action.script}"
if (action.post_script?.trim()) {
logger.info("Processing POST action script ${action.post_script}...")
sh "chmod +x ${action.post_script}"
sh "./${action.post_script}"
}
}
}
Expand Down

0 comments on commit d43fb80

Please sign in to comment.