Skip to content

Commit

Permalink
[Build] Unify declaration of build-properties for I-, Y- and P-builds
Browse files Browse the repository at this point in the history
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
eclipse-platform#2625
  • Loading branch information
HannesWell committed Dec 27, 2024
1 parent 41421e5 commit 3b1d035
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 134 deletions.
4 changes: 4 additions & 0 deletions JenkinsJobs/Builds/I_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion JenkinsJobs/YBuilds/P_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion JenkinsJobs/YBuilds/Y_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
11 changes: 3 additions & 8 deletions RELENG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
59 changes: 0 additions & 59 deletions cje-production/P-build/buildproperties.txt

This file was deleted.

58 changes: 0 additions & 58 deletions cje-production/Y-build/buildproperties.txt

This file was deleted.

7 changes: 2 additions & 5 deletions cje-production/buildproperties.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,17 +10,14 @@
#
# 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
# with # are considered comments and no spaces allowed in keys

# 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"
Expand Down
6 changes: 5 additions & 1 deletion cje-production/mbscripts/mb010_createEnvfiles.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 3b1d035

Please sign in to comment.