This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
deploy.sh
executable file
·43 lines (31 loc) · 1.32 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
set -ex
echo "This script automates the steps in the README"
go_pkg_remote=https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz
go_pkg_path=./tmp/go-linux-amd64.tar.gz
if [ -f "${go_pkg_path}" ]; then
echo "Go package already exist, skipping download"
else
echo "Go package doesn't exist, downloading"
wget "${go_pkg_remote}" -O "${go_pkg_path}"
fi
echo "${go_pkg_remote}" > ./tmp/go-version.txt
echo "Packaging local source"
tar -cvzf ./tmp/spacebears_src.tgz -C ../src/ spacebears/
echo "Adding blobs"
bosh add-blob ./tmp/go-linux-amd64.tar.gz go-linux-amd64.tar.gz
bosh add-blob ./tmp/go-version.txt go-version.txt
bosh add-blob ./tmp/spacebears_src.tgz spacebears_src.tgz
echo "Creating release"
bosh create-release --force --tarball ./tmp/bosh-simple-with-routing.tgz
echo "Uploading release"
bosh upload-release
echo "Downloading routing release"
routing_release_remote=https://github.com/cloudfoundry-incubator/routing-release/releases/download/0.162.0/routing-0.162.0.tgz
routing_release_path=./tmp/routing-release.tgz
if [ ! -f "${routing_release_path}" ]; then
wget "${routing_release_remote}" -O ${routing_release_path}
fi
echo "Uploading routing release"
bosh upload-release ${routing_release_path}
yes | bosh -d bosh_simple_with_routing deploy manifests/lite_manifest.yml --no-redact