diff --git a/templates/gitlab-ci-openshift.yml b/templates/gitlab-ci-openshift.yml index ce70c1e2afa01365fba7c6f5e8379aad17c0936d..58a5d0010742b37add1f334a7318be8afedba26a 100644 --- a/templates/gitlab-ci-openshift.yml +++ b/templates/gitlab-ci-openshift.yml @@ -254,7 +254,8 @@ stages: if [[ -f "$prescript" ]] then log_info "--- \\e[32mpre-apply hook\\e[0m (\\e[33;1m${prescript}\\e[0m) found: execute" - bash "$prescript" + chmod +x "$prescript" + "$prescript" else log_info "--- \\e[32mpre-apply hook\\e[0m (\\e[33;1m${prescript}\\e[0m) not found: skip" fi @@ -314,7 +315,8 @@ stages: if [[ -f "$readycheck" ]] then log_info "--- \\e[32mreadiness-check hook\\e[0m (\\e[33;1m${readycheck}\\e[0m) found: execute" - bash "$readycheck" + chmod +x "$readycheck" + "$readycheck" else log_info "--- \\e[32mreadiness-check hook\\e[0m (\\e[33;1m${readycheck}\\e[0m) not found: assume app is ready" fi @@ -326,7 +328,8 @@ stages: if [[ -f "$postscript" ]] then log_info "--- \\e[32mpost-apply hook\\e[0m (\\e[33;1m${postscript}\\e[0m) found: execute" - bash "$postscript" + chmod +x "$postscript" + "$postscript" else log_info "--- \\e[32mpost-apply hook\\e[0m (\\e[33;1m${postscript}\\e[0m) not found: skip" fi @@ -360,7 +363,8 @@ stages: if [[ -f "$deployscript" ]] then log_info "--- deploy script (\\e[33;1m${deployscript}\\e[0m) found: execute" - bash "$deployscript" + chmod +x "$deployscript" + "$deployscript" else log_info "--- no deploy script found: run template-based deployment" @@ -466,7 +470,8 @@ stages: if [[ -f "$cleanupscript" ]] then log_info "--- cleanup script (\\e[33;1m${cleanupscript}\\e[0m) found: execute" - bash "$cleanupscript" + chmod +x "$cleanupscript" + "$cleanupscript" else log_info "--- no cleanup script found: proceed with template-based delete" @@ -475,7 +480,8 @@ stages: if [[ -f "$prescript" ]] then log_info "--- \\e[32mpre-cleanup hook\\e[0m (\\e[33;1m${prescript}\\e[0m) found: execute" - bash "$prescript" + chmod +x "$prescript" + "$prescript" else log_info "--- \\e[32mpre-cleanup hook\\e[0m (\\e[33;1m${prescript}\\e[0m) not found: skip" fi @@ -490,7 +496,8 @@ stages: if [[ -f "$postscript" ]] then log_info "--- \\e[32mpost-cleanup hook\\e[0m (\\e[33;1m${postscript}\\e[0m) found: execute" - bash "$postscript" + chmod +x "$postscript" + "$postscript" else log_info "--- \\e[32mpost-cleanup hook\\e[0m (\\e[33;1m${postscript}\\e[0m) not found: skip" fi