diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7778d657ae..0033df4bc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,14 +16,6 @@ on: description: 'The version that is going to be released. Should be in format 7.y.z' required: true default: '' - releaseParent: - description: 'If true, will also release Che Parent.' - required: false - default: 'false' - versionParent: - description: 'Specify Che Parent version here' - required: false - default: '7.15.0' forceRecreateTags: description: 'If true, tags will be overriden and regenerated. Use with caution.' required: false @@ -49,13 +41,6 @@ jobs: with: path: che-server fetch-depth: 0 - - uses: actions/checkout@v3 - if: ${{ github.event.inputs.releaseParent == 'true' }} - with: - repository: eclipse/che-parent - token: ${{ secrets.CHE_BOT_GITHUB_TOKEN }} - path: che-parent - fetch-depth: 0 - name: Check existing tag run: | if [[ "$FORCE_RECREATE_TAGS" == "false" ]] && [[ $(cd che && git ls-remote --exit-code origin refs/tags/${{ github.event.inputs.version }}) ]]; then @@ -113,8 +98,6 @@ jobs: export CHE_GITHUB_SSH_KEY=${{ secrets.CHE_GITHUB_SSH_KEY}} export CHE_NPM_AUTH_TOKEN=${{ secrets.CHE_NPM_AUTH_TOKEN}} - export RELEASE_CHE_PARENT="${{ github.event.inputs.releaseParent }}" - export VERSION_CHE_PARENT="${{ github.event.inputs.versionParent }}" export DEPLOY_TO_NEXUS="${{ github.event.inputs.deployOnNexus }}" export AUTORELEASE_ON_NEXUS="${{ github.event.inputs.autoReleaseOnNexus }}" export REBUILD_FROM_EXISTING_TAGS="${{ github.event.inputs.rebuildFromExistingTags }}" diff --git a/RELEASE.md b/RELEASE.md index 9c6e527aa1..899dcb4bd8 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -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 diff --git a/make-release.sh b/make-release.sh index 1010f819d3..2eef842f42 100755 --- a/make-release.sh +++ b/make-release.sh @@ -50,14 +50,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 git@github.com:eclipse/che-parent - fi checkoutProject git@github.com:eclipse-che/che-server } @@ -87,11 +82,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 .. @@ -145,9 +135,6 @@ commitChangeOrCreatePR() { } createTags() { - if [[ $RELEASE_CHE_PARENT = "true" ]]; then - tagAndCommit che-parent - fi tagAndCommit che-server } @@ -171,23 +158,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>#" pom.xml @@ -196,8 +169,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>#" dto-pom.xml - sed -i -e "/org.eclipse.che.parent<\/groupId>/ { n; s#.*<\/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 @@ -208,29 +180,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 @@ -302,27 +251,8 @@ 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 "" pom.xml | sed -r -e "s#.+([^<>]+).*#\1#") @@ -330,7 +260,6 @@ bumpVersion() { sed -i -e "s#.*<\/che.version>#$1<\/che.version>#" pom.xml pushd typescript-dto >/dev/null sed -i -e "s#.*<\/che.version>#${1}<\/che.version>#" dto-pom.xml - sed -i -e "/org.eclipse.che.parent<\/groupId>/ { n; s#.*<\/version>#${VERSION_CHE_PARENT}<\/version>#}" dto-pom.xml popd >/dev/null # update integration tests to new root pom version