-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from poblin-orange/master
release 4
- Loading branch information
Showing
10 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
builds: | ||
2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9: | ||
version: 2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9 | ||
blobstore_id: 4eb6b0ba-9e08-4930-4e87-08a047b3413b | ||
sha1: sha256:0ca5eaff2c98383049678e89e836a86b379f77e8bda337a2965b75aa8601e1ff | ||
format-version: "2" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: scripting-list | ||
packages: [] | ||
templates: | ||
post-deploy.erb: bin/post-deploy | ||
post-start.erb: bin/post-start | ||
pre-start.erb: bin/pre-start | ||
post-stop.erb: bin/post-stop | ||
pre-stop.erb: bin/pre-stop | ||
consumes: [] | ||
provides: [] | ||
properties: | ||
scripting-list.pre-start-scripts: | ||
description: array of scripts to launch at job start | ||
default: [] | ||
scripting-list.post-start-scripts: | ||
description: array of scripts to launch after job start | ||
default: [] | ||
scripting-list.post-deploy-scripts: | ||
description: array of scripts to launch after deployment is complete | ||
default: [] | ||
scripting-list.post-stop-scripts: | ||
description: array of scripts to launch after job stop | ||
default: [] | ||
scripting-list.pre-stop-scripts: | ||
description: array of scripts to launch after job stop | ||
default: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if a simple command exits with a non-zero status | ||
set -u # Report the usage of uninitialized variables | ||
|
||
#--- Initialize context | ||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => Begin post-deploy" | ||
|
||
#--- Generate script list to run | ||
<% i = 0 %> | ||
<% if_p('scripting-list.post-deploy-scripts') do |value| %> | ||
<% p('scripting-list.post-deploy-scripts').each do |script| %> | ||
<% i = i + 1 %> | ||
|
||
cat > /var/vcap/data/scripting-list/post-deploy-<%= i %>.sh <<'SCRIPTING_EOF' | ||
<%= script %> | ||
SCRIPTING_EOF | ||
|
||
. /var/vcap/data/scripting-list/post-deploy-<%= i %>.sh | ||
<% end %> | ||
<% end %> | ||
|
||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => End post-deploy" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if a simple command exits with a non-zero status | ||
set -u # Report the usage of uninitialized variables | ||
|
||
#--- Initialize context | ||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => Begin post-start" | ||
|
||
#--- Generate/run scripts from list | ||
<% i = 0 %> | ||
<% if_p('scripting-list.post-start-scripts') do |value| %> | ||
<% p('scripting-list.post-start-scripts').each do |script| %> | ||
<% i = i + 1 %> | ||
|
||
cat > /var/vcap/data/scripting-list/post-start-<%= i %>.sh <<'SCRIPTING_EOF' | ||
<%= script %> | ||
SCRIPTING_EOF | ||
|
||
. /var/vcap/data/scripting-list/post-start-<%= i %>.sh | ||
<% end %> | ||
<% end %> | ||
|
||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => End post-start" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if a simple command exits with a non-zero status | ||
set -u # Report the usage of uninitialized variables | ||
|
||
#--- Initialize context | ||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => Begin post-stop" | ||
|
||
#--- Generate script list to run | ||
<% i = 0 %> | ||
<% if_p('scripting-list.post-stop-scripts') do |value| %> | ||
<% p('scripting-list.post-stop-scripts').each do |script| %> | ||
<% i = i + 1 %> | ||
|
||
cat > /var/vcap/data/scripting-list/post-stop-<%= i %>.sh <<'SCRIPTING_EOF' | ||
<%= script %> | ||
SCRIPTING_EOF | ||
|
||
. /var/vcap/data/scripting-list/post-stop-<%= i %>.sh | ||
<% end %> | ||
<% end %> | ||
|
||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => End post-stop" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if a simple command exits with a non-zero status | ||
set -u # Report the usage of uninitialized variables | ||
|
||
#--- Initialize context | ||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => Begin pre-start" | ||
|
||
#--- Generate script list to run | ||
<% i = 0 %> | ||
<% if_p('scripting-list.pre-start-scripts') do |value| %> | ||
<% p('scripting-list.pre-start-scripts').each do |script| %> | ||
<% i = i + 1 %> | ||
|
||
cat > /var/vcap/data/scripting-list/pre-start-<%= i %>.sh <<'SCRIPTING_EOF' | ||
<%= script %> | ||
SCRIPTING_EOF | ||
|
||
. /var/vcap/data/scripting-list/pre-start-<%= i %>.sh | ||
<% end %> | ||
<% end %> | ||
|
||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => End pre-start" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if a simple command exits with a non-zero status | ||
set -u # Report the usage of uninitialized variables | ||
|
||
#--- Initialize context | ||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => Begin pre-stop" | ||
|
||
#--- Generate script list to run | ||
<% i = 0 %> | ||
<% if_p('scripting-list.pre-stop-scripts') do |value| %> | ||
<% p('scripting-list.pre-stop-scripts').each do |script| %> | ||
<% i = i + 1 %> | ||
|
||
cat > /var/vcap/data/scripting-list/pre-stop-<%= i %>.sh <<'SCRIPTING_EOF' | ||
<%= script %> | ||
SCRIPTING_EOF | ||
|
||
. /var/vcap/data/scripting-list/pre-stop-<%= i %>.sh | ||
<% end %> | ||
<% end %> | ||
|
||
echo "$(date -u "+%Y-%m-%d %H:%M:%S") => End pre-stop" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: generic-scripting | ||
version: "4" | ||
commit_hash: 75137d8 | ||
uncommitted_changes: false | ||
jobs: | ||
- name: errand-scripting | ||
version: d35122717f862df72228fdb48b198b992af8716376e93361a5ed32eb70510283 | ||
fingerprint: d35122717f862df72228fdb48b198b992af8716376e93361a5ed32eb70510283 | ||
sha1: sha256:ca1a3f579b3011a1c1ba27f4a87209bb15ddc0caed5d209574e5478918d7318b | ||
packages: [] | ||
- name: scripting | ||
version: 819a2bf4af768a5ef3749415d866261370f0183c5c1034349d96f8151fd8ddb0 | ||
fingerprint: 819a2bf4af768a5ef3749415d866261370f0183c5c1034349d96f8151fd8ddb0 | ||
sha1: sha256:ec75700dc33321a06ffa356951be9504c8e644ec14b45a116409ae17112d4f04 | ||
packages: [] | ||
- name: scripting-list | ||
version: 2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9 | ||
fingerprint: 2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9 | ||
sha1: sha256:0ca5eaff2c98383049678e89e836a86b379f77e8bda337a2965b75aa8601e1ff | ||
packages: [] | ||
license: | ||
version: c52a2c414b935147f0ccbe8d798edbbcd65c5e9084079f727b3fb5727a44e50d | ||
fingerprint: c52a2c414b935147f0ccbe8d798edbbcd65c5e9084079f727b3fb5727a44e50d | ||
sha1: sha256:d1dad55c014f213daa950c9d9ca01eb422cb97cc5b8b2997d1e1ba8efe5cf3ef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters