File tree 3 files changed +18
-8
lines changed
3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change
1
+ bosh-upload-stemcells/
Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ upload_stemcell() {
34
34
# Hardcode a couple of stable stemcell paramaters
35
35
local stemcells_url
36
36
stemcells_url=" https://bosh.io/d/stemcells"
37
+
38
+ # Ask bosh if it already has our OS / version stemcell combination
39
+ # As of this writing, the new bosh cli doesn't have --skip-if-exists
40
+ set +e
41
+ local existing_stemcell
42
+ existing_stemcell=$( bosh stemcells | grep " ${os} " | awk ' {print $2}' | tr -d " \*" | grep ^" ${version} " $ )
43
+ set -e
37
44
38
45
local stemcell_name
39
46
@@ -61,7 +68,7 @@ upload_stemcell() {
61
68
# If bosh already has our stemcell, exit 0
62
69
if [ " ${existing_stemcell} " ]; then
63
70
echo " Task bosh-upload-stemcell-from-cf-deployment:"
64
- echo " Stemcell '${stemcell_name} /${version} ' already exists. Exiting ..."
71
+ echo " Stemcell '${stemcell_name} /${version} ' already exists. Skipping ..."
65
72
return
66
73
fi
67
74
@@ -82,9 +89,9 @@ upload_stemcell() {
82
89
83
90
function upload_stemcells() {
84
91
local arguments=' '
85
- for op in ${OPS_FILES_WITH_STEMCELLS }
92
+ for op in ${OPS_FILES }
86
93
do
87
- arguments=" ${arguments} -o stemcells- ops-files/${op} "
94
+ arguments=" ${arguments} -o ops-files/${op} "
88
95
done
89
96
90
97
bosh interpolate ${arguments} cf-deployment/${MANIFEST_FILE} > /tmp/cf.yml
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ inputs:
11
11
- name : cf-deployment-concourse-tasks # - This repo
12
12
- name : cf-deployment # - The cf-deployment manifest
13
13
- name : bbl-state # - The repo containing the Director's bbl state dir
14
- - name : stemcells- ops-files # - Stemcells operations files to be made available
14
+ - name : ops-files # - Oplitonal operations files to be made available
15
15
optional : true
16
16
17
17
run :
18
- path : cf-deployment-concourse-tasks/bosh-upload-stemcell-from-cf-deployment /task
18
+ path : cf-deployment-concourse-tasks/bosh-upload-stemcells /task
19
19
20
20
params :
21
21
BBL_STATE_DIR : bbl-state
@@ -34,8 +34,10 @@ params:
34
34
# - Filepath to the manifest file within the cf-deployment resource
35
35
# - The path is relative to root of the `cf-deployment` input
36
36
37
- OPS_FILES_WITH_STEMCELLS :
37
+ OPS_FILES :
38
38
# - Optional
39
- # - List of operations files that contain additional stemcells to be uploaded
39
+ # - List of operations files to be applied to the manifest.
40
+ # - Additional stemcells specified by operations will also be uploaded.
40
41
# - Quoted and space-separated
41
- # - Paths are relative to root of the `stemcell-ops-files` input
42
+ # - Ops will be applied in the order they're listed
43
+ # - Paths are relative to root of the `ops-files` input
You can’t perform that action at this time.
0 commit comments