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

Update run-pack #609

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions dockerfiles/run-pack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.5
FROM alpine

ENV GOPATH /.go
ENV GOBIN $GOPATH/bin
Expand All @@ -10,8 +10,7 @@ RUN apk add --no-cache go curl git gcc libc-dev \
&& cd $GOPATH/src/app \
&& mkdir -p $GOBIN \
&& mkdir /barcelona \
&& curl https://glide.sh/get | sh \
&& glide install \
&& go mod download \
&& go build -o /barcelona/barcelona-run --ldflags '-linkmode external -extldflags "-static"' \
&& rm -rf /.go \
&& apk del --purge go curl git gcc libc-dev
Expand Down
40 changes: 0 additions & 40 deletions dockerfiles/run-pack/glide.lock

This file was deleted.

11 changes: 0 additions & 11 deletions dockerfiles/run-pack/glide.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions dockerfiles/run-pack/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module barcelona/run-pack

go 1.14

require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/aws/aws-sdk-go v1.4.6
github.com/go-ini/ini v1.21.1
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/honeybadger-io/honeybadger-go v0.5.0 // indirect
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7
github.com/mitchellh/go-ps v0.0.0-20160822165447-e2d21980687c
github.com/urfave/cli v1.18.1
)
23 changes: 23 additions & 0 deletions dockerfiles/run-pack/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/aws/aws-sdk-go v1.4.6/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-ini/ini v1.21.1/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/honeybadger-io/honeybadger-go v0.5.0 h1:aB+rWcUZ1uaOxxbgX2Dazir+vodrMNlWGEp8fd0ttv0=
github.com/honeybadger-io/honeybadger-go v0.5.0/go.mod h1:39ZC81aq3YtRBX7QPVvMj+NsYlsHFKLXNAXwgTo/SCc=
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/mitchellh/go-ps v0.0.0-20160822165447-e2d21980687c/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/shirou/gopsutil v2.18.12+incompatible h1:1eaJvGomDnH74/5cF4CTmTbLHAriGFsTZppLXDX93OM=
github.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/urfave/cli v1.18.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb h1:fgwFCsaw9buMuxNd6+DQfAuSFqbNiQZpcgJQAgJsK6k=
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1 change: 1 addition & 0 deletions dockerfiles/run-pack/load_env_and_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func getValues(c S3Client, m map[string]string) (map[string]string, error) {

func loadEnvAndRun(region string, bucket string, envs map[string]string, command []string) {
cli, err := NewS3Client(region, bucket)

if err != nil {
panic(err)
}
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/run-pack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import (
"strings"

"github.com/urfave/cli"
"github.com/honeybadger-io/honeybadger-go"
)

func main() {
defer honeybadger.Monitor()
app := cli.NewApp()
app.Name = "barcelona-run"
app.Version = "0.0.1"
Expand Down
10 changes: 8 additions & 2 deletions dockerfiles/run-pack/s3_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ func newSession(region string) (*session.Session, error) {
return nil, err
}

sess, err := session.NewSession(&aws.Config{Region: &region})
sess, err := session.NewSession(&aws.Config{
CredentialsChainVerboseErrors: aws.Bool(true),
Region: &region,
})
if err != nil {
return nil, err
}
Expand All @@ -55,7 +58,10 @@ func newSession(region string) (*session.Session, error) {
}
return sess, err
} else {
sess, err := session.NewSession(&aws.Config{Region: &region})
sess, err := session.NewSession(&aws.Config{
CredentialsChainVerboseErrors: aws.Bool(true),
Region: &region,
})
if err != nil {
return nil, err
}
Expand Down