From 05c27885d0d396c5fe4089685aae52928ff37b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20OLIVIER?= <cedric3.olivier@orange.com> Date: Fri, 3 Dec 2021 08:15:24 +0000 Subject: [PATCH] fix: execute hook scripts with shebang shell --- templates/gitlab-ci-gcloud.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/gitlab-ci-gcloud.yml b/templates/gitlab-ci-gcloud.yml index 23a465f..3fb0e72 100644 --- a/templates/gitlab-ci-gcloud.yml +++ b/templates/gitlab-ci-gcloud.yml @@ -271,7 +271,8 @@ stages: if [[ -f "$deployscript" ]] then log_info "--- deploy script (\\e[33;1m${deployscript}\\e[0m) found: execute" - sh "$deployscript" + chmod +x "$deployscript" + "$deployscript" else log_error "--- no deploy script found: abort" exit 1 @@ -304,7 +305,8 @@ stages: if [[ -f "$cleanupscript" ]] then log_info "--- cleanup script (\\e[33;1m${cleanupscript}\\e[0m) found: execute" - sh "$cleanupscript" + chmod +x "$cleanupscript" + "$cleanupscript" else log_error "--- no cleanup script found: abort" exit 1 -- GitLab