-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiarch docker image builds (#970)
* Support multiarch docker image builds * Make sure to install docker buildx plugin in circleci * Use newer ubuntu and docker for buildx * Remove test * Fix build * Make sure to check against the right name * Actually fix ecr repo tests
- Loading branch information
1 parent
c66467d
commit 2c215cf
Showing
5 changed files
with
160 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package docker | ||
|
||
import ( | ||
"github.com/gruntwork-io/terratest/modules/logger" | ||
"github.com/gruntwork-io/terratest/modules/shell" | ||
"github.com/gruntwork-io/terratest/modules/testing" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
// Push runs the 'docker push' command to push the given tag. This will fail the test if there are any errors. | ||
func Push(t testing.TestingT, logger *logger.Logger, tag string) { | ||
require.NoError(t, PushE(t, logger, tag)) | ||
} | ||
|
||
// PushE runs the 'docker push' command to push the given tag. | ||
func PushE(t testing.TestingT, logger *logger.Logger, tag string) error { | ||
logger.Logf(t, "Running 'docker push' for tag %s", tag) | ||
|
||
cmd := shell.Command{ | ||
Command: "docker", | ||
Args: []string{"push", tag}, | ||
Logger: logger, | ||
} | ||
return shell.RunCommandE(t, cmd) | ||
} |