Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a "beta" flag and moving to cloud.build.io #54

Merged
merged 13 commits into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
workspace:
base: /go
path: src/github.com/NYTimes/drone-gae

pipeline:
test:
image: golang:1
environment:
- GO111MODULE=on
- CGO_ENABLED=0
- GOPATH=/go
commands:
- go mod download
- go vet
- go test -cover

build:
image: golang:1
environment:
- GO111MODULE=on
- CGO_ENABLED=0
- GOPATH=/go
commands:
- go build -a -ldflags "-X main.version=${DRONE_TAG:-other} -X main.rev=${DRONE_COMMIT}"
when:
event: [push, tag]

publish:
image: plugins/docker
repo: nytimes/drone-gae
secrets:
- docker_username
- docker_password
auto_tag: true
when:
event: [tag, push]
branch: master

slack:
image: plugins/slack
channel: dv-notifications
webhook:
from_secret: slack_webhook
when:
event: [tag, push]
branch:
- master
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

16 changes: 0 additions & 16 deletions bin/dist

This file was deleted.

11 changes: 0 additions & 11 deletions bin/update-deps

This file was deleted.

20 changes: 0 additions & 20 deletions glide.lock

This file was deleted.

5 changes: 0 additions & 5 deletions glide.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/nytimes/drone-gae

go 1.12

require (
github.com/drone/drone-plugin-go v0.0.0-20160112175251-d6109f644c59
gopkg.in/yaml.v2 v2.2.2
)
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
github.com/drone/drone-plugin-go v0.0.0-20160112175251-d6109f644c59 h1:lc8w5rGVkaSLxr/Tm92YrFoICHGmstQ31Do9wvuvmt0=
github.com/drone/drone-plugin-go v0.0.0-20160112175251-d6109f644c59/go.mod h1:PSMBZt7yp90rISzQ1oYaMLKo2lLRE/0uToly1W5MBWk=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
16 changes: 13 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ type GAE struct {
// AppCfgCmd is an optional override for the location of the App Engine appcfg.py
// tool. This may be useful if using a custom image.
AppCfgCmd string `json:"appcfg_cmd"`

// Beta is used by the gcloud command suite. If set, `gcloud beta app` will be used.
Beta bool `json:"beta"`
}

var (
Expand Down Expand Up @@ -326,11 +329,18 @@ var gcloudCmds = map[string]bool{
}

func runGcloud(runner *Environ, workspace string, vargs GAE) error {
// add the action first (gcloud app X)
args := []string{
var args []string

// if beta, add that command first so we get `gcloud beta ...`
if vargs.Beta {
args = append(args, "beta")
}

// add the app action (gcloud app X)
args = append(args, []string{
"app",
vargs.Action,
}
}...)

// Add subcommands to we can make complex calls like
// 'gcloud app services X Y Z ...'
Expand Down
22 changes: 0 additions & 22 deletions vendor/github.com/davecgh/go-spew/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/davecgh/go-spew/.travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/github.com/davecgh/go-spew/LICENSE

This file was deleted.

Loading