Created
March 15, 2017 14:31
-
-
Save barthy1/570a321f910a2d89fd0d0b2dd3d7b0b8 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# bosh release | |
mkdir -p releases | |
apt-get update | |
sudo apt-get install -y git wget curl ruby unzip | |
wget ftp://ftp.unicamp.br/pub/ppc64el/ubuntu/14_04/cloud-foundry/go-1.7-ppc64le.tar.gz | |
rm -rf /usr/local/go /usr/local/bin/go | |
tar xvfz go-1.7-ppc64le.tar.gz -C /usr/local | |
ln -s /usr/local/go/bin/go /usr/local/bin | |
gem install bosh_cli | |
cd releases | |
git clone --recursive https://github.com/cloudfoundry/bosh | |
git clone https://github.com/cloudfoundry/bosh-utils src/github.com/cloudfoundry/bosh-utils | |
export GOPATH=$PWD | |
#export PATH=$PWD/bin:$PATH | |
cd $GOPATH/src/github.com/cloudfoundry/bosh-utils | |
bin/build | |
cd $GOPATH/bosh | |
dir=$PWD | |
echo 'yes' | bosh create release --force --name bosh | |
cd $dir/blobs/verify-multidigest | |
cp $GOPATH/src/github.com/cloudfoundry/bosh-utils/out/verify-multidigest . | |
fname=$(ls verify-multidigest-*); dst=$(readlink $fname); rm -f $dst; mv verify-multidigest $fname | |
cd $dir/blobs/davcli | |
wget https://s3.amazonaws.com/davcli/davcli-0.0.13-linux-ppc64le -O davcli | |
fname=$(ls davcli-*); dst=$(readlink $fname); rm -f $dst; mv davcli $fname | |
cd $dir/config | |
sed -i 's/provider: s3/provider: local/g' final.yml | |
sed -i 's/bucket_name: blob.cfblob.com/blobstore_path: ~\/releases\/bosh-release\/blobs/g' final.yml | |
cd $dir | |
yes 'yes' | bosh upload blobs | |
# type 'yes' for each blob | |
bosh create release --force --with-tarball --name bosh --version $(git describe --tags | sed 's/v//g' | cut -d - -f 1) | |
cp $dir/dev_releases/bosh/bosh-*.tgz $dir/../../ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment