Skip to content

Commit 89a041c

Browse files
authored
feat(build): upload CLI binaries to Google Cloud Storage
This change uploads binaries to GCS instead of bintray. It preserves tag-based releases and uploads those to GCS (in the appropriate directory) as well. Fixes deis/workflow-cli#73
1 parent 9a9a62e commit 89a041c

4 files changed

Lines changed: 63 additions & 46 deletions

File tree

.travis.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ sudo: required
1111
install:
1212
- make bootstrap
1313
script:
14-
- make build test dist prep-bintray-json
14+
- make build test dist
1515
deploy:
16-
provider: bintray
17-
skip_cleanup: true
18-
file: _scripts/ci/bintray-ci.json
19-
user: deis-admin
20-
key:
21-
secure: ZazS3VV7K7RsfpUJ6pl9xbRP5yR8TTJmVyamwVThcmcUpCfNtGGVBJdzmu+S3X1eVa9XSgUayLc1yF1HZ0WkB50mZnQQcEsfhSvEnkn2YFAVPOZIn5GYJTDL4llUNImbMz3VB7/a4XC5n+6dnWY4Q76Smqj5kgsfmr7w74PUf21iPyr8F4vkyND2Pli3BdR1AUH9PF5ICZAZcJ8HLZe522YXUuxENCjb8s2tic5OroAAymkhKbmGmogjfBJXAIUu+O+FX01XSoaVn6cE9EXtsraMNDm8LWUwElnqXlfL8I5tZP1omkoiN9cpC128uwwMOV7WzsEGvnSHxv3v43NmYOhjL8OGNn1xsDmtdXpO36evxD1VF8CB3A+p+c/H7sv7lfvRlbd59ye2HBNBI1Wo8PyOP7KJ+mQsh/2Ow9tEQjvainTQ0ca98LS2O2QyVuUSVuknc95wDsugszPGSwjZvHUO6wjl01O/mSybgIVKmQq9QNlUge5KhWpmrL/TnHBS7spzesDEg76qJt4tlTefL2QGknz9IqCoIsiKE6zVOvwJBFs7UQti2c0HThk1KL18qXa8qKHm57AqOct22I8rNyI4MOirv7sCA/GzygraIuQiZNwGBgV7t3XZglXhPNFaP93+X2eNZuXpBu+vierRcy3ay4Un/d4hOHwJpfODgok=
16+
provider: gcs
17+
access_key_id:
18+
secure: "e/p8Z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XceC1M4HPohQ/0akF75627I4N7rcqYJT+x55Eb+vGPFVBh7YYvIn58b2lFJdVXs5EYaS6SaNoi5ElWZrBpYER/wXuKSSeKhUUeJSckU+DXaJWIGzmvooAxzthPZg/ODg9OKlCDDr7minLQ06It1msKCwDHqQ1ioEMFJx7iOGyw80al0EI92T8bRG/erVCGOfzJjq9k6rRJPl3IOJRqAyX3X8PmVlZ9HeFx8U9Bm6Vtz2fEqrwQT1tchbZW8XJjygujIQbQOdBHozBbmmssn3lkIizWZ3jhYi8DUpnEPVBedePHlvKcUFI0="
21+
bucket: workflow-cli
22+
local-dir: _dist
2223
on:
2324
branch: master
25+
acl: public-read
2426
notifications:
2527
webhooks:
2628
urls:

Makefile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ define check-static-binary
3535
fi
3636
endef
3737

38-
prep-bintray-json:
39-
# TRAVIS_TAG is set to the tag name if the build is a tag
40-
ifdef TRAVIS_TAG
41-
@jq '.version.name |= "$(VERSION)"' _scripts/ci/bintray-template.json | \
42-
jq '.package.repo |= "deis"' > _scripts/ci/bintray-ci.json
43-
else
44-
@jq '.version.name |= "$(VERSION)"' _scripts/ci/bintray-template.json \
45-
> _scripts/ci/bintray-ci.json
46-
endif
47-
4838
bootstrap:
4939
${DEV_ENV_CMD} glide install
5040

@@ -55,11 +45,12 @@ build: binary-build
5545
@$(call check-static-binary,deis)
5646

5747
build-all:
58-
${DEV_ENV_CMD} gox -verbose \
59-
${GO_LDFLAGS} \
60-
-os="linux darwin " \
61-
-arch="amd64 386" \
62-
-output="$(DIST_DIR)/deis-${VERSION}-{{.OS}}-{{.Arch}}" .
48+
${DEV_ENV_CMD} gox -verbose ${GO_LDFLAGS} -os="linux darwin " -arch="amd64 386" -output="$(DIST_DIR)/deis-latest-{{.OS}}-{{.Arch}}" .
49+
ifdef TRAVIS_TAG
50+
${DEV_ENV_CMD} gox -verbose ${GO_LDFLAGS} -os="linux darwin" -arch="amd64 386" -output="$(DIST_DIR)/${TRAVIS_TAG}/deis-${TRAVIS_TAG}-{{.OS}}-{{.Arch}}" .
51+
else
52+
${DEV_ENV_CMD} gox -verbose ${GO_LDFLAGS} -os="linux darwin" -arch="amd64 386" -output="$(DIST_DIR)/${VERSION}/deis-${VERSION}-{{.OS}}-{{.Arch}}" .
53+
endif
6354

6455
binary-build:
6556
${DEV_ENV_PREFIX} -e GOOS=${GOOS} ${DEV_ENV_IMAGE} go build -a -installsuffix cgo ${GO_LDFLAGS} -o deis .

README.md

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,68 @@
33
[![Build Status](https://travis-ci.org/deis/workflow-cli.svg?branch=master)](https://travis-ci.org/deis/workflow-cli)
44
[![Go Report Card](http://goreportcard.com/badge/deis/workflow-cli)](http://goreportcard.com/report/deis/workflow-cli)
55
[![codebeat badge](https://codebeat.co/badges/05d314a8-ca61-4211-b69e-e7a3033662c8)](https://codebeat.co/projects/github-com-deis-workflow-cli)
6-
[![Download](https://api.bintray.com/packages/deis/deisci/deis/images/download.svg)](https://bintray.com/deis/deisci/deis/_latestVersion)
6+
7+
Download Links:
8+
9+
- [64 Bit Linux](https://storage.googleapis.com/workflow-cli/deis-latest-linux-amd64)
10+
- [32 Bit Linux](https://storage.googleapis.com/workflow-cli/deis-latest-linux-386)
11+
- [64 Bit Mac OS X](https://storage.googleapis.com/workflow-cli/deis-latest-darwin-amd64)
12+
- [32 Bit Max OS X](https://storage.googleapis.com/workflow-cli/deis-latest-darwin-386)
13+
14+
(Note: Windows builds are not yet supported. [#26](https://github.com/deis/workflow-cli/issues/26) currently tracks the work to support them).
715

816
`deis` is a command line utility used to interact with the [Deis](http://deis.io) open source PaaS.
917

1018
Please add any [issues](https://github.com/deis/workflow-cli/issues) you find with this software to the [Deis Workflow CLI Project](https://github.com/deis/workflow-cli).
1119

1220
## Installation
1321

14-
### From Bintray
22+
### Pre-built Binary
1523

16-
Install the `deis` client from [bintray](https://bintray.com/) by running
24+
See the appropriate sub-section below for your system to download and install the latest build of this software.
1725

18-
$ curl -sSL http://deis.io/deis-cli/install-v2.sh | bash
26+
#### 64 Bit Linux
1927

20-
The installer will fetch the latest version of the client into your current directory.
28+
```console
29+
curl -o deis https://storage.googleapis.com/workflow-cli/deis-latest-linux-amd64 && chmod +x deis
30+
```
2131

22-
$ ./deis --version
32+
#### 32 Bit Linux
33+
34+
```console
35+
curl -o deis https://storage.googleapis.com/workflow-cli/deis-latest-linux-386 && chmod +x deis
36+
```
37+
38+
#### 64 Bit Mac OS X
39+
40+
```console
41+
curl -o deis https://storage.googleapis.com/workflow-cli/deis-latest-darwin-amd64 && chmod +x deis
42+
```
43+
44+
#### 32 Bit Max OS X
45+
46+
```console
47+
curl -o deis https://storage.googleapis.com/workflow-cli/deis-latest-darwin-386 && chmod +x deis
48+
```
49+
50+
#### Windows
51+
52+
Windows builds are not yet supported. [#26](https://github.com/deis/workflow-cli/issues/26) currently tracks the work to support them).
53+
54+
55+
After you execute the appropriate command for your system, you'll have a `deis` binary in the current directory.
56+
57+
Run the following to see the version:
58+
59+
```console
60+
$ ./deis --version
61+
```
2362

2463
You can then move it anywhere in your path:
2564

26-
$ mv deis /usr/local/bin
65+
```console
66+
$ mv deis /usr/local/bin
67+
```
2768

2869
### From Scratch
2970

_scripts/ci/bintray-template.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)