Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2018-11-19 13:02:34 +0000
committerSravan Kumar Lakkimsetti2018-11-19 13:02:34 +0000
commit79aa3b6537b901fc71aa2763663d43c5e8082b1d (patch)
tree7aac1b7221598b82112b33cdfe4fea3e091f4ae9 /cje-production
parent3f1f8f29a6847c8709f766226bc6b9aa303691f3 (diff)
downloadeclipse.platform.releng.aggregator-79aa3b6537b901fc71aa2763663d43c5e8082b1d.tar.gz
eclipse.platform.releng.aggregator-79aa3b6537b901fc71aa2763663d43c5e8082b1d.tar.xz
eclipse.platform.releng.aggregator-79aa3b6537b901fc71aa2763663d43c5e8082b1d.zip
Bug 541301 - Prepare eclipse platform project for CJE migration
Change-Id: Ib6a2fdcb3cf2aba1fb31f55fa603ba91bd80b21c Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'cje-production')
-rw-r--r--cje-production/common/common-functions.shsource60
-rwxr-xr-xcje-production/master-build.sh26
-rw-r--r--cje-production/readme.txt26
3 files changed, 112 insertions, 0 deletions
diff --git a/cje-production/common/common-functions.shsource b/cje-production/common/common-functions.shsource
new file mode 100644
index 000000000..a15f62ffa
--- /dev/null
+++ b/cje-production/common/common-functions.shsource
@@ -0,0 +1,60 @@
+#!/bin/bash
+#*******************************************************************************
+# Copyright (c) 2016 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
+#*******************************************************************************
+
+# USAGE: fn-write-property VAR_NAME
+# VAR_NAME: Variable name to write as "variable=value" form
+# This script assumes the following variables have been defined and are pointing
+# to an appropriate file (see master-build.sh):
+# BUILD_ENV_FILE=${buildDirectory}/buildproperties.shsource
+# BUILD_ENV_FILE_PHP=${buildDirectory}/buildproperties.php
+# BUILD_ENV_FILE_PROP=${buildDirectory}/buildproperties.properties
+
+# Note we always append to file, assuming if doesn't exist yet and will be
+# created, and for each build, it won't exist, so will be written fresh for
+# each build.
+
+fn-write-property ()
+{
+ checkNArgs $# 1
+ if [[ $? != 0 ]]; then return 1; fi
+ VAR_NAME=$1
+ if [[ -z "${VAR_NAME}" ]]
+ then
+ echo "VAR_NAME must be passed to this script, $0."
+ return 1
+ fi
+
+ # bash scripts (export may be overkill ... but, just in case needed)
+ echo "export ${VAR_NAME}=\"${!VAR_NAME//\"/\\\"}\"" >> $BUILD_ENV_FILE
+ # PHP, suitable for direct "include"
+ echo "\$${VAR_NAME} = \"${!VAR_NAME//\"/\\\"}\";" >> $BUILD_ENV_FILE_PHP
+ # standard properties file
+ echo "${VAR_NAME} = \"${!VAR_NAME//\"/\\\"}\"" >> $BUILD_ENV_FILE_PROP
+
+}
+
+
+# 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 ()
+{
+ $*
+ returnCode=$?
+ if [ $returnCode != 0 ]
+ then
+ echo "Execution of \"$*\" failed with return code : $returnCode"
+ exit $returnCode
+ fi
+}
diff --git a/cje-production/master-build.sh b/cje-production/master-build.sh
new file mode 100755
index 000000000..9d99f6207
--- /dev/null
+++ b/cje-production/master-build.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+#*******************************************************************************
+# Copyright (c) 2018 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
+#*******************************************************************************
+
+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
+
+for i in $(ls mbscripts|sort)
+do
+ fn-run-command ./$i $BUILD_ENV_FILE
+done
diff --git a/cje-production/readme.txt b/cje-production/readme.txt
new file mode 100644
index 000000000..bf639e73d
--- /dev/null
+++ b/cje-production/readme.txt
@@ -0,0 +1,26 @@
+This is the location where we will develop production scripts for use on Cloudbees Jenkins Enterprise
+
+Here are some ground rules
+1. Each script starts with mb<xxx>_<scriptname>.sh. xxx is a 3 digit number
+ 000-099 - preparing build environment like setting environment variables etc.
+ 100-199 - cloning repos and preparing them with right branches/tags and tagging(git operations)
+ 200-299 - Maven operations(Updating pom with versions from manifest, create tar ball, build SDK/patch etc)
+ 300-399 - gather parts (collecting different artifacts into a temporary build location)
+ 400-499 - copy eclipse, repo and equinox artifacts to respective temporary download locations and generate necessary web pages
+ 500-599 - Generate build reports (running p2.repo.analyzers and dirt report, jdeps reports etc)
+ 600-699 - promote the build to download.eclipse.org.
+ 700-799 - trigger tests and send mails
+
+2. Every script should accept $ENV_FILE. this envrironment file is created at the preparing the build environment stage.
+3. Every script should source "common-functions.shsource". This will contain common methods used across the scripts
+
+
+Folder structure
+root (cje-production)
+ readme.txt
+ mbscripts
+ common
+ master-build.sh
+ siteDir (temporary location to hold the website)
+
+

Back to the top