Skip to content

Instantly share code, notes, and snippets.

@prasanjit-
Created June 18, 2017 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prasanjit-/8dfa21053a221f06270fe90cc49ee9d9 to your computer and use it in GitHub Desktop.
Save prasanjit-/8dfa21053a221f06270fe90cc49ee9d9 to your computer and use it in GitHub Desktop.
'''''''''''''''''''''''''''''''''
Build & Test Automation Pipeline - (Module 4)
'''''''''''''''''''''''''''''''''
(A) - Simple Java Compilation using Jenkins & Core Compilation Commands
Prerequisites: Jenkins should have git plugin and installed with Java compiler.
yum install java-devel
Repo Reference: https://github.com/prasanjit-/hello-java
#Build Steps:
echo "Compiling ... "
javac HelloWorld.java
echo "Execution ..."
java HelloWorld
jar cvfe HelloWorld.jar HelloWorld *.class
echo "============================"
#Execution:
java -jar HelloWorld.jar
echo "============================"
(B) - Simple Java Compilation using Jenkins & Maven
Prerequisites: Jenkins should have - Maven Integration plugin and maven installed in host.
# yum install maven
Repo Reference: https://github.com/prasanjit-/hello-java-maven
#Build Steps:
# export JAVA_HOME='/usr/lib/jvm/java-1.8.0-openjdk/'
# mvn package
(C) - Simple Java Compilation using Jenkins & Ant
Prerequisites: Jenkins should have - Ant Integration plugin and ant installed in host.
# yum install ant
Repo Reference: https://github.com/prasanjit-/hello-java-ant
#Build Steps:
# export JAVA_HOME='/usr/lib/jvm/java-1.8.0-openjdk/'
# ant compile jar run
ssh://user@other.host.com/~/repos_path/reponame.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment