Skip to content

Commit

Permalink
Ko publish changed, hence adjusting the patch 💄 (knative#1833)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
  • Loading branch information
matzew committed Aug 5, 2022
1 parent 4bec8cf commit d28f572
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions openshift/patches/018-rekt-test-override-kopublish.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
diff --git a/vendor/knative.dev/reconciler-test/pkg/images/ko.go b/vendor/knative.dev/reconciler-test/pkg/images/ko.go
index adde2080f..ff57c9d6b 100644
--- a/vendor/knative.dev/reconciler-test/pkg/images/ko.go
+++ b/vendor/knative.dev/reconciler-test/pkg/images/ko.go
@@ -16,20 +16,7 @@ limitations under the License.

package images

-import (
diff --git a/vendor/knative.dev/reconciler-test/pkg/images/ko/publish.go b/vendor/knative.dev/reconciler-test/pkg/images/ko/publish.go
index f6a62a67d..835f14270 100644
--- a/vendor/knative.dev/reconciler-test/pkg/images/ko/publish.go
+++ b/vendor/knative.dev/reconciler-test/pkg/images/ko/publish.go
@@ -19,8 +19,6 @@ package ko
import (
"context"
"errors"
- "fmt"
- "os"
-)
-
// Use ko to publish the image.
func KoPublish(path string) (string, error) {
)

// ErrKoPublishFailed is returned when the ko publish command fails.
@@ -28,23 +26,5 @@ var ErrKoPublishFailed = errors.New("ko publish failed")

// Publish uses ko to publish the image.
func Publish(ctx context.Context, path string) (string, error) {
- version := os.Getenv("GOOGLE_KO_VERSION")
- if version == "" {
- version = "v0.11.2"
- }
- args := []string{
- "go", "run", fmt.Sprintf("github.com/google/ko@%s", version),
- "publish",
- }
- platform := os.Getenv("PLATFORM")
- if len(platform) > 0 {
- platform = " --platform=" + platform
- args = append(args, "--platform="+platform)
- }
- out, err := runCmd(fmt.Sprintf("ko publish%s -B %s", platform, path))
- args = append(args, "-B", path)
- out, err := runCmd(ctx, args)
- if err != nil {
- return "", err
- return "", fmt.Errorf("%w: %v -- command: %q",
- ErrKoPublishFailed, err, args)
- }
- return out, nil
+ return "", nil
Expand Down

0 comments on commit d28f572

Please sign in to comment.