Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'production/miscToolsAndNotes/proxyRelated')
-rw-r--r--production/miscToolsAndNotes/proxyRelated/getBaseBuilderAndTools.xml261
-rwxr-xr-xproduction/miscToolsAndNotes/proxyRelated/getSettings.sh29
-rw-r--r--production/miscToolsAndNotes/proxyRelated/platformSpecific.properties26
3 files changed, 316 insertions, 0 deletions
diff --git a/production/miscToolsAndNotes/proxyRelated/getBaseBuilderAndTools.xml b/production/miscToolsAndNotes/proxyRelated/getBaseBuilderAndTools.xml
new file mode 100644
index 000000000..375a51c73
--- /dev/null
+++ b/production/miscToolsAndNotes/proxyRelated/getBaseBuilderAndTools.xml
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ A utility ant script which gets the Eclipse Platform binary from 'archive' server then uses it to
+ install additional tools and utilities from several p2 repositories: from 'downloads', the 'build' machine,
+ and one that is on an 'external' site, to actually test that proxies work. (The external one is a "real" project,
+ so this script should not be ran so often to "stress" that site, or throw off their download statistics.)
+
+ Hudson jobs (or builds) can call a script like this one from generic ant
+ as one of it first build steps to get the eclipse tools or applications, such as antRunner.
+-->
+<project
+ name="getBaseBuilder"
+ default="getBaseBuilder"
+ basedir=".">
+
+
+ <target
+ name="init"
+ unless="getBaseBuilderInitialized">
+
+ <property environment="env" />
+
+ <!-- this property file is optional. It's primarily used to set
+ the "proxy setting preferences" for Eclpse. -->
+ <property file="platformSpecific.properties" />
+
+ <!-- jvm usually set in the platformSpecific.properties file, but if not, we
+ will force one possibly valid value. -->
+ <property
+ name="jvm"
+ value="/shared/common/jdk1.8.0_x64-latest/bin" />
+
+
+ <condition
+ property="TMP"
+ value="${env.TMP_DIR}">
+ <isset property="env.TMP_DIR" />
+ </condition>
+ <condition
+ property="TMP"
+ value="${TMP_DIR}">
+ <isset property="TMP_DIR" />
+
+ </condition>
+ <condition
+ property="TMP"
+ value="${env.BUILD_ROOT}/tmp">
+ <isset property="${env.BUILD_ROOT}" />
+
+ </condition>
+ <condition
+ property="TMP"
+ value="${BUILD_ROOT}/tmp">
+ <isset property="${BUILD_ROOT}" />
+ </condition>
+
+ <property
+ name="TMP"
+ value="${basedir}/tmp" />
+
+ <fail
+ unless="TMP"
+ message="TMP not defined, since TMP_DIR nor BUILD_ROOT was defined" />
+ <echo message="TMP: ${TMP}" />
+
+ <mkdir dir="${TMP}" />
+
+ <condition
+ property="downloadHost"
+ value="${env.DOWNLOAD_HOST}"
+ else="archive.eclipse.org">
+ <isset property="env.DOWNLOAD_HOST" />
+ </condition>
+ <!--
+ TODO: need make platform independent, as in test.xml, to compute right one.
+ (and, pass in?)
+ (and make "version" variable)
+ -->
+ <property
+ name="platformURL"
+ value="http://${downloadHost}/eclipse/downloads/drops4/R-4.5.2-201602121500" />
+ <!--
+ We used to use binary platform, since smaller, but moved to SDK, to be able to use API Tools.
+ But then moved back to Platform, after having some cases where we need to pick up new fixes from
+ API tools.
+ -->
+ <property
+ name="platformFile"
+ value="eclipse-platform-4.5.2-linux-gtk-x86_64.tar.gz" />
+
+ <property
+ name="eclipserun-repo"
+ value="http://download.eclipse.org/eclipse/updates/4.5/R-4.5.2-201602121500" />
+ <echo message="eclipserun-repo: ${eclipserun-repo}" />
+
+ <property
+ name="apiTools.repository"
+ value="${eclipserun-repo}" />
+ <property
+ name="apiTools.iu"
+ value="org.eclipse.pde.api.tools" />
+ <!-- since we specify specific repo for api tools, we can leave version to "hightest" -->
+ <property
+ name="apiTools.iu.version"
+ value="" />
+
+ <property
+ name="buildTools.repository"
+ value="http://build.eclipse.org/eclipse/buildtools/" />
+ <property
+ name="buildTools.feature"
+ value="org.eclipse.releng.build.tools.feature.feature.group" />
+ <!-- Here, even though not specific repo, we always want the "latest". But, if that ever changes,
+ we can specify a concrete version here.
+ -->
+ <property
+ name="buildTools.feature.version"
+ value="" />
+
+ <property
+ name="buildTools.derby.feature"
+ value="org.apache.derby.core.feature.feature.group" />
+ <property
+ name="buildTools.derby.feature.version"
+ value="" />
+
+ <property
+ name="webtools.repository"
+ value="http://download.eclipse.org/webtools/releng/repository/" />
+ <property
+ name="webtools.feature"
+ value="org.eclipse.wtp.releng.tools.feature.feature.group" />
+ <property
+ name="webtools.feature.version"
+ value="1.2.0.v201102200505-21-7w312213311616" />
+
+ <!-- Have included this "external" site, just to give a true
+ test of the proxies themselves. I got this site from "marketplace"
+ and because this is a "real" project for someone, we should not
+ overuse the "test" aspect, or will throw off their numbers.
+ If it is ever desired to "run this test" ever day, or similar,
+ then a better "test site" should be found or created. -->
+ <property
+ name="external.repository"
+ value=" http://fabrizioiannetti.github.io/p2/" />
+ <property
+ name="external.feature"
+ value="com.github.fabeclipse.textedgrep_feature.feature.group" />
+ <property
+ name="external.feature.version"
+ value="" />
+
+ <!-- assign default WORKSPACE if not on hudson, for local testing if nothing else -->
+ <property
+ name="WORKSPACE"
+ value="${basedir}" />
+ <echo message="WORKSPACE: ${WORKSPACE}" />
+
+ <!--
+ The desired folder name (made to stay consistent with history.
+ -->
+ <property
+ name="folderName"
+ value="org.eclipse.releng.basebuilder" />
+
+ <property
+ name="getBaseBuilderInitialized"
+ value="true" />
+ </target>
+
+
+ <target
+ name="getBaseBuilder"
+ depends="init">
+ <!-- remove old one, if there, and make sure one exists for eventual checkout/copy/globmapper -->
+ <delete dir="${WORKSPACE}/${folderName}" />
+ <mkdir dir="${WORKSPACE}/${folderName}" />
+ <antcall target="fetchBasePlatform" />
+ </target>
+
+ <target
+ name="fetchBasePlatform"
+ depends="init"
+ if="platformURL">
+ <get
+ dest="${TMP}/${platformFile}"
+ src="${platformURL}/${platformFile}"
+ usetimestamp="true" />
+ <!-- untar is broken in Ant 1.9.4. See https://bz.apache.org/bugzilla/show_bug.cgi?id=56641
+ <untar
+ compression="gzip"
+ src="${TMP}/${platformFile}"
+ dest="${TMP}">
+ </untar>
+ -->
+ <exec
+ executable="/bin/tar"
+ dir="${TMP}">
+ <arg value="-xf" />
+ <arg value="${TMP}/${platformFile}" />
+ </exec>
+
+ <chmod perm="ugo+x">
+ <fileset dir="${TMP}/eclipse">
+ <include name="eclipse" />
+ <include name="*.so*" />
+ </fileset>
+ </chmod>
+
+ <antcall target="installSettings" />
+
+ <exec
+ dir="${TMP}/eclipse"
+ failonerror="true"
+ executable="${TMP}/eclipse/eclipse">
+ <arg value="-nosplash" />
+ <arg value="-debug" />
+ <arg value="-consolelog" />
+ <arg value="-data" />
+ <arg value="${WORKSPACE}/workspace-toolsinstall" />
+ <arg value="-application" />
+ <arg value="org.eclipse.equinox.p2.director" />
+ <arg value="-repository" />
+ <arg value="${eclipserun-repo},${buildTools.repository},${webtools.repository},${external.repository}" />
+ <arg value="-installIU" />
+ <arg
+ value="${apiTools.iu}/${apiTools.iu.version},${buildTools.feature}/${buildTools.feature.version},${webtools.feature}/${webtools.feature.version},${buildTools.derby.feature}/${buildTools.derby.feature.version},${external.feature}/${external.feature.version}" />
+ <arg value="-vm" />
+ <arg value="${jvm}" />
+ <!-- vmargs must come last -->
+ <arg value="-vmargs" />
+ <arg value="-Djava.io.tmpdir=${TMP}" />
+ </exec>
+
+ <!-- we "move" so the directory structure so it flat under basebuilder ...
+ for compatibility to very old code/scripts -->
+ <move todir="${WORKSPACE}/${folderName}">
+ <fileset dir="${TMP}/eclipse/" />
+ </move>
+
+ <echo
+ message="platform and tools installed. platformURL: ${platformURL} platform: ${platformFile}, fetched using getBaseBuilderAndTools.xml" />
+
+ <echo message="The following were the properties in effect:" />
+ <echoproperties />
+ </target>
+
+ <target
+ name="installSettings"
+ if="org.eclipse.core.net.prefs">
+ <property
+ name="settingsDir"
+ value="org.eclipse.releng.basebuilder/configuration/.settings" />
+
+ <mkdir dir="${settingsDir}" />
+ <echo
+ message="${org.eclipse.core.net.prefs}"
+ file="${settingsDir}/org.eclipse.core.net.prefs" />
+ </target>
+
+</project>
diff --git a/production/miscToolsAndNotes/proxyRelated/getSettings.sh b/production/miscToolsAndNotes/proxyRelated/getSettings.sh
new file mode 100755
index 000000000..3ced0d849
--- /dev/null
+++ b/production/miscToolsAndNotes/proxyRelated/getSettings.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+function getconf ()
+{
+ key=$1
+ if [[ -n "${key}" ]]
+ then
+ value=$(gconftool-2 --get "${key}")
+ echo -e "${key} \t\t${value}"
+ fi
+}
+
+getconf /system/http_proxy/use_http_proxy
+getconf /system/http_proxy/use_authentication
+getconf /system/http_proxy/host
+getconf /system/http_proxy/authentication_user
+getconf /system/http_proxy/authentication_password
+getconf /system/http_proxy/port
+getconf /system/proxy/socks_host
+getconf /system/proxy/mode
+getconf /system/proxy/ftp_host
+getconf /system/proxy/secure_host
+getconf /system/proxy/socks_port
+getconf /system/proxy/ftp_port
+getconf /system/proxy/secure_port
+getconf /system/proxy/no_proxy_for
+getconf /system/proxy/gopher_host
+getconf /system/proxy/gopher_port
+
diff --git a/production/miscToolsAndNotes/proxyRelated/platformSpecific.properties b/production/miscToolsAndNotes/proxyRelated/platformSpecific.properties
new file mode 100644
index 000000000..0ba80620d
--- /dev/null
+++ b/production/miscToolsAndNotes/proxyRelated/platformSpecific.properties
@@ -0,0 +1,26 @@
+
+# This properties file contains items that are specific to the platform being tested,
+# Typically includes items dependent on exact OS, architecture, and location of files.
+
+# This is the VM to use to run the tests, if one prefers
+# to use a different one from the one that stared the whole process.
+jvm=/shared/common/jdk1.8.0_x64-latest/bin/
+
+# This value gets written to the "preference file", named org.eclipse.core.net.prefs.
+# We implement as a property string, since eventually we may test multiple proxy settings.
+# These listed here are for tests running on build.eclipse.org, to access files outside
+# eclipse.org infrastructure.
+# was: 172.30.206.*
+org.eclipse.core.net.prefs=\
+eclipse.preferences.version=1\n\
+org.eclipse.core.net.hasMigrated=true\n\
+proxiesEnabled=true\n\
+systemProxiesEnabled=true\n\
+nonProxiedHosts=*.eclipse.org\n\
+proxyData/HTTP/hasAuth=false\n\
+proxyData/HTTP/host=proxy.eclipse.org\n\
+proxyData/HTTP/port=9898\n\
+proxyData/HTTPS/hasAuth=false\n\
+proxyData/HTTPS/host=proxy.eclipse.org\n\
+proxyData/HTTPS/port=9898\n
+

Back to the top