Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitlo2019-04-06 18:02:05 -0400
committerSravan Kumar Lakkimsetti2019-04-08 00:36:01 -0400
commit532bbd69c4140159a5b12b047e47c28c94a8f03e (patch)
tree318e35651b06fd8b0b8047480dfd6d4fed3c2e6c
parenta0648d76c9cccb956dd3caf75bbb50a9aa376020 (diff)
downloadeclipse.platform.releng.aggregator-532bbd69c4140159a5b12b047e47c28c94a8f03e.tar.gz
eclipse.platform.releng.aggregator-532bbd69c4140159a5b12b047e47c28c94a8f03e.tar.xz
eclipse.platform.releng.aggregator-532bbd69c4140159a5b12b047e47c28c94a8f03e.zip
Bug 546174 - Create new scripts to tag build inputs
Change-Id: I4410c8d001e0fc2359cdb9e27e697703e28ec139 Signed-off-by: kitlo <kitlo@us.ibm.com>
-rwxr-xr-xcje-production/master-build.sh13
-rwxr-xr-xcje-production/mbscripts/mb110_tagBuildInputs.sh62
-rwxr-xr-xcje-production/mbscripts/mb220_buildSdkPatch.sh2
-rwxr-xr-xcje-production/mbscripts/mb300_gatherParts.sh1
4 files changed, 72 insertions, 6 deletions
diff --git a/cje-production/master-build.sh b/cje-production/master-build.sh
index 0f088d3c..40887aa6 100755
--- a/cje-production/master-build.sh
+++ b/cje-production/master-build.sh
@@ -16,7 +16,7 @@
export CJE_ROOT=${CJE_ROOT:-`pwd`}
source $CJE_ROOT/scripts/common-functions.shsource
-chmod -R +x .
+chmod +x mbscripts/*
logDir=$CJE_ROOT/siteDir/buildlogs
mkdir -p $logDir
@@ -24,13 +24,18 @@ mkdir -p $logDir
pushd mbscripts
for i in $(ls | sort)
do
- fn-run-command ./$i $CJE_ROOT/buildproperties.shsource 2>&1 |tee $logDir/$i.log
+ fn-run-command ./$i $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/$i.log
done
popd
wait
-source $CJE_ROOT/buildproperties.shsource
+source $CJE_ROOT/buildproperties.shsource
cp -r $logDir/* $CJE_ROOT/$DROP_DIR/$BUILD_ID/buildlogs/.
-mv $CJE_ROOT/buildproperties.* $CJE_ROOT/$DROP_DIR/$BUILD_ID
+rm -rf $logDir
+cp $CJE_ROOT/buildproperties.txt $CJE_ROOT/$DROP_DIR/$BUILD_ID
+mv $CJE_ROOT/buildproperties.php $CJE_ROOT/$DROP_DIR/$BUILD_ID
+mv $CJE_ROOT/buildproperties.properties $CJE_ROOT/$DROP_DIR/$BUILD_ID
+mv $CJE_ROOT/buildproperties.shsource $CJE_ROOT/$DROP_DIR/$BUILD_ID
+rm -rf $CJE_ROOT/$TMP_DIR
diff --git a/cje-production/mbscripts/mb110_tagBuildInputs.sh b/cje-production/mbscripts/mb110_tagBuildInputs.sh
new file mode 100755
index 00000000..6ea011d8
--- /dev/null
+++ b/cje-production/mbscripts/mb110_tagBuildInputs.sh
@@ -0,0 +1,62 @@
+#!/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 $CJE_ROOT/scripts/common-functions.shsource
+source $1
+
+reportDate=$(date +%s)
+reportTimestamp=$(date +%Y%m%d-%H%M --date='@'$reportDate)
+gitLogFile=$CJE_ROOT/$DROP_DIR/$BUILD_ID/gitLog.html
+mkdir -p $CJE_ROOT/$DROP_DIR/$BUILD_ID
+
+# set lastTag
+lastTag=$(git describe --tags --match "${BUILD_TYPE}*" --abbrev=0)
+
+pushd $CJE_ROOT/$AGG_DIR
+
+# git tagging
+# disable git push for now
+#git submodule foreach "if grep \"^\${name}:\" ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt > /dev/null; then git tag $BUILD_ID; git push --verbose origin $BUILD_ID; else echo Skipping \$name; fi || :"
+git submodule foreach "if grep \"^\${name}:\" ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt > /dev/null; then git tag $BUILD_ID; else echo Skipping \$name; fi || :"
+git tag $BUILD_ID
+# disable git push for now
+#git push --verbose origin $BUILD_ID
+
+# git logging
+if [[ -n "$lastTag" ]]; then
+ tmpGitLog=$CJE_ROOT/$TMP_DIR/gitLog.txt
+ echo -e "<h2>Git log from $lastTag (previous) to $BUILD_ID (current)</h2>" > $gitLogFile
+ echo -e "<h2>The tagging, and this report, were done at about $reportTimestamp</h2>" >> $gitLogFile
+ git log $lastTag..$BUILD_ID --date=short --format=format:"<tr><td class=\"datecell\">%cd</td><td class=\"commitcell\"><a href=\"https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=%H\">%s</a></td><td class=\"authorcell\">%aN</td></tr>" > $tmpGitLog
+ tmpFileSize=$(stat -c%s $tmpGitLog)
+ if [ $tmpFileSize -ne 0 ]; then
+ echo "<table width=\"80%\"><tbody> <tr><th class=\"cell\" colspan=\"3\">Repository: eclipse.platform.releng.aggregator</th></tr>" >> $gitLogFile
+ echo "<tr> <th class=\"datecell\">Date</th> <th class=\"commitcell\">Commit message</th> <th class=\"authorcell\">Author</th> </tr>" >> $gitLogFile
+ cat $tmpGitLog >> $gitLogFile
+ echo "</tbody></table><br><br>" >> $gitLogFile
+ echo >> $gitLogFile
+ fi
+ git submodule --quiet foreach "comp=\$(echo \$path|cut -d. -f2);git log $lastTag..$BUILD_ID --date=short --format=format:\"<tr><td class=\\\"datecell\\\">%cd</td><td class=\\\"commitcell\\\"><a href=\\\"https://git.eclipse.org/c/\$comp/\$path.git/commit/?id=%H\\\">%s</a></td><td class=\\\"authorcell\\\">%aN</td></tr>\">$tmpGitLog;FILESIZE=\$(stat -c%s $tmpGitLog);if [ \$FILESIZE -ne 0 ]; then echo \"<table width=\\\"80%\\\"><tbody> <tr><th class=\\\"cell\\\" colspan=\\\"3\\\">Repository: \$path</th></tr>\";echo \"<tr> <th class=\\\"datecell\\\">Date</th> <th class=\\\"commitcell\\\">Commit message</th> <th class=\\\"authorcell\\\">Author</th> </tr>\";cat $tmpGitLog;echo \"</tbody></table><br><br>\";echo;fi" >> $gitLogFile
+else
+ echo -e "\n\tGit log not generated because a reasonable previous tag could not be found." > $gitLogFile
+fi
+
+popd
diff --git a/cje-production/mbscripts/mb220_buildSdkPatch.sh b/cje-production/mbscripts/mb220_buildSdkPatch.sh
index f680433f..e2f8749a 100755
--- a/cje-production/mbscripts/mb220_buildSdkPatch.sh
+++ b/cje-production/mbscripts/mb220_buildSdkPatch.sh
@@ -28,7 +28,7 @@ mvn clean verify -DskipTests=true -Pbree-libs \
-Dcbi.jarsigner.continueOnFail=true \
-Djgit.dirtyWorkingTree=error \
-Dmaven.repo.local=$LOCAL_REPO \
- -Djava.io.tmpdir=$CJE_ROOT/tmp \
+ -Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
-DaggregatorBuild=true \
-DbuildTimestamp=$TIMESTAMP \
-DbuildType=$BUILD_TYPE \
diff --git a/cje-production/mbscripts/mb300_gatherParts.sh b/cje-production/mbscripts/mb300_gatherParts.sh
index 7af62875..a211efe8 100755
--- a/cje-production/mbscripts/mb300_gatherParts.sh
+++ b/cje-production/mbscripts/mb300_gatherParts.sh
@@ -23,7 +23,6 @@ source $CJE_ROOT/scripts/common-functions.shsource
source $1
mkdir -p $CJE_ROOT/$DROP_DIR/$BUILD_ID/repository
-mkdir -p $CJE_ROOT/$TMP_DIR
# gather repo
echo $PATCH_BUILD

Back to the top