Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve a few todos in release procedures #248

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand All @@ -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.
Expand Down Expand Up @@ -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.
4 changes: 3 additions & 1 deletion releng/org.eclipse.epp.config/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
<build>${maven.build.timestamp}</build>
<!-- Name of the release (no milestone) -->
<!-- Name of the release (no milestone) and the prev/next release name (for where links are needed)-->
<RELEASE_NAME>2024-12</RELEASE_NAME>
<PREV_RELEASE_NAME>2024-09</PREV_RELEASE_NAME>
<NEXT_RELEASE_NAME>2025-03</NEXT_RELEASE_NAME>
<!-- Name of the milestone -->
<RELEASE_MILESTONE>R</RELEASE_MILESTONE>
<!-- Version of the release -->
Expand Down
29 changes: 29 additions & 0 deletions releng/org.eclipse.epp.config/tools/finalize-release.Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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()
}
}
}
142 changes: 142 additions & 0 deletions releng/org.eclipse.epp.config/tools/finalize-release.sh
Original file line number Diff line number Diff line change
@@ -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="[email protected]"
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="<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='Eclipse Packaging Project EPP Latest (${RELEASE_NAME})'
type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository'
version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='${TIMESTAMP}'/>
</properties>
<children size='1'>
<child location='../${RELEASE_NAME}'/>
</children>
</repository>
"

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="<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
<repository name='Eclipse Packaging Project EPP Latest (${RELEASE_NAME})'
type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository'
version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='${TIMESTAMP}'/>
</properties>
<children size='1'>
<child location='../${RELEASE_NAME}'/>
</children>
</repository>
"

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="<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='Eclipse Packaging Project EPP ${NEXT_RELEASE_NAME}'
type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository'
version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='${TIMESTAMP}'/>
</properties>
<children size='1'>
<child location='../${RELEASE_NAME}'/>
</children>
</repository>
"

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="<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
<repository name='Eclipse Packaging Project EPP ${NEXT_RELEASE_NAME}'
type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository'
version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='${TIMESTAMP}'/>
</properties>
<children size='1'>
<child location='../${RELEASE_NAME}'/>
</children>
</repository>
"

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}/

18 changes: 16 additions & 2 deletions releng/org.eclipse.epp.config/tools/promote-a-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -86,10 +88,22 @@ cat > release.xml <<EOM
<past>2023-12/R</past>
<past>2024-03/R</past>
<past>2024-06/R</past>
<past>2024-09/R</past>
<present>2024-12/R</present>
EOM
if [ "$RELEASE_MILESTONE" != "R" ]; then
cat >> release.xml <<EOM
<present>${PREV_RELEASE_NAME}/R</present>
<future>${RELEASE_NAME}/${RELEASE_MILESTONE}</future>
</packages>
EOM
else
cat >> release.xml <<EOM
<past>${PREV_RELEASE_NAME}/R</past>
<present>${RELEASE_NAME}/R</present>
</packages>
EOM
fi


$ECHO $SCP release.xml "${SSHUSER}:"${EPP_DOWNLOADS}/downloads/release/release.xml


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions releng/org.eclipse.epp.config/tools/upload-to-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading