Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitlo2019-02-20 05:29:29 +0000
committerkitlo2019-02-20 06:38:58 +0000
commit674a8ecaab5f5f8a2d9b11dca526bab5fa455675 (patch)
treeeefd9e6ce1078fde7cec45f40bb3edd02003f163 /cje-production
parent102dbdc88ce856a4ec854d640e64f8fb75e73e64 (diff)
downloadeclipse.platform.releng.aggregator-674a8ecaab5f5f8a2d9b11dca526bab5fa455675.tar.gz
eclipse.platform.releng.aggregator-674a8ecaab5f5f8a2d9b11dca526bab5fa455675.tar.xz
eclipse.platform.releng.aggregator-674a8ecaab5f5f8a2d9b11dca526bab5fa455675.zip
Bug 544603 - Create new scripts for Maven operations
Change-Id: I7fb6cd8e3631aacfa5d8e435ac8906e4119578ea Signed-off-by: kitlo <kitlo@us.ibm.com>
Diffstat (limited to 'cje-production')
-rw-r--r--cje-production/buildproperties.txt12
-rwxr-xr-xcje-production/master-build.sh15
-rwxr-xr-xcje-production/mbscripts/mb010_createEnvfiles.sh17
-rwxr-xr-xcje-production/mbscripts/mb100_cloneRepos.sh9
-rwxr-xr-xcje-production/mbscripts/mb200_createSourceBundles.sh26
-rwxr-xr-xcje-production/mbscripts/mb210_updatePom.sh50
-rwxr-xr-xcje-production/mbscripts/mb220_buildSdkPatch.sh36
-rwxr-xr-x[-rw-r--r--]cje-production/scripts/common-functions.shsource (renamed from cje-production/common/common-functions.shsource)5
8 files changed, 142 insertions, 28 deletions
diff --git a/cje-production/buildproperties.txt b/cje-production/buildproperties.txt
index 834fbd5fa..59f5a432c 100644
--- a/cje-production/buildproperties.txt
+++ b/cje-production/buildproperties.txt
@@ -1,5 +1,5 @@
#*******************************************************************************
-# Copyright (c) 2018 IBM Corporation and others.
+# Copyright (c) 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -15,14 +15,16 @@
# This file contains environmental properties as key value pairs. Lines starting
# with # are considered comments and no spaces allowed in keys
-BUILD_ROOT="siteDir"
BRANCH="master"
PATCH_OR_BRANCH_LABEL="master"
-STREAM="4.11.0"
-GIT_ACCESS="ssh://genie.releng@git.eclipse.org:29418"
+BUILD_TYPE="I"
GIT_ROOT="git://git.eclipse.org/gitroot"
AGG_REPO="/platform/eclipse.platform.releng.aggregator.git"
AGG_DIR="gitCache/eclipse.platform.releng.aggregator"
+#
+BUILD_ROOT="siteDir"
+STREAM="4.11.0"
+GIT_ACCESS="ssh://genie.releng@git.eclipse.org:29418"
aggDir="gitCache/eclipse.platform.releng.aggregator"
REPO_AND_ACCESS="ssh://genie.releng@git.eclipse.org:29418"
AGGREGATOR_REPO="ssh://genie.releng@git.eclipse.org:29418/platform/eclipse.platform.releng.aggregator.git"
@@ -41,4 +43,4 @@ SCRIPT_PATH="."
JAVA_DOC_TOOL="-Declipse.javadoc=/shared/common/jdk1.8.0_x64-latest/bin/javadoc"
MAVEN_SETTINGS="--settings /shared/eclipse/settings/settingsBuildMachine.xml"
API_PREV_REF_LABEL="4.9"
-API_FREEZE_REF_LABEL="4.10RC1"
+API_FREEZE_REF_LABEL="4.10RC1" \ No newline at end of file
diff --git a/cje-production/master-build.sh b/cje-production/master-build.sh
index d0e9140fa..7221d5ce2 100755
--- a/cje-production/master-build.sh
+++ b/cje-production/master-build.sh
@@ -1,6 +1,6 @@
#!/bin/bash -x
#*******************************************************************************
-# Copyright (c) 2018 IBM Corporation and others.
+# Copyright (c) 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -13,16 +13,11 @@
# Sravan Kumar Lakkimsetti - initial API and implementation
#*******************************************************************************
-source common/common-functions.shsource
-
-buildDirectory=$(pwd)/siteDir
-BUILD_ENV_FILE=${buildDirectory}/buildproperties.shsource
-BUILD_ENV_FILE_PHP=${buildDirectory}/buildproperties.php
-BUILD_ENV_FILE_PROP=${buildDirectory}/buildproperties.properties
+source $WORKSPACE/cje-production/scripts/common-functions.shsource
pushd mbscripts
-for i in $(ls |sort)
+for i in $(ls | sort)
do
- fn-run-command ./$i $BUILD_ENV_FILE
+ fn-run-command ./$i $WORKSPACE/cje-production/buildproperties.shsource
done
-popd
+popd \ No newline at end of file
diff --git a/cje-production/mbscripts/mb010_createEnvfiles.sh b/cje-production/mbscripts/mb010_createEnvfiles.sh
index 7a907292e..b025c66b0 100755
--- a/cje-production/mbscripts/mb010_createEnvfiles.sh
+++ b/cje-production/mbscripts/mb010_createEnvfiles.sh
@@ -1,7 +1,7 @@
#!/bin/bash -x
#*******************************************************************************
-# Copyright (c) 2018 IBM Corporation and others.
+# Copyright (c) 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ if [ $# -ne 1 ]; then
exit 1
fi
-source "../common/common-functions.shsource"
+source $WORKSPACE/cje-production/scripts/common-functions.shsource
shEnvFile=$(basename $1)
buildDir=$(dirname $1)
@@ -27,9 +27,9 @@ baseEnvFile=$(echo $shEnvFile |cut -d. -f1)
phpEnvFile=$(echo $baseEnvFile.php)
propEnvFile=$(echo $baseEnvFile.properties)
-BUILD_ENV_FILE=${buildDir}/${shEnvFile}
-BUILD_ENV_FILE_PHP=${buildDir}/${phpEnvFile}
-BUILD_ENV_FILE_PROP=${buildDir}/${propEnvFile}
+BUILD_ENV_FILE=$WORKSPACE/cje-production/${shEnvFile}
+BUILD_ENV_FILE_PHP=$WORKSPACE/cje-production/${phpEnvFile}
+BUILD_ENV_FILE_PROP=$WORKSPACE/cje-production/${propEnvFile}
fn-addToPropFiles ()
{
@@ -37,6 +37,10 @@ fn-addToPropFiles ()
echo "\$$1 = $2;" >> $BUILD_ENV_FILE_PHP
echo "$1 = $2" >> $BUILD_ENV_FILE_PROP
}
+
+echo "#!/bin/bash" >> $BUILD_ENV_FILE
+fn-addToPropFiles TIMESTAMP "\"$(date +%Y%m%d-%H%M --date='@'$(date +%s))\""
+
while read propLine
do
if [[ ${propLine:0:1} == "#" ]]
@@ -52,3 +56,6 @@ do
fn-addToPropFiles $key "$value"
fi
done < ../buildproperties.txt
+
+source $BUILD_ENV_FILE
+fn-addToPropFiles BUILD_ID "\"$BUILD_TYPE$TIMESTAMP\"" \ No newline at end of file
diff --git a/cje-production/mbscripts/mb100_cloneRepos.sh b/cje-production/mbscripts/mb100_cloneRepos.sh
index 86ffec142..59a50212e 100755
--- a/cje-production/mbscripts/mb100_cloneRepos.sh
+++ b/cje-production/mbscripts/mb100_cloneRepos.sh
@@ -1,7 +1,7 @@
#!/bin/bash -x
#*******************************************************************************
-# Copyright (c) 2018 IBM Corporation and others.
+# Copyright (c) 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -19,10 +19,9 @@ if [ $# -ne 1 ]; then
exit 1
fi
-source "../common/common-functions.shsource"
-source "../siteDir/buildproperties.shsource"
+source $WORKSPACE/cje-production/scripts/common-functions.shsource
+source $1
-rm -rf ../$AGG_DIR
git clone -b $BRANCH --recursive $GIT_ROOT$AGG_REPO ../$AGG_DIR
cd ../$AGG_DIR
-git submodule foreach 'git fetch; SUBMODULE_BRANCH=$(grep $name: ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt | cut -f2 -d\ ); SUBMODULE_BRANCH=${SUBMODULE_BRANCH:-$BRANCH}; echo Checking out origin/$SUBMODULE_BRANCH; git checkout origin/$SUBMODULE_BRANCH'
+git submodule foreach 'git fetch; SUBMODULE_BRANCH=$(grep $name: ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt | cut -f2 -d\ ); SUBMODULE_BRANCH=${SUBMODULE_BRANCH:-$BRANCH}; echo Checking out origin/$SUBMODULE_BRANCH; git checkout origin/$SUBMODULE_BRANCH' \ No newline at end of file
diff --git a/cje-production/mbscripts/mb200_createSourceBundles.sh b/cje-production/mbscripts/mb200_createSourceBundles.sh
new file mode 100755
index 000000000..e59b3531c
--- /dev/null
+++ b/cje-production/mbscripts/mb200_createSourceBundles.sh
@@ -0,0 +1,26 @@
+#!/bin/bash -x
+
+#*******************************************************************************
+# Copyright (c) 2019 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:
+# Kit Lo - initial API and implementation
+#*******************************************************************************
+
+if [ $# -ne 1 ]; then
+ echo USAGE: $0 env_file
+ exit 1
+fi
+
+source $WORKSPACE/cje-production/scripts/common-functions.shsource
+source $1
+
+cd $WORKSPACE/cje-production/gitCache/eclipse.platform.releng.aggregator
+mvn clean verify -f eclipse-platform-sources/pom.xml -DbuildId=$BUILD_ID \ No newline at end of file
diff --git a/cje-production/mbscripts/mb210_updatePom.sh b/cje-production/mbscripts/mb210_updatePom.sh
new file mode 100755
index 000000000..9176f627c
--- /dev/null
+++ b/cje-production/mbscripts/mb210_updatePom.sh
@@ -0,0 +1,50 @@
+#!/bin/bash -x
+
+#*******************************************************************************
+# Copyright (c) 2019 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:
+# Kit Lo - initial API and implementation
+#*******************************************************************************
+
+if [ $# -ne 1 ]; then
+ echo USAGE: $0 env_file
+ exit 1
+fi
+
+source $WORKSPACE/cje-production/scripts/common-functions.shsource
+source $1
+
+mkdir $WORKSPACE/cje-production/tmp
+
+cd $WORKSPACE/cje-production/gitCache/eclipse.platform.releng.aggregator
+mvn --update-snapshots org.eclipse.tycho:tycho-versions-plugin:1.3.0:update-pom \
+ -Dmaven.repo.local=$LOCAL_REPO \
+ -Djava.io.tmpdir=$WORKSPACE/cje-production/tmp \
+ -DaggregatorBuild=true \
+ -DbuildTimestamp=$TIMESTAMP \
+ -DbuildType=$BUILD_TYPE \
+ -DbuildId=$BUILD_ID \
+ -Declipse-p2-repo.url=NOT_FOR_PRODUCTION_USE
+
+RC=$?
+if [[ $RC != 0 ]]
+then
+ echo "ERROR: tycho-versions-plugin:update-pom returned non-zero return code: $RC" >&2
+else
+ changes=$( git status --short -uno | cut -c4- )
+ if [ -z "$changes" ]; then
+ echo "INFO: No changes in pom versions" >&2
+ RC=0
+ else
+ echo "INFO: Changes in pom versions: $changes" >&2
+ RC=0
+ fi
+fi \ No newline at end of file
diff --git a/cje-production/mbscripts/mb220_buildSdkPatch.sh b/cje-production/mbscripts/mb220_buildSdkPatch.sh
new file mode 100755
index 000000000..8f93550f2
--- /dev/null
+++ b/cje-production/mbscripts/mb220_buildSdkPatch.sh
@@ -0,0 +1,36 @@
+#!/bin/bash -x
+
+#*******************************************************************************
+# Copyright (c) 2019 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:
+# Kit Lo - initial API and implementation
+#*******************************************************************************
+
+if [ $# -ne 1 ]; then
+ echo USAGE: $0 env_file
+ exit 1
+fi
+
+source $WORKSPACE/cje-production/scripts/common-functions.shsource
+source $1
+
+cd $WORKSPACE/cje-production/gitCache/eclipse.platform.releng.aggregator
+mvn clean verify -DskipTests=true -Pbree-libs \
+ -Dtycho.debug.artifactcomparator \
+ -Dcbi.jarsigner.continueOnFail=true \
+ -Djgit.dirtyWorkingTree=error \
+ -Dmaven.repo.local=$LOCAL_REPO \
+ -Djava.io.tmpdir=$WORKSPACE/cje-production/tmp \
+ -DaggregatorBuild=true \
+ -DbuildTimestamp=$TIMESTAMP \
+ -DbuildType=$BUILD_TYPE \
+ -DbuildId=$BUILD_ID \
+ -Declipse-p2-repo.url=NOT_FOR_PRODUCTION_USE \ No newline at end of file
diff --git a/cje-production/common/common-functions.shsource b/cje-production/scripts/common-functions.shsource
index a15f62ffa..7207e4b87 100644..100755
--- a/cje-production/common/common-functions.shsource
+++ b/cje-production/scripts/common-functions.shsource
@@ -1,6 +1,6 @@
#!/bin/bash
#*******************************************************************************
-# Copyright (c) 2016 IBM Corporation and others.
+# Copyright (c) 2019 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -45,7 +45,6 @@ fn-write-property ()
}
-
# this function executes command passed as command line parameter and
# if that command fails it exit with the same error code as the failed command
fn-run-command ()
@@ -57,4 +56,4 @@ fn-run-command ()
echo "Execution of \"$*\" failed with return code : $returnCode"
exit $returnCode
fi
-}
+} \ No newline at end of file

Back to the top