diff --git a/hack/release.sh b/hack/release.sh index 82d5618cfd4..ca8663a500d 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -19,21 +19,16 @@ source $(dirname $0)/../vendor/knative.dev/test-infra/scripts/release.sh -# Yaml files to generate, and the source config dir for them. -declare -A COMPONENTS -COMPONENTS=( - ["eventing-core.yaml"]="config/core" - ["eventing-crds.yaml"]="config/core/resources" - ["channel-broker.yaml"]="config/brokers/channel-broker" - ["mt-channel-broker.yaml"]="config/brokers/mt-channel-broker" - ["in-memory-channel.yaml"]="config/channels/in-memory-channel" - ["upgrade-to-v0.14.0.yaml"]="config/upgrade/v0.14.0" -) -readonly COMPONENTS +readonly EVENTING_CORE_YAML="eventing-core.yaml" +readonly EVENTING_CRDS_YAML="eventing-crds.yaml" +readonly CHANNEL_BROKER_YAML="channel-broker.yaml" +readonly MT_CHANNEL_BROKER_YAML="mt-channel-broker.yaml" +readonly IN_MEMORY_CHANNEL="in-memory-channel.yaml" +readonly UPGRADE_JOB="upgrade-to-v0.14.0.yaml" declare -A RELEASES RELEASES=( - ["eventing.yaml"]="eventing-core.yaml channel-broker.yaml mt-channel-broker.yaml in-memory-channel.yaml" + ["eventing.yaml"]="${EVENTING_CORE_YAML} ${CHANNEL_BROKER_YAML} ${MT_CHANNEL_BROKER_YAML} ${IN_MEMORY_CHANNEL}" ) readonly RELEASES @@ -48,14 +43,26 @@ function build_release() { fi # Build the components - local all_yamls=() - for yaml in "${!COMPONENTS[@]}"; do - local config="${COMPONENTS[${yaml}]}" - echo "Building Knative Eventing - ${config}" - # TODO(chizhg): reenable --strict mode after https://github.com/knative/test-infra/issues/1262 is fixed. - ko resolve ${KO_FLAGS} -R -f ${config}/ | "${LABEL_YAML_CMD[@]}" > ${yaml} - all_yamls+=(${yaml}) - done + echo "Building Knative Eventing" + # Create eventing core yaml + ko resolve ${KO_FLAGS} -R -f config/core/ | "${LABEL_YAML_CMD[@]}" > "${EVENTING_CORE_YAML}" + + # Create eventing crds yaml + ko resolve ${KO_FLAGS} -f config/core/resources/ | "${LABEL_YAML_CMD[@]}" > "${EVENTING_CRDS_YAML}" + + # Create channel broker yaml + ko resolve ${KO_FLAGS} -f config/brokers/channel-broker/ | "${LABEL_YAML_CMD[@]}" > "${CHANNEL_BROKER_YAML}" + + # Create mt channel broker yaml + ko resolve ${KO_FLAGS} -f config/brokers/mt-channel-broker/ | "${LABEL_YAML_CMD[@]}" > "${MT_CHANNEL_BROKER_YAML}" + + # Create in memory channel yaml + ko resolve ${KO_FLAGS} -f config/channels/in-memory-channel/ | "${LABEL_YAML_CMD[@]}" > "${IN_MEMORY_CHANNEL}" + + # Create upgrade job yaml + ko resolve ${KO_FLAGS} -f config/upgrade/v0.14.0/ | "${LABEL_YAML_CMD[@]}" > "${UPGRADE_JOB}" + + local all_yamls=(${EVENTING_CORE_YAML} ${EVENTING_CRDS_YAML} ${CHANNEL_BROKER_YAML} ${MT_CHANNEL_BROKER_YAML} ${IN_MEMORY_CHANNEL} ${UPGRADE_JOB}) # Assemble the release for yaml in "${!RELEASES[@]}"; do echo "Assembling Knative Eventing - ${yaml}"