Last active
August 4, 2016 10:17
-
-
Save imesh/dc360d3809dc98d75472cfadd191fd8a to your computer and use it in GitHub Desktop.
Setup Apache Stratos Builder Machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
git_url="https://github.com/apache/stratos.git" | |
repo_name="stratos" | |
release_version="4.1.6" | |
settings_file_path="~/.m2/settings.xml" | |
#sudo adduser imesh | |
#sudo adduser imesh sudo | |
#su imesh | |
mkdir ~/.m2/ | |
touch ~/.m2/settings.xml | |
echo "<settings>" > ${settings_file_path} | |
echo " <servers>" >> ${settings_file_path} | |
echo " <!-- WSO2 staging repo -->" >> ${settings_file_path} | |
echo " <server>" >> ${settings_file_path} | |
echo " <id>nexus-releases</id>" >> ${settings_file_path} | |
echo " <username></username>" >> ${settings_file_path} | |
echo " <password></password>" >> ${settings_file_path} | |
echo " </server>" >> ${settings_file_path} | |
echo " <server>" >> ${settings_file_path} | |
echo " <id>wso2-scm-server</id>" >> ${settings_file_path} | |
echo " <username></username>" >> ${settings_file_path} | |
echo " <password></password>" >> ${settings_file_path} | |
echo " </server>" >> ${settings_file_path} | |
echo " </servers>" >> ${settings_file_path} | |
echo "</settings>" >> ${settings_file_path} | |
sudo apt-get install git | |
git config --global user.email imesh@apache.org | |
git config --global user.name "Imesh Gunaratne" | |
sudo apt-get install screen | |
screen | |
pushd /opt | |
echo "Downloding JDK..." | |
sudo wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz | |
echo "Extracting JDK..." | |
sudo tar -xvf jdk-7u80-linux-x64.tar.gz | |
echo "Downloading Apache Maven..." | |
sudo wget http://www.eu.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz | |
echo "Extracting Apache Maven..." | |
sudo tar -xvf apache-maven-3.3.3-bin.tar.gz | |
sudo chown -R wso2builder:builder . | |
echo "Exporting environment variables..." | |
export JAVA_HOME=/opt/jdk1.7.0_80/ | |
export PATH=$PATH:$JAVA_HOME/bin | |
export M2_HOME=/opt/apache-maven-3.3.3 | |
export PATH=$PATH:$M2_HOME/bin | |
mkdir work | |
pushd /opt/work | |
git clone ${git_url} | |
cd {repo_name} | |
git checkout -b release-${release_version} stratos-4.1.x | |
mvn release:prepare | |
mvn release:perform -Darguments="-DskipTests -Dmaven.javadoc.failOnError=false" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment