diff --git a/go.sum b/go.sum index 9a69c48..ed0f6c4 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,7 @@ github.com/Masterminds/sprig v2.16.0+incompatible h1:QZbMUPxRQ50EKAq3LFMnxddMu88 github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-cmd/cmd v1.0.3 h1:N4lOnQy9gKNXLDnjoyRLLXG5sRqEzvFtdHjQysBez/g= github.com/go-cmd/cmd v1.0.3/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= @@ -16,11 +17,13 @@ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8 h1:h7zdf0RiEvWbYBKIx4b+q41xoUVnMmvsGZnIVE5syG8= golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/pkg/executors/docker.go b/pkg/executors/docker.go index d72470e..d94aecc 100644 --- a/pkg/executors/docker.go +++ b/pkg/executors/docker.go @@ -16,18 +16,17 @@ func executeDocker(context ActionExecutionContext) { projectPath := context.ScriptContext.Project.ProjectPath execCmd := exec.Command("docker", "build", "-f", dockerFilePath, projectPath) - var stdout, stderr []byte var errStdout, errStderr error stdoutIn, _ := execCmd.StdoutPipe() stderrIn, _ := execCmd.StderrPipe() execCmd.Start() go func() { - stdout, errStdout = copyAndCapture(os.Stdout, stdoutIn) + _, errStdout = copyAndCapture(os.Stdout, stdoutIn) }() go func() { - stderr, errStderr = copyAndCapture(os.Stderr, stderrIn) + _, errStderr = copyAndCapture(os.Stderr, stderrIn) }() err := execCmd.Wait() @@ -38,9 +37,6 @@ func executeDocker(context ActionExecutionContext) { if errStdout != nil || errStderr != nil { log.Fatalf("failed to capture stdout or stderr\n") } - //outStr, errStr := string(stdout), string(stderr) - //fmt.Printf("\nout:\n%s\nerr:\n%s\n", outStr, errStr) - } func init() {