Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions hack/fetch-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,32 @@ release_yaml_custom() {
done
}

append_version_info_config_map() {
local component=$1
local repository=$(yq ."${component}".github "${CONFIG}")
local version=$(yq ."${component}".version "${CONFIG}")
local destination=${SCRIPT_DIR}/cmd/${TARGET}/operator/kodata/${component}/${version//v}/release.yaml

if [[ ! -f "${destination}" ]]; then
echo "Error: ${destination} not found, cannot append ConfigMap"
fi

printf '\n---\n' >> "${destination}"
cat >> "${destination}" << EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: ${component}-info
namespace: tekton-pipelines
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: ${component%-*}
data:
version: "${version}"
EOF

}

fetch_openshift_build_strategies() {
local shipwright_version=$(yq .shipwright-build.version ${CONFIG})
local strategy_repository="redhat-openshift-builds/strategies"
Expand Down Expand Up @@ -495,10 +521,12 @@ main() {
else
release_yaml_custom shipwright-build "" "" true release.yaml sample-strategies.yaml
fi
append_version_info_config_map shipwright-build

# Shared Resource CSI Driver
if [[ ${TARGET} == "openshift" ]]; then
release_yaml_custom shared-resource "" "" true release.yaml
append_version_info_config_map shared-resource
fi

echo updated payload tree
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/kubernetes/shipwrightbuild/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const (
ControllerDeploymentName = "shipwright-build-controller"
KindClusterBuildStrategy = "ClusterBuildStrategy"
OperandName = "shipwright-build"
VersionConfigMap = "shipwright-build"
VersionConfigMap = "shipwright-build-info"
WebhookContainerName = "shipwright-build-webhook"
WebhookDeploymentName = "shipwright-build-webhook"
// WebhookSecretName / WebhookServiceName / WebhookSecretDuration describe the
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/openshift/sharedresource/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
// VersionConfigMap is the ConfigMap that carries the installed component
// version. It must match v1alpha1.SharedResourceResourceName so that the
// init controller selects the shared-resource payload.
VersionConfigMap = "shared-resource"
VersionConfigMap = "shared-resource-info"
// ServiceName is the service used to for CSI driver node.
ServiceName = "shared-resource-csi-driver-node"
// ServiceMonitorName is the name of the Service Monitor
Expand Down
Loading