Skip to content

Commit

Permalink
Include dashboard image into release process
Browse files Browse the repository at this point in the history
  • Loading branch information
sleshchenko committed Apr 21, 2021
1 parent 083355b commit bfbeaac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ checkImageReferences() {
echo "[ERROR] Unable to find Che server image with version ${RELEASE} in the $filename"; exit 1
fi

if ! grep -q "value: quay.io/eclipse/che-dashboard:$RELEASE" $filename; then
echo "[ERROR] Unable to find dashboard image with version ${RELEASE} in the $filename"; exit 1
fi

if ! grep -q "value: quay.io/eclipse/che-plugin-registry:$RELEASE" $filename; then
echo "[ERROR] Unable to find plugin registry image with version ${RELEASE} in the $filename"; exit 1
fi
Expand Down
1 change: 1 addition & 0 deletions olm/release-olm-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ do
sed \
-e 's/imagePullPolicy: *Always/imagePullPolicy: IfNotPresent/' \
-e 's/"cheImageTag": *"nightly"/"cheImageTag": ""/' \
-e 's|quay.io/eclipse/che-dashboard:next|quay.io/eclipse/che-dashboard:${RELEASE}|' \
-e 's|"identityProviderImage": *"quay.io/eclipse/che-keycloak:nightly"|"identityProviderImage": ""|' \
-e 's|"devfileRegistryImage": *"quay.io/eclipse/che-devfile-registry:nightly"|"devfileRegistryImage": ""|' \
-e 's|"pluginRegistryImage": *"quay.io/eclipse/che-plugin-registry:nightly"|"pluginRegistryImage": ""|' \
Expand Down
3 changes: 3 additions & 0 deletions replace-images-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ replaceImagesTags() {
OPERATOR_YAML="${BASE_DIR}"/deploy/operator.yaml

lastDefaultCheServerImage=$(yq -r ".spec.template.spec.containers[] | select(.name == \"che-operator\") | .env[] | select(.name == \"RELATED_IMAGE_che_server\") | .value" "${OPERATOR_YAML}")
lastDefaultDashboardImage=$(yq -r ".spec.template.spec.containers[] | select(.name == \"che-operator\") | .env[] | select(.name == \"RELATED_IMAGE_dashboard\") | .value" "${OPERATOR_YAML}")
lastDefaultKeycloakImage=$(yq -r ".spec.template.spec.containers[] | select(.name == \"che-operator\") | .env[] | select(.name == \"RELATED_IMAGE_keycloak\") | .value" "${OPERATOR_YAML}")
lastDefaultPluginRegistryImage=$(yq -r ".spec.template.spec.containers[] | select(.name == \"che-operator\") | .env[] | select(.name == \"RELATED_IMAGE_plugin_registry\") | .value" "${OPERATOR_YAML}")
lastDefaultDevfileRegistryImage=$(yq -r ".spec.template.spec.containers[] | select(.name == \"che-operator\") | .env[] | select(.name == \"RELATED_IMAGE_devfile_registry\") | .value" "${OPERATOR_YAML}")

CHE_SERVER_IMAGE_REALEASE=$(replaceImageTag "${lastDefaultCheServerImage}" "${RELEASE_TAG}")
DASHBOARD_IMAGE_REALEASE=$(replaceImageTag "${lastDefaultDashboardImage}" "${RELEASE_TAG}")
KEYCLOAK_IMAGE_RELEASE=$(replaceImageTag "${lastDefaultKeycloakImage}" "${RELEASE_TAG}")
PLUGIN_REGISTRY_IMAGE_RELEASE=$(replaceImageTag "${lastDefaultPluginRegistryImage}" "${RELEASE_TAG}")
DEVFILE_REGISTRY_IMAGE_RELEASE=$(replaceImageTag "${lastDefaultDevfileRegistryImage}" "${RELEASE_TAG}")
Expand All @@ -48,6 +50,7 @@ replaceImagesTags() {
yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\") | .image ) = \"quay.io/eclipse/che-operator:${RELEASE_TAG}\"" | \
yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"CHE_VERSION\") | .value ) = \"${RELEASE_TAG}\"" | \
yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_che_server\") | .value ) = \"${CHE_SERVER_IMAGE_REALEASE}\"" | \
yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_dashboard\") | .value ) = \"${DASHBOARD_IMAGE_REALEASE}\"" | \
yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_keycloak\") | .value ) = \"${KEYCLOAK_IMAGE_RELEASE}\"" | \
yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_plugin_registry\") | .value ) = \"${PLUGIN_REGISTRY_IMAGE_RELEASE}\"" | \
yq -ryY "( .spec.template.spec.containers[] | select(.name == \"che-operator\").env[] | select(.name == \"RELATED_IMAGE_devfile_registry\") | .value ) = \"${DEVFILE_REGISTRY_IMAGE_RELEASE}\"" \
Expand Down

0 comments on commit bfbeaac

Please sign in to comment.