Skip to content

Commit

Permalink
copy go environment by default
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin committed Jun 17, 2024
1 parent 5678076 commit 37e4a91
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 1 addition & 3 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ func New() *cobra.Command {

opts := k6foundry.NativeBuilderOpts{}
// This is required to pass environment variables like the github access credential
opts.CopyEnv = true
opts.CopyGoEnv = true

if verbose {
opts.Verbose = true
opts.Stdout = os.Stdout
opts.Stderr = os.Stderr
opts.LogLevel = "DEBUG"
}
builder, err := k6foundry.NewNativeBuilder(context.TODO(), opts)
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ go 1.22.2

require (
github.com/grafana/k6catalog v0.1.0
github.com/grafana/k6foundry v0.1.0
github.com/grafana/k6foundry v0.1.2
github.com/spf13/cobra v1.8.0
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8
)

require (
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/grafana/k6catalog v0.1.0 h1:jLmbmB3EUJ+zyQG3hWy6dWbtMjvTkvJNx1d4LX8it6I=
github.com/grafana/k6catalog v0.1.0/go.mod h1:8R9eXAh2nb69+drkj0rZ4aemso0jcwCbPP6Q3E5LqCw=
github.com/grafana/k6foundry v0.1.0 h1:hbpFFqZMjIOqsQbdn0aoCF+LdofBv5UfTOyXdZJSpE8=
github.com/grafana/k6foundry v0.1.0/go.mod h1:b6n4InFgXl+3yPobmlyJfcJmLozU9CI9IIUuq8YqEiM=
github.com/grafana/k6foundry v0.1.2 h1:/vitrnaeVk86nh2mmaH+C2LUAvjMrT4I44xp5+cPQM0=
github.com/grafana/k6foundry v0.1.2/go.mod h1:b6n4InFgXl+3yPobmlyJfcJmLozU9CI9IIUuq8YqEiM=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -24,8 +24,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY=
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI=
golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
3 changes: 2 additions & 1 deletion service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ func setupBuildService(cacheDir string) (BuildService, error) {

opts := k6foundry.NativeBuilderOpts{
GoOpts: k6foundry.GoOpts{
CopyEnv: true,
CopyGoEnv: true,
GoProxy: goproxySrv.URL,
GoNoProxy: "none",
GoPrivate: "go.k6.io",
GoNoSumDB: "go.k6.io",
EphemeralCache: true,
},
}
Expand Down

0 comments on commit 37e4a91

Please sign in to comment.