Upload
huang-bruce
View
308
Download
1
Embed Size (px)
Citation preview
quick sartup a jenkins server on OpenShift
1.install rhc client tool
2.setup rhc
3.create a jenkins application
4.setup jenkins
5.create a new job
6.custom our tool version
7. run job
1.install rhc client tool
All introduction of install client tool at ‘https://developers.openshift.com/en/getting-started-overview.html’
because I use windows ,and base on OpenShift’s direct , I need install Ruby and git
install ruby …use OpenShift recommended version
install git …
2.setup rhc
3.create a jenkins application
4.setup jenkins
change account password …
add executable job thread…
5.create a new job
add a new job
setup github repository
run job
6.custom our tool version
Now , project is use jdk1.8 to compile and use maven3.3.3 as tool ,so not use OpenShift’s default setup ,I need install jdk and maven individual.
1.navigate OpenShift persistent data directorycd $OPENSHIFT_DATA_DIR
2.download and zip jdkwget -c -O "jdk-8u40-linux-x64.tar.gz" --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.tar.gz"
tar xzf jdk-8u40-linux-x64.tar.gz
rm -f jdk-8u40-linux-x64.tar.gz
3.download and zip mavenwget http://apache.lauf-forum.at/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
tar -xvf apache-maven-3.3.3-bin.tar.gz
rm apache-maven-3.3.3-bin.tar.gz
connect app
download jdk
download maven
set enviroment variabel
ok ,after install jdk and maven , just set enviroment path in shell ( it’s work around to use the different kind version ,avoid OpenShift’s limit ) M2_HOME=$OPENSHIFT_DATA_DIR/apache-maven-3.3.3PATH=$M2_HOME/bin:$PATHJAVA_HOME=$OPENSHIFT_DATA_DIR/jdk1.8.0_60PATH=$JAVA_HOME/bin:$PATHmvn install
7.run job
run ~