diff options
author | Sravan Kumar Lakkimsetti | 2019-10-30 10:35:29 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2019-10-30 10:35:29 +0000 |
commit | 025f3d51cbc6c207dea16fa79c0a746d356e9eb8 (patch) | |
tree | be40cb6a1840725da37fe927c0423547b5878745 /cje-production | |
parent | e1d4060d552b91949315be8ecf7dbe888488e578 (diff) | |
download | eclipse.platform.releng.aggregator-025f3d51cbc6c207dea16fa79c0a746d356e9eb8.tar.gz eclipse.platform.releng.aggregator-025f3d51cbc6c207dea16fa79c0a746d356e9eb8.tar.xz eclipse.platform.releng.aggregator-025f3d51cbc6c207dea16fa79c0a746d356e9eb8.zip |
Bug 552552 - Develop scripts to add to repo and delete from repo for JIRO use
Change-Id: Iaabc733dfdcdc96412247f63ffd88d0f6ba08083
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'cje-production')
-rw-r--r-- | cje-production/scripts/addToComposite.xml | 22 | ||||
-rw-r--r-- | cje-production/scripts/removeFromComposite.xml | 22 | ||||
-rwxr-xr-x | cje-production/scripts/runAntRunner.sh | 87 |
3 files changed, 131 insertions, 0 deletions
diff --git a/cje-production/scripts/addToComposite.xml b/cje-production/scripts/addToComposite.xml new file mode 100644 index 000000000..0394c553d --- /dev/null +++ b/cje-production/scripts/addToComposite.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project + default="addToComposite" + basedir="."> + <target name="addToComposite"> + <fail unless="repodir" message="repodir must be passed in to this script" /> + <fail unless="complocation" message="complocation must be passed in to this script" /> + <echo message="Adding child (complocation) to composite (repodir)" /> + <echo message=" repodir: ${repodir}" /> + <echo message=" complocation: ${complocation}" /> + <p2.composite.repository> + <repository + location="file://${repodir}" + name="The Eclipse Project repository" /> + <add> + <repository location="${complocation}" /> + </add> + </p2.composite.repository> + </target> +</project> + diff --git a/cje-production/scripts/removeFromComposite.xml b/cje-production/scripts/removeFromComposite.xml new file mode 100644 index 000000000..3a15a27f9 --- /dev/null +++ b/cje-production/scripts/removeFromComposite.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project + default="removeFromComposite" + basedir="."> + <target name="removeFromComposite"> + <fail unless="repodir" message="repodir must be passed in to this script" /> + <fail unless="complocation" message="complocation must be passed in to this script" /> + <echo message="Removing child (complocation) to composite (repodir)" /> + <echo message=" repodir: ${repodir}" /> + <echo message=" complocation: ${complocation}" /> + <p2.composite.repository> + <repository + location="file://${repodir}" + name="The Eclipse Project repository" /> + <remove> + <repository location="${complocation}" /> + </remove> + </p2.composite.repository> + </target> +</project> + diff --git a/cje-production/scripts/runAntRunner.sh b/cje-production/scripts/runAntRunner.sh new file mode 100755 index 000000000..26f5c87e5 --- /dev/null +++ b/cje-production/scripts/runAntRunner.sh @@ -0,0 +1,87 @@ +#!/bin/bash +#******************************************************************************* +# 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: +# Sravan Kumar Lakkimsetti - initial API and implementation +#******************************************************************************* + + +# Utility to invoke eclipse antrunner + +baseBuilderDir=${WORKSPACE}/eclipse +if [[ ! -d "${baseBuilderDir}" ]] +then + echo "ERROR: The directory did not exist." + echo " baseBuilderDir: ${baseBuilderDir}" + exit 1 +fi + +launcherJar=$( find $baseBuilderDir/ -name "org.eclipse.equinox.launcher_*.jar" | sort | head -1 ) +if [[ -z "${launcherJar}" || ! -f "${launcherJar}" ]] +then + echo "ERROR: The launcher did not exist." + echo " launcherJar: ${launcherJar}" + exit 1 +fi + +JAVA_8_HOME=/opt/tools/java/oracle/jdk-8/latest +export JAVA_HOME=${JAVA_HOME:-${JAVA_8_HOME}} + +if [[ ! -d "${JAVA_HOME}" ]] +then + echo "ERROR: JAVA_HOME did not exist." + echo " JAVA_HOME: ${JAVA_HOME}" + exit 1 +fi +javaCMD=${JAVA_HOME}/bin/java + +BUILDFILE=$1 +if [ -e $BUILDFILE ] +then + BUILDFILESTR=" -file $BUILDFILE" + shift +else + BUILDFILESTR=" -file build.xml" +fi + +# use special $@ to keep all (remaining) arguments quoted (instead of one big string) +extraArgs="$@" + +echo +echo " BUILDFILESTR: $BUILDFILESTR" +if [ -n "${extraArgs}" ] +then + echo " extraArgs: ${extraArgs}" + echo " as it is right now, target name must be first \"extraArg\" if specifying one." +fi +echo + + +devworkspace="${BUILD_HOME}"/workspace-antRunner +devArgs=-Xmx512m + +echo +echo " buildId: ${buildId}" +echo " buildId: ${eclipseStream}" +echo " basebuilderParent: ${basebuilderParent}" +echo " baseBuilderDir: ${baseBuilderDir}" +echo " launcherJar: ${launcherJar}" +echo " BUILD_HOME: ${BUILD_HOME}" +echo " dev script: $0" +echo " devworkspace: $devworkspace" +echo " devArgs (-vmargs): $devArgs" +echo " javaCMD: $javaCMD" +echo " BUILDFILESTR: $BUILDFILESTR" +echo " extraArgs: ${extraArgs}" +echo + +${javaCMD} -jar ${launcherJar} -nosplash -consolelog -debug -data $devworkspace -application org.eclipse.ant.core.antRunner $BUILDFILESTR ${extraArgs} -vmargs $devArgs + |