Skip to content

Commit

Permalink
New naming convention for images compatibile with o-k/h (#446)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Suszyński <ksuszyns@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and cardil committed Jun 17, 2024
1 parent d62d077 commit e20a44d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion openshift/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export ARTIFACT_DIR="${ARTIFACT_DIR:-$(dirname "$(mktemp -d -u)")/build-${BUILD_
export ARTIFACTS="${ARTIFACTS:-${ARTIFACT_DIR}}/kn-event/e2e-tests"
mkdir -p "${ARTIFACTS}"

# shellcheck disable=SC1090
source "$(go run knative.dev/hack/cmd/script e2e-tests.sh)"

set -Eeuo pipefail
Expand All @@ -30,9 +31,12 @@ fi

if [ -z "${KN_PLUGIN_EVENT_EXECUTABLE:-}" ]; then
echo '=== Building kn-event'
# TODO: Remove the IMAGES_KN_EVENT_SENDER reference once CI is updated to use
# the new naming convention
readonly sender_image="${CLIENT_PLUGIN_EVENT_SENDER:-${IMAGES_KN_EVENT_SENDER}}"
go build -ldflags \
"-X knative.dev/kn-plugin-event/pkg/metadata.Version=$(git describe --tags --dirty --always)
-X knative.dev/kn-plugin-event/pkg/metadata.Image=${IMAGES_KN_EVENT_SENDER}" \
-X knative.dev/kn-plugin-event/pkg/metadata.Image=${sender_image}" \
-o "${repodir}/build/_output/bin/kn-event-$(go env GOOS)-$(go env GOARCH)" \
"${repodir}/cmd/kn-event"
fi
Expand Down
10 changes: 8 additions & 2 deletions test/e2e/openshift_ci_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ package e2e
import "knative.dev/kn-plugin-event/test/images"

func init() { //nolint:gochecknoinits
images.Resolvers = append(images.Resolvers, &images.EnvironmentalBasedResolver{
// TODO: Remove the deprecatedResolver after CI is updated to use the new
// naming convention.
deprecatedResolver := &images.EnvironmentalBasedResolver{
Prefix: "test-images",
})
}
resolver := &images.EnvironmentalBasedResolver{
Prefix: "client-plugin-event-test",
}
images.Resolvers = append(images.Resolvers, resolver, deprecatedResolver)
}

0 comments on commit e20a44d

Please sign in to comment.