Build only linux container image for tests on Linux
Build multi-arch container image takes much longer time than only
building linux container image. This PR changes back to only build linux
container image for linux tests to avoid timeout issue
@@ -120,6 +120,7 @@ func pushImage(pkgDir, stagingImage, stagingVersion, platform string) error {
}
var cmd *exec.Cmd
+ if platform == "windows" {
// build multi-arch image which can work for both Linux and Windows
cmd = exec.Command("make", "-C", pkgDir, "build-and-push-multi-arch",
fmt.Sprintf("GCE_PD_CSI_STAGING_VERSION=%s", stagingVersion),
@@ -128,6 +129,15 @@ func pushImage(pkgDir, stagingImage, stagingVersion, platform string) error {
if err != nil {
return fmt.Errorf("failed to run make command for windows: err: %v", err)
}
+ } else {
+ cmd = exec.Command("make", "-C", pkgDir, "push-container",
+ fmt.Sprintf("GCE_PD_CSI_STAGING_VERSION=%s", stagingVersion),
+ fmt.Sprintf("GCE_PD_CSI_STAGING_IMAGE=%s", stagingImage))
+ err = runCommand("Pushing GCP Container for Linux", cmd)
+ if err != nil {
+ return fmt.Errorf("failed to run make command for linux: err: %v", err)
+ }
+ }
return nil
}
