From a9f14779d474a03ca9bf232ae8919e0ed10c8ed8 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Mon, 23 Dec 2024 17:56:08 +0100 Subject: [PATCH] [Build] Unify declaration of build-properties for I-, Y- and P-builds Instead of duplicating the 'buildproperties.txt' template for each build type, keep only variables with common values in the general 'buildproperties.txt' and define differing variables in the Jenkins pipeline and add it dynamically to the generated/derived 'buildproperties.shsource/properties'. Remove unused 'TESTED_BUILD_TYPE' variable. Update 'API_PREV_REF_LABEL' for Y- and P-build to be in sync with the value defined for I-builds. Part of https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/2625 --- JenkinsJobs/Builds/I_build.groovy | 4 ++ JenkinsJobs/YBuilds/P_build.groovy | 6 +- JenkinsJobs/YBuilds/Y_build.groovy | 5 +- RELENG.md | 11 +--- cje-production/P-build/buildproperties.txt | 59 ------------------- cje-production/Y-build/buildproperties.txt | 58 ------------------ cje-production/buildproperties.txt | 7 +-- .../mbscripts/mb010_createEnvfiles.sh | 6 +- .../buildproperties.phpHoldForLocalTests | 1 - 9 files changed, 23 insertions(+), 134 deletions(-) delete mode 100644 cje-production/P-build/buildproperties.txt delete mode 100644 cje-production/Y-build/buildproperties.txt diff --git a/JenkinsJobs/Builds/I_build.groovy b/JenkinsJobs/Builds/I_build.groovy index 83b268a8db6..2fc2d15fa16 100644 --- a/JenkinsJobs/Builds/I_build.groovy +++ b/JenkinsJobs/Builds/I_build.groovy @@ -85,6 +85,10 @@ spec: maven 'apache-maven-latest' } environment { + BUILD_TYPE = 'I' + BUILD_TYPE_NAME = 'Integration' + PATCH_OR_BRANCH_LABEL = 'master' + MAVEN_OPTS = "-Xmx6G" CJE_ROOT = "${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production" logDir = "$CJE_ROOT/buildlogs" diff --git a/JenkinsJobs/YBuilds/P_build.groovy b/JenkinsJobs/YBuilds/P_build.groovy index ae46fec02b7..65850754b02 100644 --- a/JenkinsJobs/YBuilds/P_build.groovy +++ b/JenkinsJobs/YBuilds/P_build.groovy @@ -53,6 +53,11 @@ spec: jdk 'openjdk-jdk17-latest' } environment { + BUILD_TYPE = 'P' + BUILD_TYPE_NAME = 'Beta Java 24' + PATCH_OR_BRANCH_LABEL = 'java24patch' + PATCH_BUILD="${PATCH_OR_BRANCH_LABEL}" + MAVEN_OPTS = "-Xmx6G" CJE_ROOT = "${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production" PATH = "$PATH:/opt/tools/apache-maven/latest/bin" @@ -90,7 +95,6 @@ spec: container('jnlp') { sh \'\'\' cd ${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production/mbscripts - cp ../P-build/buildproperties.txt ../buildproperties.txt ./mb010_createEnvfiles.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb010_createEnvfiles.sh.log if [[ ${PIPESTATUS[0]} -ne 0 ]] then diff --git a/JenkinsJobs/YBuilds/Y_build.groovy b/JenkinsJobs/YBuilds/Y_build.groovy index ed7d6bf272c..cd3121fcf67 100644 --- a/JenkinsJobs/YBuilds/Y_build.groovy +++ b/JenkinsJobs/YBuilds/Y_build.groovy @@ -81,6 +81,10 @@ spec: maven 'apache-maven-latest' } environment { + BUILD_TYPE = 'Y' + BUILD_TYPE_NAME = 'Beta Java 24' + PATCH_OR_BRANCH_LABEL = 'java24' + MAVEN_OPTS = "-Xmx6G" CJE_ROOT = "${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production" logDir = "$CJE_ROOT/buildlogs" @@ -115,7 +119,6 @@ spec: steps { sh \'\'\' cd ${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production/mbscripts - cp ../Y-build/buildproperties.txt ../buildproperties.txt ./mb010_createEnvfiles.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb010_createEnvfiles.sh.log if [[ ${PIPESTATUS[0]} -ne 0 ]] then diff --git a/RELENG.md b/RELENG.md index cf00a286975..061bd65ce57 100644 --- a/RELENG.md +++ b/RELENG.md @@ -64,14 +64,9 @@ When the JDT team is ready they will raise an issue to create new Y and P builds the 4.27 M1 jdt version is 3.19.0.v20230104-1800. - The plugins for `org.eclipse.jdt.java20patch/feature.xml` will need to be supplied by the JDT team. You can email them or comment on the issue, but only they know what plugins were modified and need to be listed here. - The modules listed in the top level pom file (`java##pathc/pom.xml) should match the modified plugins. - * Update the Y-build (buildproperties.txt)[cje-production/Y-build/buildproperties.txt]. - - Update the STREAM variables to the current stream - - Update basebuilder to the previous release - - Update java version - * Update the P-build (buildproperties.txt)[cje-production/P-build/buildproperties.txt] and (mb300_gatherEclipseParts.sh)[cje-production/P-build/mb300_gatherEclipseParts.sh]. - - Update the STREAM variables to the current stream - - Update basebuilder to the previous release - - Set PATCH_BUILD and PATCH_OR_BRANCH_LABEL to the name of the new maven profile created in step 1 + * Update the Y-build (Y_build.groovy)[JenkinsJobs/YBuilds/Y_build.groovy] and (P_build.groovy)[JenkinsJobs/YBuilds/P_build.groovy]. + - Update `PATCH_OR_BRANCH_LABEL` and `BUILD_TYPE_NAME` to the name of the new java version + * Update the P-build (mb300_gatherEclipseParts.sh)[cje-production/P-build/mb300_gatherEclipseParts.sh]. - PATCH_BUILD_GENERIC in mb300_gatherEclipseParts.sh should be set to the name of the new maven profile - The same variable in the normal (mb300_gatherEclipseParts)[cje-production/mbscripts/mb300_gatherEclipseParts.sh] should be updated as well. * Update and rename the java repository files in (cje-production/streams)[cje-production/streams] diff --git a/cje-production/P-build/buildproperties.txt b/cje-production/P-build/buildproperties.txt deleted file mode 100644 index 3a3d3951f0b..00000000000 --- a/cje-production/P-build/buildproperties.txt +++ /dev/null @@ -1,59 +0,0 @@ -#******************************************************************************* -# Copyright (c) 2023 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Lakkimsetti - initial API and implementation -#******************************************************************************* - -# This file contains environmental properties as key value pairs. Lines starting -# with # are considered comments and no spaces allowed in keys - -# CJE build variables -BRANCH="master" -PATCH_OR_BRANCH_LABEL="java24patch" -PATCH_BUILD="java24patch" -BUILD_TYPE_NAME="Beta Java 24" -BUILD_TYPE="P" -TESTED_BUILD_TYPE="P" -RELEASE_VER="4.35" -STREAM="4.35.0" -STREAMMajor="4" -STREAMMinor="35" -STREAMService="0" -GIT_ROOT="git@github.com:" -AGG_REPO="eclipse-platform/eclipse.platform.releng.aggregator.git" -AGG_DIR="gitCache/eclipse.platform.releng.aggregator" -DROP_DIR="siteDir/eclipse/downloads/drops4" -UPDATES_DIR="siteDir/eclipse/updates" -EQUINOX_DROP_DIR="siteDir/equinox/drops" -TMP_DIR="tmp" -DOWNLOAD_HOST="download.eclipse.org" -BUILD_TO_COMPARE_SITE="ftp.osuosl.org/pub/eclipse/eclipse/updates" -LOCAL_REPO="localMavenRepo" - -# Base builder parameters -BASEBUILDER_TAG="4.34" -API_PREV_REF_LABEL="4.31" - -PREVIOUS_RELEASE_VER="4.34" -PREVIOUS_RELEASE_REPO_ID="4.34" -#build id for getting repo -BASEBUILD_ID="R-4.34-202411201800" -#release id for downloading eclipse -PREVIOUS_RELEASE_ID="R-4.34-202411201800" - -BUILDTOOLS_REPO="https://download.eclipse.org/eclipse/updates/buildtools/" -WEBTOOLS_REPO="https://download.eclipse.org/webtools/downloads/drops/R3.36.0/R-3.36.0-20241110095156/repositoryunittests/" -BASEBUILDER_DIR="tmp/org.eclipse.releng.basebuilder" -ECLIPSE_RUN_REPO="https://download.eclipse.org/eclipse/updates/4.35-I-builds/" - -#Maven parameters -MAVEN_OPTS="-Xmx6G" -JAVA_DOC_TOOL="-Declipse.javadoc=/opt/tools/java/openjdk/jdk-17/latest/bin/javadoc" diff --git a/cje-production/Y-build/buildproperties.txt b/cje-production/Y-build/buildproperties.txt deleted file mode 100644 index f7bc47ba1e4..00000000000 --- a/cje-production/Y-build/buildproperties.txt +++ /dev/null @@ -1,58 +0,0 @@ -#******************************************************************************* -# Copyright (c) 2022 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Lakkimsetti - initial API and implementation -#******************************************************************************* - -# This file contains environmental properties as key value pairs. Lines starting -# with # are considered comments and no spaces allowed in keys - -# CJE build variables -BRANCH="master" -PATCH_OR_BRANCH_LABEL="java24" -BUILD_TYPE_NAME="Beta Java 24" -BUILD_TYPE="Y" -TESTED_BUILD_TYPE="Y" -RELEASE_VER="4.35" -STREAM="4.35.0" -STREAMMajor="4" -STREAMMinor="35" -STREAMService="0" -GIT_ROOT="git@github.com:" -AGG_REPO="eclipse-platform/eclipse.platform.releng.aggregator.git" -AGG_DIR="gitCache/eclipse.platform.releng.aggregator" -DROP_DIR="siteDir/eclipse/downloads/drops4" -UPDATES_DIR="siteDir/eclipse/updates" -EQUINOX_DROP_DIR="siteDir/equinox/drops" -TMP_DIR="tmp" -DOWNLOAD_HOST="download.eclipse.org" -BUILD_TO_COMPARE_SITE="ftp.osuosl.org/pub/eclipse/eclipse/updates" -LOCAL_REPO="localMavenRepo" - -# Base builder parameters -BASEBUILDER_TAG="4.34" -API_PREV_REF_LABEL="4.32" - -PREVIOUS_RELEASE_VER="4.34" -PREVIOUS_RELEASE_REPO_ID="4.34" -#build id for getting repo -BASEBUILD_ID="R-4.34-202411201800" -#release id for downloading eclipse -PREVIOUS_RELEASE_ID="R-4.34-202411201800" - -BUILDTOOLS_REPO="https://download.eclipse.org/eclipse/updates/buildtools/" -WEBTOOLS_REPO="https://download.eclipse.org/webtools/downloads/drops/R3.36.0/R-3.36.0-20241110095156/repositoryunittests/" -BASEBUILDER_DIR="tmp/org.eclipse.releng.basebuilder" -ECLIPSE_RUN_REPO="https://download.eclipse.org/eclipse/updates/4.35-I-builds/" - -#Maven parameters -MAVEN_OPTS="-Xmx6G" -JAVA_DOC_TOOL="-Declipse.javadoc=/opt/tools/java/openjdk/jdk-17/latest/bin/javadoc" diff --git a/cje-production/buildproperties.txt b/cje-production/buildproperties.txt index 1e9df2bbc12..f5cd6ce42ac 100644 --- a/cje-production/buildproperties.txt +++ b/cje-production/buildproperties.txt @@ -1,5 +1,5 @@ #******************************************************************************* -# Copyright (c) 2022 IBM Corporation and others. +# Copyright (c) 2018, 2024 IBM Corporation and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -10,6 +10,7 @@ # # Contributors: # Sravan Lakkimsetti - initial API and implementation +# Hannes Wellmann - Unify declaration of build-properties for I-, Y- and P-builds #******************************************************************************* # This file contains environmental properties as key value pairs. Lines starting @@ -17,10 +18,6 @@ # CJE build variables BRANCH="master" -PATCH_OR_BRANCH_LABEL="master" -BUILD_TYPE_NAME="Integration" -BUILD_TYPE="I" -TESTED_BUILD_TYPE="I" RELEASE_VER="4.35" STREAM="4.35.0" STREAMMajor="4" diff --git a/cje-production/mbscripts/mb010_createEnvfiles.sh b/cje-production/mbscripts/mb010_createEnvfiles.sh index 596f7fed5f5..20a69cb7454 100755 --- a/cje-production/mbscripts/mb010_createEnvfiles.sh +++ b/cje-production/mbscripts/mb010_createEnvfiles.sh @@ -1,7 +1,7 @@ #!/bin/bash #******************************************************************************* -# Copyright (c) 2019 IBM Corporation and others. +# Copyright (c) 2019, 2024 IBM Corporation and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -12,6 +12,7 @@ # # Contributors: # Sravan Lakkimsetti - initial API and implementation +# Hannes Wellmann - Unify declaration of build-properties for I-, Y- and P-builds #******************************************************************************* set -e @@ -71,6 +72,9 @@ fn-addToPropFiles BUILD_ENV_FILE "\"$BUILD_ENV_FILE\"" fn-addToPropFiles BUILD_ENV_FILE_PHP "\"$BUILD_ENV_FILE_PHP\"" fn-addToPropFiles BUILD_ENV_FILE_PROP "\"$BUILD_ENV_FILE_PROP\"" # variables in buildproperties.txt are now defined, add other commonly used variables to prop files +fn-addToPropFiles BUILD_TYPE "\"${BUILD_TYPE}\"" +fn-addToPropFiles BUILD_TYPE_NAME "\"${BUILD_TYPE_NAME}\"" +fn-addToPropFiles PATCH_OR_BRANCH_LABEL "\"${PATCH_OR_BRANCH_LABEL}\"" fn-addToPropFiles BUILD_ID "\"$BUILD_TYPE$TIMESTAMP\"" fn-addToPropFiles BUILD_DIR_SEG "\"$BUILD_TYPE$TIMESTAMP\"" fn-addToPropFiles EQ_BUILD_DIR_SEG "\"$BUILD_TYPE$TIMESTAMP\"" diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/templateFiles/buildproperties.phpHoldForLocalTests b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/templateFiles/buildproperties.phpHoldForLocalTests index 7452895a7fd..c1d78296b93 100644 --- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/templateFiles/buildproperties.phpHoldForLocalTests +++ b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/templateFiles/buildproperties.phpHoldForLocalTests @@ -37,7 +37,6 @@ $CBI_JDT_REPO_URL = ""; $CBI_JDT_REPO_URL_ARG = ""; $CBI_JDT_VERSION = ""; $CBI_JDT_VERSION_ARG = ""; -$PATCH_BUILD = ""; $ALT_POM_FILE = ""; $JAVA_DOC_TOOL = "-Declipse.javadoc=/shared/common/jdk1.8.0_x64-latest/bin/javadoc"; $BUILD_ENV_FILE = "/shared/eclipse/builds/4N/siteDir/eclipse/downloads/drops4/N20140707-2000/buildproperties.shsource";