Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OpenShift
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
to be continuous...
OpenShift
Commits
37bb6307
Commit
37bb6307
authored
3 years ago
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
fix: execute hook scripts with shebang shell
parent
e1aa63c3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gitlab-ci-openshift.yml
+14
-7
14 additions, 7 deletions
templates/gitlab-ci-openshift.yml
with
14 additions
and
7 deletions
templates/gitlab-ci-openshift.yml
+
14
−
7
View file @
37bb6307
...
@@ -254,7 +254,8 @@ stages:
...
@@ -254,7 +254,8 @@ stages:
if [[ -f "$prescript" ]]
if [[ -f "$prescript" ]]
then
then
log_info "--- \\e[32mpre-apply hook\\e[0m (\\e[33;1m${prescript}\\e[0m) found: execute"
log_info "--- \\e[32mpre-apply hook\\e[0m (\\e[33;1m${prescript}\\e[0m) found: execute"
bash "$prescript"
chmod +x "$prescript"
"$prescript"
else
else
log_info "--- \\e[32mpre-apply hook\\e[0m (\\e[33;1m${prescript}\\e[0m) not found: skip"
log_info "--- \\e[32mpre-apply hook\\e[0m (\\e[33;1m${prescript}\\e[0m) not found: skip"
fi
fi
...
@@ -314,7 +315,8 @@ stages:
...
@@ -314,7 +315,8 @@ stages:
if [[ -f "$readycheck" ]]
if [[ -f "$readycheck" ]]
then
then
log_info "--- \\e[32mreadiness-check hook\\e[0m (\\e[33;1m${readycheck}\\e[0m) found: execute"
log_info "--- \\e[32mreadiness-check hook\\e[0m (\\e[33;1m${readycheck}\\e[0m) found: execute"
bash "$readycheck"
chmod +x "$readycheck"
"$readycheck"
else
else
log_info "--- \\e[32mreadiness-check hook\\e[0m (\\e[33;1m${readycheck}\\e[0m) not found: assume app is ready"
log_info "--- \\e[32mreadiness-check hook\\e[0m (\\e[33;1m${readycheck}\\e[0m) not found: assume app is ready"
fi
fi
...
@@ -326,7 +328,8 @@ stages:
...
@@ -326,7 +328,8 @@ stages:
if [[ -f "$postscript" ]]
if [[ -f "$postscript" ]]
then
then
log_info "--- \\e[32mpost-apply hook\\e[0m (\\e[33;1m${postscript}\\e[0m) found: execute"
log_info "--- \\e[32mpost-apply hook\\e[0m (\\e[33;1m${postscript}\\e[0m) found: execute"
bash "$postscript"
chmod +x "$postscript"
"$postscript"
else
else
log_info "--- \\e[32mpost-apply hook\\e[0m (\\e[33;1m${postscript}\\e[0m) not found: skip"
log_info "--- \\e[32mpost-apply hook\\e[0m (\\e[33;1m${postscript}\\e[0m) not found: skip"
fi
fi
...
@@ -360,7 +363,8 @@ stages:
...
@@ -360,7 +363,8 @@ stages:
if [[ -f "$deployscript" ]]
if [[ -f "$deployscript" ]]
then
then
log_info "--- deploy script (\\e[33;1m${deployscript}\\e[0m) found: execute"
log_info "--- deploy script (\\e[33;1m${deployscript}\\e[0m) found: execute"
bash "$deployscript"
chmod +x "$deployscript"
"$deployscript"
else
else
log_info "--- no deploy script found: run template-based deployment"
log_info "--- no deploy script found: run template-based deployment"
...
@@ -466,7 +470,8 @@ stages:
...
@@ -466,7 +470,8 @@ stages:
if [[ -f "$cleanupscript" ]]
if [[ -f "$cleanupscript" ]]
then
then
log_info "--- cleanup script (\\e[33;1m${cleanupscript}\\e[0m) found: execute"
log_info "--- cleanup script (\\e[33;1m${cleanupscript}\\e[0m) found: execute"
bash "$cleanupscript"
chmod +x "$cleanupscript"
"$cleanupscript"
else
else
log_info "--- no cleanup script found: proceed with template-based delete"
log_info "--- no cleanup script found: proceed with template-based delete"
...
@@ -475,7 +480,8 @@ stages:
...
@@ -475,7 +480,8 @@ stages:
if [[ -f "$prescript" ]]
if [[ -f "$prescript" ]]
then
then
log_info "--- \\e[32mpre-cleanup hook\\e[0m (\\e[33;1m${prescript}\\e[0m) found: execute"
log_info "--- \\e[32mpre-cleanup hook\\e[0m (\\e[33;1m${prescript}\\e[0m) found: execute"
bash "$prescript"
chmod +x "$prescript"
"$prescript"
else
else
log_info "--- \\e[32mpre-cleanup hook\\e[0m (\\e[33;1m${prescript}\\e[0m) not found: skip"
log_info "--- \\e[32mpre-cleanup hook\\e[0m (\\e[33;1m${prescript}\\e[0m) not found: skip"
fi
fi
...
@@ -490,7 +496,8 @@ stages:
...
@@ -490,7 +496,8 @@ stages:
if [[ -f "$postscript" ]]
if [[ -f "$postscript" ]]
then
then
log_info "--- \\e[32mpost-cleanup hook\\e[0m (\\e[33;1m${postscript}\\e[0m) found: execute"
log_info "--- \\e[32mpost-cleanup hook\\e[0m (\\e[33;1m${postscript}\\e[0m) found: execute"
bash "$postscript"
chmod +x "$postscript"
"$postscript"
else
else
log_info "--- \\e[32mpost-cleanup hook\\e[0m (\\e[33;1m${postscript}\\e[0m) not found: skip"
log_info "--- \\e[32mpost-cleanup hook\\e[0m (\\e[33;1m${postscript}\\e[0m) not found: skip"
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment