Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
chore: Remove DevWorkspace Generator from devfile registry
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Jun 13, 2024
1 parent a2e5c63 commit de18373
Show file tree
Hide file tree
Showing 79 changed files with 18 additions and 21,459 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/devworkspace-generator-publish-next.yml

This file was deleted.

90 changes: 0 additions & 90 deletions .github/workflows/devworkspace-generator-release.yml

This file was deleted.

6 changes: 0 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ function parse_arguments() {

parse_arguments "$@"

echo "Build tooling..."
pushd "${base_dir}"/tools/devworkspace-generator > /dev/null
yarn

BUILD_COMMAND="build"
if [[ -z $BUILDER ]]; then
echo "BUILDER not specified, trying with podman"
Expand Down Expand Up @@ -108,8 +104,6 @@ else
fi
fi

pushd "${base_dir}" > /dev/null

IMAGE="${REGISTRY}/${ORGANIZATION}/che-devfile-registry:${TAG}"
VERSION=$(head -n 1 VERSION)
${BUILDER} ${BUILD_COMMAND} \
Expand Down
15 changes: 9 additions & 6 deletions build/scripts/generate_devworkspace_templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,43 @@ if [[ -z "$VERSION" || "$VERSION" == *"-next" ]]; then
VERSION="main"
fi

CHE_DEVWORKSPACE_GENERATOR_VERSION=next
PLUGIN_REGISTRY_URL=https://eclipse-che.github.io/che-plugin-registry/${VERSION}/v3

# Install che-devworkspace-generator
CHE_DEVWORKSPACE_GENERATOR_VERSION=next
npm install @eclipse-che/che-devworkspace-generator@${CHE_DEVWORKSPACE_GENERATOR_VERSION}

for dir in /build/devfiles/*/
do
devfile_url=$(grep "v2:" "${dir}"meta.yaml) || :
if [ -n "$devfile_url" ]; then
devfile_url=${devfile_url##*v2: }
devfile_url=${devfile_url%/}
#generate a temporary devworkspace yaml to fetch git repository name and clone url.
npm_config_yes=true npx @eclipse-che/che-devworkspace-generator@${CHE_DEVWORKSPACE_GENERATOR_VERSION} \
npm_config_yes=true npx @eclipse-che/che-devworkspace-generator \
--devfile-url:"${devfile_url}" \
--plugin-registry-url:"${PLUGIN_REGISTRY_URL}" \
--editor-entry:che-incubator/che-code/latest \
--output-file:"${dir}"temp.yaml

name=$(yq -r '.spec.template.projects[0].name' "${dir}temp.yaml" | sed -n '2 p')
project="${name}={{_INTERNAL_URL_}}/resources/v2/${name}.zip"

npm_config_yes=true npx @eclipse-che/che-devworkspace-generator@${CHE_DEVWORKSPACE_GENERATOR_VERSION} \
npm_config_yes=true npx @eclipse-che/che-devworkspace-generator \
--devfile-url:"${devfile_url}" \
--editor-entry:che-incubator/che-code/insiders \
--plugin-registry-url:"${PLUGIN_REGISTRY_URL}" \
--output-file:"${dir}"/devworkspace-che-code-insiders.yaml \
--project."${project}"

npm_config_yes=true npx @eclipse-che/che-devworkspace-generator@${CHE_DEVWORKSPACE_GENERATOR_VERSION} \
npm_config_yes=true npx @eclipse-che/che-devworkspace-generator \
--devfile-url:"${devfile_url}" \
--editor-entry:che-incubator/che-code/latest \
--plugin-registry-url:"${PLUGIN_REGISTRY_URL}" \
--output-file:"${dir}"/devworkspace-che-code-latest.yaml \
--project."${project}"

npm_config_yes=true npx @eclipse-che/che-devworkspace-generator@${CHE_DEVWORKSPACE_GENERATOR_VERSION} \
npm_config_yes=true npx @eclipse-che/che-devworkspace-generator \
--devfile-url:"${devfile_url}" \
--editor-entry:che-incubator/che-idea/next \
--plugin-registry-url:"${PLUGIN_REGISTRY_URL}" \
Expand Down
21 changes: 9 additions & 12 deletions make-release.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
# Release process automation script.
# Release process automation script.
# Used to create branch/tag, update VERSION files
# and and trigger release by force pushing changes to the release branch
# and and trigger release by force pushing changes to the release branch

# set to 1 to actually trigger changes in the release branch
TRIGGER_RELEASE=0
TRIGGER_RELEASE=0
NOCOMMIT=0
TMP=""
REPO=git@github.com:eclipse-che/che-devfile-registry
Expand Down Expand Up @@ -37,7 +37,7 @@ verifyContainerExistsWithTimeout()
count=1
(( timeout_intervals=this_timeout*3 ))
while [[ $count -le $timeout_intervals ]]; do # echo $count
echo "[INFO] [$count/$timeout_intervals] Verify ${container_to_check} exists..."
echo "[INFO] [$count/$timeout_intervals] Verify ${container_to_check} exists..."
# check if the container exists
verifyContainerExists "${container_to_check}"

Expand Down Expand Up @@ -65,7 +65,7 @@ verifyContainerExistsWithTimeout()
# Checks the container existence
#
# Returns
# 1: found; 0: not found; -1: unknown manifest
# 1: found; 0: not found; -1: unknown manifest
#
verifyContainerExists()
{
Expand Down Expand Up @@ -124,7 +124,7 @@ checkRequiredImagesExist()
done
}

performRelease()
performRelease()
{
set -xe

Expand All @@ -134,7 +134,7 @@ performRelease()

# Build and push happy path image, which depends on the above
./happy-path/build_happy_path_image.sh --push --rm

echo "[INFO] Checking images..."
checkRequiredImagesExist

Expand Down Expand Up @@ -170,9 +170,6 @@ updateVersion () {
thisVERSION="$1"
# update main VERSION file of devfile registry
echo "${thisVERSION}" > VERSION
# update version of devworkspace-generator in package.json
jq ".\"version\" = \"${thisVERSION}\"" tools/devworkspace-generator/package.json > tools/devworkspace-generator/package.json.update
mv tools/devworkspace-generator/package.json.update tools/devworkspace-generator/package.json
}

if [[ ! ${VERSION} ]]; then
Expand All @@ -186,7 +183,7 @@ BRANCH=${VERSION%.*}.x
# if doing a .0 release, use main; if doing a .z release, use $BRANCH
if [[ ${VERSION} == *".0" ]]; then
BASEBRANCH="main"
else
else
BASEBRANCH="${BRANCH}"
fi

Expand Down Expand Up @@ -218,7 +215,7 @@ commitChangeOrCreatePR()

if [[ ${PR_BRANCH} == *"add"* ]]; then
COMMIT_MSG="chore: release: add ${aVERSION} plugins in ${aBRANCH}"
else
else
COMMIT_MSG="chore: release: bump to ${aVERSION} in ${aBRANCH}"
fi

Expand Down
7 changes: 0 additions & 7 deletions tools/devworkspace-generator/.deps/EXCLUDED/dev.md

This file was deleted.

5 changes: 0 additions & 5 deletions tools/devworkspace-generator/.deps/EXCLUDED/prod.md

This file was deleted.

Loading

0 comments on commit de18373

Please sign in to comment.