File tree Expand file tree Collapse file tree
.final_builds/jobs/scripting-list
releases/generic-scripting Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ builds :
2+ 2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9 :
3+ version : 2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9
4+ blobstore_id : 4eb6b0ba-9e08-4930-4e87-08a047b3413b
5+ sha1 : sha256:0ca5eaff2c98383049678e89e836a86b379f77e8bda337a2965b75aa8601e1ff
6+ format-version : " 2"
File renamed without changes.
Original file line number Diff line number Diff line change 1+ ---
2+ name: scripting-list
3+ packages: []
4+ templates:
5+ post-deploy.erb: bin/post-deploy
6+ post-start.erb: bin/post-start
7+ pre-start.erb: bin/pre-start
8+ post-stop.erb: bin/post-stop
9+ pre-stop.erb: bin/pre-stop
10+ consumes: []
11+ provides: []
12+ properties:
13+ scripting-list.pre-start-scripts:
14+ description: array of scripts to launch at job start
15+ default: []
16+ scripting-list.post-start-scripts:
17+ description: array of scripts to launch after job start
18+ default: []
19+ scripting-list.post-deploy-scripts:
20+ description: array of scripts to launch after deployment is complete
21+ default: []
22+ scripting-list.post-stop-scripts:
23+ description: array of scripts to launch after job stop
24+ default: []
25+ scripting-list.pre-stop-scripts:
26+ description: array of scripts to launch after job stop
27+ default: []
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e # Exit immediately if a simple command exits with a non-zero status
3+ set -u # Report the usage of uninitialized variables
4+
5+ # --- Initialize context
6+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => Begin post-deploy"
7+
8+ # --- Generate script list to run
9+ < % i = 0 %>
10+ < % if_p(' scripting-list.post-deploy-scripts' ) do | value| %>
11+ < % p(' scripting-list.post-deploy-scripts' ).each do | script| %>
12+ < % i = i + 1 %>
13+
14+ cat > /var/vcap/data/scripting-list/post-deploy-< %= i %> .sh << 'SCRIPTING_EOF '
15+ <%= script %>
16+ SCRIPTING_EOF
17+
18+ . /var/vcap/data/scripting-list/post-deploy-< %= i %> .sh
19+ < % end %>
20+ < % end %>
21+
22+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => End post-deploy"
23+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e # Exit immediately if a simple command exits with a non-zero status
3+ set -u # Report the usage of uninitialized variables
4+
5+ # --- Initialize context
6+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => Begin post-start"
7+
8+ # --- Generate/run scripts from list
9+ < % i = 0 %>
10+ < % if_p(' scripting-list.post-start-scripts' ) do | value| %>
11+ < % p(' scripting-list.post-start-scripts' ).each do | script| %>
12+ < % i = i + 1 %>
13+
14+ cat > /var/vcap/data/scripting-list/post-start-< %= i %> .sh << 'SCRIPTING_EOF '
15+ <%= script %>
16+ SCRIPTING_EOF
17+
18+ . /var/vcap/data/scripting-list/post-start-< %= i %> .sh
19+ < % end %>
20+ < % end %>
21+
22+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => End post-start"
23+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e # Exit immediately if a simple command exits with a non-zero status
3+ set -u # Report the usage of uninitialized variables
4+
5+ # --- Initialize context
6+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => Begin post-stop"
7+
8+ # --- Generate script list to run
9+ < % i = 0 %>
10+ < % if_p(' scripting-list.post-stop-scripts' ) do | value| %>
11+ < % p(' scripting-list.post-stop-scripts' ).each do | script| %>
12+ < % i = i + 1 %>
13+
14+ cat > /var/vcap/data/scripting-list/post-stop-< %= i %> .sh << 'SCRIPTING_EOF '
15+ <%= script %>
16+ SCRIPTING_EOF
17+
18+ . /var/vcap/data/scripting-list/post-stop-< %= i %> .sh
19+ < % end %>
20+ < % end %>
21+
22+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => End post-stop"
23+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e # Exit immediately if a simple command exits with a non-zero status
3+ set -u # Report the usage of uninitialized variables
4+
5+ # --- Initialize context
6+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => Begin pre-start"
7+
8+ # --- Generate script list to run
9+ < % i = 0 %>
10+ < % if_p(' scripting-list.pre-start-scripts' ) do | value| %>
11+ < % p(' scripting-list.pre-start-scripts' ).each do | script| %>
12+ < % i = i + 1 %>
13+
14+ cat > /var/vcap/data/scripting-list/pre-start-< %= i %> .sh << 'SCRIPTING_EOF '
15+ <%= script %>
16+ SCRIPTING_EOF
17+
18+ . /var/vcap/data/scripting-list/pre-start-< %= i %> .sh
19+ < % end %>
20+ < % end %>
21+
22+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => End pre-start"
23+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e # Exit immediately if a simple command exits with a non-zero status
3+ set -u # Report the usage of uninitialized variables
4+
5+ # --- Initialize context
6+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => Begin pre-stop"
7+
8+ # --- Generate script list to run
9+ < % i = 0 %>
10+ < % if_p(' scripting-list.pre-stop-scripts' ) do | value| %>
11+ < % p(' scripting-list.pre-stop-scripts' ).each do | script| %>
12+ < % i = i + 1 %>
13+
14+ cat > /var/vcap/data/scripting-list/pre-stop-< %= i %> .sh << 'SCRIPTING_EOF '
15+ <%= script %>
16+ SCRIPTING_EOF
17+
18+ . /var/vcap/data/scripting-list/pre-stop-< %= i %> .sh
19+ < % end %>
20+ < % end %>
21+
22+ echo " $( date -u " +%Y-%m-%d %H:%M:%S" ) => End pre-stop"
23+ exit 0
Original file line number Diff line number Diff line change 1+ name : generic-scripting
2+ version : " 4"
3+ commit_hash : 75137d8
4+ uncommitted_changes : false
5+ jobs :
6+ - name : errand-scripting
7+ version : d35122717f862df72228fdb48b198b992af8716376e93361a5ed32eb70510283
8+ fingerprint : d35122717f862df72228fdb48b198b992af8716376e93361a5ed32eb70510283
9+ sha1 : sha256:ca1a3f579b3011a1c1ba27f4a87209bb15ddc0caed5d209574e5478918d7318b
10+ packages : []
11+ - name : scripting
12+ version : 819a2bf4af768a5ef3749415d866261370f0183c5c1034349d96f8151fd8ddb0
13+ fingerprint : 819a2bf4af768a5ef3749415d866261370f0183c5c1034349d96f8151fd8ddb0
14+ sha1 : sha256:ec75700dc33321a06ffa356951be9504c8e644ec14b45a116409ae17112d4f04
15+ packages : []
16+ - name : scripting-list
17+ version : 2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9
18+ fingerprint : 2235bfea58235ef3e90e249831dbee62f4f9dcd768b98c028e6dd9873a63c5f9
19+ sha1 : sha256:0ca5eaff2c98383049678e89e836a86b379f77e8bda337a2965b75aa8601e1ff
20+ packages : []
21+ license :
22+ version : c52a2c414b935147f0ccbe8d798edbbcd65c5e9084079f727b3fb5727a44e50d
23+ fingerprint : c52a2c414b935147f0ccbe8d798edbbcd65c5e9084079f727b3fb5727a44e50d
24+ sha1 : sha256:d1dad55c014f213daa950c9d9ca01eb422cb97cc5b8b2997d1e1ba8efe5cf3ef
Original file line number Diff line number Diff line change 11builds :
2+ 762e28bd-589f-42d9-42e2-1d992a3b2523 :
3+ version : " 4"
24 773185d4-9e0a-40f1-634d-63d112d930cd :
35 version : " 2"
46 ad0d6a2a-2420-49ca-50ae-4440083a69a1 :
You can’t perform that action at this time.
0 commit comments