-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove Che Parent from release scripts
Signed-off-by: Mykhailo Kuznietsov <[email protected]>
- Loading branch information
1 parent
c514f56
commit 68f5f59
Showing
3 changed files
with
2 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
# Automated release workflow | ||
Release is performed with GitHub Actions workflow [release.yml](https://github.com/eclipse/che/actions/workflows/release.yml). | ||
It is also used to release [Che Parent](https://github.com/eclipse/che-parent), if appropriate input parameter `releaseParent` is set to true. | ||
The release will perform the build of Maven Artifacts, build and push of all nesessary docker images, and bumping up development version. | ||
|
||
[make-release.sh](https://github.com/eclipse/che/blob/master/make-release.sh) is the script that can be used for standalone release outside of GitHub Actions. However, ensure that all environment variables are set in place before invoking `./make-release.sh`, similarly to how it is outlined in [release.yml](https://github.com/eclipse/che/actions/workflows/release.yml): | ||
|
||
RELEASE_CHE_PARENT - if `true`, will perform the release of Che Parent as well. | ||
VERSION_CHE_PARENT - if RELEASE_CHE_PARENT is `true`, here the version of Che Parent must be provided. | ||
REBUILD_FROM_EXISTING_TAGS - if `true`, release will not create new tag, but instead checkout to existing one. Use this to rerun failed attempts, without having to recreate the tag. | ||
BUILD_AND_PUSH_IMAGES - if `true`, will build all asociated images in [dockerfiles](https://github.com/eclipse/che/tree/master/dockerfiles) directory. Set `false`, if this step needs to be skipped. | ||
BUMP_NEXT_VERSION - if `true`, will increase the development versions in main and bugfix branches. Set false, if this step needs to be skipped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,14 +49,9 @@ evaluateCheVariables() { | |
BASEBRANCH="${BRANCH}" | ||
fi | ||
echo "Basebranch: ${BASEBRANCH}" | ||
echo "Release che-parent: ${RELEASE_CHE_PARENT}" | ||
echo "Version che-parent: ${VERSION_CHE_PARENT}" | ||
} | ||
|
||
checkoutProjects() { | ||
if [[ ${RELEASE_CHE_PARENT} = "true" ]]; then | ||
checkoutProject [email protected]:eclipse/che-parent | ||
fi | ||
checkoutProject [email protected]:eclipse-che/che-server | ||
} | ||
|
||
|
@@ -86,11 +81,6 @@ checkoutProject() { | |
} | ||
|
||
checkoutTags() { | ||
if [[ ${RELEASE_CHE_PARENT} = "true" ]]; then | ||
cd che-parent | ||
git checkout ${CHE_VERSION} | ||
cd .. | ||
fi | ||
cd che-server | ||
git checkout ${CHE_VERSION} | ||
cd .. | ||
|
@@ -144,9 +134,6 @@ commitChangeOrCreatePR() { | |
} | ||
|
||
createTags() { | ||
if [[ $RELEASE_CHE_PARENT = "true" ]]; then | ||
tagAndCommit che-parent | ||
fi | ||
tagAndCommit che-server | ||
} | ||
|
||
|
@@ -170,23 +157,9 @@ tagAndCommit() { | |
} | ||
|
||
prepareRelease() { | ||
if [[ $RELEASE_CHE_PARENT = "true" ]]; then | ||
pushd che-parent >/dev/null | ||
# Install previous version, in case it is not available in central repo | ||
# which is needed for dependent projects | ||
mvn clean install | ||
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${VERSION_CHE_PARENT} | ||
mvn clean install | ||
popd >/dev/null | ||
echo "[INFO] Che Parent version has been updated to ${VERSION_CHE_PARENT}" | ||
fi | ||
|
||
pushd che-server >/dev/null | ||
if [[ $RELEASE_CHE_PARENT = "true" ]]; then | ||
mvn versions:update-parent -DgenerateBackupPoms=false -DallowSnapshots=false -DparentVersion=[${VERSION_CHE_PARENT}] | ||
fi | ||
mvn versions:set -DgenerateBackupPoms=false -DallowSnapshots=false -DnewVersion=${CHE_VERSION} | ||
echo "[INFO] Che Server version has been updated to ${CHE_VERSION} (parentVersion = ${VERSION_CHE_PARENT})" | ||
echo "[INFO] Che Server version has been updated to ${CHE_VERSION} " | ||
|
||
# Replace dependencies in che-server parent | ||
sed -i -e "s#<che.version>.*<\/che.version>#<che.version>${CHE_VERSION}<\/che.version>#" pom.xml | ||
|
@@ -195,8 +168,7 @@ prepareRelease() { | |
# TODO pull parent pom version from VERSION file, instead of being hardcoded | ||
pushd typescript-dto >/dev/null | ||
sed -i -e "s#<che.version>.*<\/che.version>#<che.version>${CHE_VERSION}<\/che.version>#" dto-pom.xml | ||
sed -i -e "/<groupId>org.eclipse.che.parent<\/groupId>/ { n; s#<version>.*<\/version>#<version>${VERSION_CHE_PARENT}<\/version>#}" dto-pom.xml | ||
echo "[INFO] Dependencies updated in che typescript DTO (parent = ${VERSION_CHE_PARENT}, che server = ${CHE_VERSION})" | ||
echo "[INFO] Dependencies updated in che typescript DTO (che server = ${CHE_VERSION})" | ||
popd >/dev/null | ||
|
||
# run mvn license format, in case some files that have old license headers have been updated | ||
|
@@ -207,29 +179,6 @@ prepareRelease() { | |
releaseCheServer() { | ||
set -x | ||
tmpmvnlog=/tmp/mvn.log.txt | ||
if [[ $RELEASE_CHE_PARENT = "true" ]]; then | ||
pushd che-parent >/dev/null | ||
rm -f $tmpmvnlog || true | ||
set +e | ||
mvn clean install -ntp -U -Pcodenvy-release -Dgpg.passphrase=$CHE_OSS_SONATYPE_PASSPHRASE | tee $tmpmvnlog | ||
EXIT_CODE=$? | ||
set -e | ||
# try maven build again if we receive a server error | ||
if grep -q -E "502 - Bad Gateway" $tmpmvnlog; then | ||
rm -f $tmpmvnlog || true | ||
mvn clean install -ntp -U -Pcodenvy-release -Dgpg.passphrase=$CHE_OSS_SONATYPE_PASSPHRASE | tee $tmpmvnlog | ||
EXIT_CODE=$? | ||
fi | ||
# check log for errors if build successful; if failed, no need to check (already failed) | ||
if [ $EXIT_CODE -eq 0 ]; then | ||
checkLogForErrors $tmpmvnlog | ||
echo 'Build of che-parent: Success!' | ||
else | ||
echo '[ERROR] 2. Build of che-parent: Failed!' | ||
exit $EXIT_CODE | ||
fi | ||
popd >/dev/null | ||
fi | ||
|
||
pushd che-server >/dev/null | ||
rm -f $tmpmvnlog || true | ||
|
@@ -320,35 +269,15 @@ bumpVersion() { | |
set -x | ||
echo "[info]bumping to version $1 in branch $2" | ||
|
||
if [[ $RELEASE_CHE_PARENT = "true" ]]; then | ||
pushd che-parent >/dev/null | ||
git checkout $2 | ||
#install previous version, in case it is not available in central repo | ||
#which is needed for dependent projects | ||
|
||
mvn clean install | ||
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${CHE_VERSION} | ||
mvn clean install | ||
# run mvn license format, in case some files that have old license headers have been updated | ||
mvn license:format | ||
commitChangeOrCreatePR ${CHE_VERSION} $2 "pr-${2}-to-${1}" | ||
popd >/dev/null | ||
fi | ||
|
||
pushd che-server >/dev/null | ||
git checkout $2 | ||
if [[ $RELEASE_CHE_PARENT = "true" ]]; then | ||
mvn versions:update-parent -DgenerateBackupPoms=false -DallowSnapshots=true -DparentVersion=[${VERSION_CHE_PARENT}] | ||
fi | ||
|
||
# compute current version of root pom | ||
current_root_pom_version=$(grep "<che.version>" pom.xml | sed -r -e "s#.+<che.version>([^<>]+)</che.version>.*#\1#") | ||
|
||
mvn versions:set -DgenerateBackupPoms=false -DallowSnapshots=true -DnewVersion=$1 | ||
sed -i -e "s#<che.version>.*<\/che.version>#<che.version>$1<\/che.version>#" pom.xml | ||
pushd typescript-dto >/dev/null | ||
sed -i -e "s#<che.version>.*<\/che.version>#<che.version>${1}<\/che.version>#" dto-pom.xml | ||
sed -i -e "/<groupId>org.eclipse.che.parent<\/groupId>/ { n; s#<version>.*<\/version>#<version>${VERSION_CHE_PARENT}<\/version>#}" dto-pom.xml | ||
popd >/dev/null | ||
|
||
# update integration tests to new root pom version | ||
|