diff --git a/RELEASING.md b/RELEASING.md index c61af31f..79b0b1ec 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -25,6 +25,7 @@ This checklist is only used once per release cycle. Scroll down for the per-mile - [ ] Jenkinsfile (SimRel triggering URL) - [ ] `2020-12` -> `2021->03` part - [ ] `4.14` -> `4.15` part + - [ ] Adding the previous past release explicitly to list in release.xml, located in promote-a-build.sh - [ ] Archive old releases (two R releases should stay on download.eclipse.org) to archive.eclipse.org and remove non-R downloads. - This can be done through the web ui at https://download.eclipse.org/technology/epp/ @@ -46,13 +47,12 @@ This checklist is only used once per release cycle. Scroll down for the per-mile - [ ] Update name of the release in strings with a "smart" global find&replace. _Be careful on M3 that the replace did not match the Eclipse project name M2E!_ See this [gerrit](https://git.eclipse.org/r/#/c/158509/) for an example. Use commit message like `[releng] Prepare repo for 2020-12 M1`. In particular, check: - **TODO can this be automated** On M1 add the M1 qualifier (e.g. `2021-03-R` -> `2021-06-M1`, on RC2 set it to `R` the qualifier e.g. `2021-03-RC1` -> `2021-03-R`). **Except** for `eclipse.simultaneous.release.name` which should go from `2021-03 (4.19.0)` -> `2021-06 M1 (4.20.0 M1)` on M1 and `2021-03 RC1 (4.19.0 RC1)` -> `2021-03 (4.19.0)` on RC2 - [ ] `packages/*/epp.website.xml` for `product name=` line - - [ ] `RELEASE_NAME`, `RELEASE_MILESTONE`, `RELEASE_DIR`, `SIMREL_REPO` Variables in parent pom `releng/org.eclipse.epp.config/parent/pom.xml` + - [ ] `RELEASE_NAME`, `PREV_RELEASE_NAME`, `NEXT_RELEASE_NAME`, `RELEASE_MILESTONE`, `RELEASE_DIR`, `SIMREL_REPO`, Variables in parent pom `releng/org.eclipse.epp.config/parent/pom.xml` - `SIMREL_REPO` should be updated to the URL published in the email to cross-project-issues announcing SimRel repo is ready for EPP build - [ ] **TODO can this part below be automated** - See comment in the pom.xml file around `eclipse.simultaneous.release.name` - On R build, for `eclipse.simultaneous.release.name` remove qualifier i.e. it should be `2020-12 (4.18.0)` - On M1 build add the qualifier back in, for `eclipse.simultaneous.release.name` remove qualifier i.e. it should be `2020-12 M1 (4.18.0 M1)` - - [ ] **TODO can this be automated** on release builds release.xml template in `releng/org.eclipse.epp.config/tools/promote-a-build.sh` needs updating - [ ] Update the [Last Recorded +1 in the email template](https://github.com/eclipse-packaging/packages/blob/master/releng/org.eclipse.epp.config/tools/upload-to-staging.sh) which any package and platform +1s that have been received since the last update. - [ ] Wait for announcement that the staging repo is ready on [cross-project-issues-dev](https://accounts.eclipse.org/mailing-list/cross-project-issues-dev). An [example announcement](https://www.eclipse.org/lists/cross-project-issues-dev/msg17420.html). - [ ] Update `SIMREL_REPO` in `releng/org.eclipse.epp.config/parent/pom.xml` if not done above. @@ -111,5 +111,7 @@ This applies to all releases, i.e. M1, M2, M3, RC1 and R. Everything except R is These jobs should be completed by approximately 10am Ottawa time on release days. -- [ ] The current release needs to be promoted as "latest" under https://download.eclipse.org/technology/epp/packages/latest/ . This should be a composite pointing to specific https://download.eclipse.org/technology/epp/packages/yyyy-MM/ . This is achieved by triggering the [epp-promoteReleaseToLatest](https://ci.eclipse.org/packaging/job/epp-promoteReleaseToLatest). -- [ ] The _next_ release sub-directory needs to be created immediately, i.e. when 2019-12 was released, a directory 2020-03 had been created with an empty p2 composite repository pointing to 2019-12 until M1. (Use Job https://ci.eclipse.org/packaging/job/epp-createNextRelease/) On M1 release day this changes to a composite p2 repository with M1 content. On other release days, add the new releases as children and on final release this changes to a composite with just the one child. +- [ ] Run the [Finalize Release](https://ci.eclipse.org/packaging/job/finalize-release/) CI job to create the "next" release and updated the "latest" release as follows: + - The current release needs to be promoted as "latest" under https://download.eclipse.org/technology/epp/packages/latest/ . This should be a composite pointing to specific https://download.eclipse.org/technology/epp/packages/yyyy-MM/ . + - The _next_ release sub-directory needs to be created immediately, i.e. when 2019-12 was released, a directory 2020-03 had been created with an empty p2 composite repository pointing to 2019-12 until M1. On M1 release day this changes to a composite p2 repository with M1 content. + - [ ] _Optional - useful when testing changes to the promotion scripts:_ Run the build once in `DRY_RUN` mode to ensure that the output is correct before it applies changes to download.eclipse.org. diff --git a/releng/org.eclipse.epp.config/parent/pom.xml b/releng/org.eclipse.epp.config/parent/pom.xml index 12f26558..a359a767 100644 --- a/releng/org.eclipse.epp.config/parent/pom.xml +++ b/releng/org.eclipse.epp.config/parent/pom.xml @@ -30,8 +30,10 @@ UTF-8 yyyyMMdd-HHmm ${maven.build.timestamp} - + 2024-12 + 2024-09 + 2025-03 R diff --git a/releng/org.eclipse.epp.config/tools/finalize-release.Jenkinsfile b/releng/org.eclipse.epp.config/tools/finalize-release.Jenkinsfile new file mode 100644 index 00000000..41df4514 --- /dev/null +++ b/releng/org.eclipse.epp.config/tools/finalize-release.Jenkinsfile @@ -0,0 +1,29 @@ +// Based on https://wiki.eclipse.org/Jenkins#Pipeline_job_without_custom_pod_template +pipeline { + agent any + parameters { + booleanParam(defaultValue: true, description: 'Do a dry run of the operation', name: 'DRY_RUN') + } + options { + timestamps() + disableConcurrentBuilds() + } + tools { + maven 'apache-maven-latest' + jdk 'temurin-jdk17-latest' + } + stages { + stage('Finalize Release') { + steps { + sshagent ( ['projects-storage.eclipse.org-bot-ssh']) { + sh './releng/org.eclipse.epp.config/tools/finalize-release.sh' + } + } + } + } + post { + cleanup { + cleanWs() + } + } +} diff --git a/releng/org.eclipse.epp.config/tools/finalize-release.sh b/releng/org.eclipse.epp.config/tools/finalize-release.sh new file mode 100755 index 00000000..416c20c5 --- /dev/null +++ b/releng/org.eclipse.epp.config/tools/finalize-release.sh @@ -0,0 +1,142 @@ +#!/bin/bash + +set -u # run with unset flag error so that missing parameters cause build failure +set -e # error out on any failed commands +set -x # echo all commands used for debugging purposes + +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +# Read a property from the epp.properties file (which needs to be generated) +# Usage: get_property KEY +function get_property +{ + grep "^$1=" "${DIR}/epp.properties" | cut -d'=' -f2 | sed '-es,\\:,:,' +} + +echo Create the epp.properties file +MVN=/opt/tools/apache-maven/latest/bin/mvn +if [ ! -f "$MVN" ]; then + MVN=mvn +fi +${MVN} clean package -f ${DIR} + +RELEASE_NAME=$(get_property RELEASE_NAME) +PREV_RELEASE_NAME=$(get_property PREV_RELEASE_NAME) +NEXT_RELEASE_NAME=$(get_property NEXT_RELEASE_NAME) +RELEASE_MILESTONE=$(get_property RELEASE_MILESTONE) +RELEASE_DIR=$(get_property RELEASE_DIR) +SIMREL_REPO=$(get_property SIMREL_REPO) +EPP_DOWNLOADS=/home/data/httpd/download.eclipse.org/technology/epp +DOWNLOADS=${EPP_DOWNLOADS}/downloads/release/${RELEASE_NAME} +REPO=${EPP_DOWNLOADS}/packages/${RELEASE_NAME}/ + +SSHUSER="genie.packaging@projects-storage.eclipse.org" +SSH="ssh ${SSHUSER}" +SCP="scp" + + +ECHO=echo +if [ "$DRY_RUN" == "false" ]; then + ECHO="" +else + echo Dry run of build: +fi + +if [ "$RELEASE_MILESTONE" != "R" ]; then + $ECHO "This job is only inteded for R builds" + exit 1 +fi + + +echo "----------------------------------------------------------------------------------------------" +echo "Prepare compositeArtifacts.xml/compositeContent.xml for "latest" that points at RELEASE_NAME" +$ECHO ${SSH} mkdir ${EPP_DOWNLOADS}/packages/latest/ + +TIMESTAMP=$(date +%s000) + +CONTENTXML=" + + + + + + + + + +" + +echo "$CONTENTXML" > ./compositeContent.xml +echo "==== Start Content of compositeContent.xml ====" +cat ./compositeContent.xml +echo "==== End Content of compositeContent.xml ====" +$ECHO $SCP compositeContent.xml "${SSHUSER}:"${EPP_DOWNLOADS}/packages/latest/ + +ARTIFACTXML=" + + + + + + + + + +" + +echo "$ARTIFACTXML" > ./compositeArtifacts.xml +echo "==== Start Content of compositeArtifacts.xml ====" +cat ./compositeArtifacts.xml +echo "==== End Content of compositeArtifacts.xml ====" +$ECHO $SCP compositeArtifacts.xml "${SSHUSER}:"${EPP_DOWNLOADS}/packages/latest/ + + +echo "----------------------------------------------------------------------------------------------" +echo "Prepare compositeArtifacts.xml/compositeContent.xml for next release that points at RELEASE_NAME" +$ECHO ${SSH} mkdir ${EPP_DOWNLOADS}/packages/${NEXT_RELEASE_NAME}/ + +TIMESTAMP=$(date +%s000) + +CONTENTXML=" + + + + + + + + + +" + +echo "$CONTENTXML" > ./compositeContent.xml +echo "==== Start Content of compositeArtifacts.xml ====" +cat ./compositeArtifacts.xml +echo "==== End Content of compositeArtifacts.xml ====" +$ECHO $SCP compositeContent.xml "${SSHUSER}:"${EPP_DOWNLOADS}/packages/${NEXT_RELEASE_NAME}/ + +ARTIFACTXML=" + + + + + + + + + +" + +echo "$ARTIFACTXML" > ./compositeArtifacts.xml +echo "==== Start Content of compositeArtifacts.xml ====" +cat ./compositeArtifacts.xml +echo "==== End Content of compositeArtifacts.xml ====" +$ECHO $SCP compositeArtifacts.xml "${SSHUSER}:"${EPP_DOWNLOADS}/packages/${NEXT_RELEASE_NAME}/ + diff --git a/releng/org.eclipse.epp.config/tools/promote-a-build.sh b/releng/org.eclipse.epp.config/tools/promote-a-build.sh index 5d2e37cd..93a6fce7 100755 --- a/releng/org.eclipse.epp.config/tools/promote-a-build.sh +++ b/releng/org.eclipse.epp.config/tools/promote-a-build.sh @@ -20,6 +20,8 @@ fi ${MVN} clean package -f ${DIR} RELEASE_NAME=$(get_property RELEASE_NAME) +PREV_RELEASE_NAME=$(get_property PREV_RELEASE_NAME) +NEXT_RELEASE_NAME=$(get_property NEXT_RELEASE_NAME) RELEASE_MILESTONE=$(get_property RELEASE_MILESTONE) RELEASE_DIR=$(get_property RELEASE_DIR) SIMREL_REPO=$(get_property SIMREL_REPO) @@ -86,10 +88,22 @@ cat > release.xml <2023-12/R 2024-03/R 2024-06/R -2024-09/R -2024-12/R +EOM +if [ "$RELEASE_MILESTONE" != "R" ]; then + cat >> release.xml <${PREV_RELEASE_NAME}/R +${RELEASE_NAME}/${RELEASE_MILESTONE} + +EOM +else + cat >> release.xml <${PREV_RELEASE_NAME}/R +${RELEASE_NAME}/R EOM +fi + + $ECHO $SCP release.xml "${SSHUSER}:"${EPP_DOWNLOADS}/downloads/release/release.xml diff --git a/releng/org.eclipse.epp.config/tools/rename-provisional-to-final.sh b/releng/org.eclipse.epp.config/tools/rename-provisional-to-final.sh index 9a6a90d1..68c71b14 100755 --- a/releng/org.eclipse.epp.config/tools/rename-provisional-to-final.sh +++ b/releng/org.eclipse.epp.config/tools/rename-provisional-to-final.sh @@ -20,6 +20,8 @@ fi ${MVN} clean package -f ${DIR} RELEASE_NAME=$(get_property RELEASE_NAME) +PREV_RELEASE_NAME=$(get_property PREV_RELEASE_NAME) +NEXT_RELEASE_NAME=$(get_property NEXT_RELEASE_NAME) RELEASE_MILESTONE=$(get_property RELEASE_MILESTONE) RELEASE_DIR=$(get_property RELEASE_DIR) SIMREL_REPO=$(get_property SIMREL_REPO) @@ -41,11 +43,12 @@ fi if [ "$RELEASE_MILESTONE" != "R" ]; then $ECHO "This job is only inteded for R builds" -else - $ECHO $SSH mv ${DOWNLOADS}/${RELEASE_DIR} ${DOWNLOADS}/R - TOUCHDIRS="${DOWNLOADS}/R" + exit 1 fi +$ECHO $SSH mv ${DOWNLOADS}/${RELEASE_DIR} ${DOWNLOADS}/R +TOUCHDIRS="${DOWNLOADS}/R" + # ---------------------------------------------------------------------------------------------- # Touch All Files See Bug 568574: Touch all files for the milestone in the download area to make sure mirrors are not misreporting them as mirrored before sending announcements. echo Touching ${TOUCHDIRS} recursively diff --git a/releng/org.eclipse.epp.config/tools/upload-to-staging.sh b/releng/org.eclipse.epp.config/tools/upload-to-staging.sh index 4965cda4..0a29e61b 100755 --- a/releng/org.eclipse.epp.config/tools/upload-to-staging.sh +++ b/releng/org.eclipse.epp.config/tools/upload-to-staging.sh @@ -20,6 +20,8 @@ echo Create the epp.properties file mvn clean package -f ${DIR} RELEASE_NAME=$(get_property RELEASE_NAME) +PREV_RELEASE_NAME=$(get_property PREV_RELEASE_NAME) +NEXT_RELEASE_NAME=$(get_property NEXT_RELEASE_NAME) RELEASE_MILESTONE=$(get_property RELEASE_MILESTONE) RELEASE_DIR=$(get_property RELEASE_DIR) SIMREL_REPO=$(get_property SIMREL_REPO)