diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..2ba1055a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ + +from centos +MAINTAINER khannanitin106@gmail.com +RUN mkdir /var/java +ADD target/ /var/java \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..6d30aad6 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,46 @@ +pipeline { + agent any + + tools { + // Install the Maven version configured as "M3" and add it to the path. + maven "mvn" + } + + stages { + stage('Build') { + steps { + + // Run Maven on a Unix agent. + sh "mvn clean package" + } + } + stage('Test') + { + steps{ + echo "Testing start App" + } + } + stage("Email Notification") + { + steps{ + echo "mail sent" + } + } + + stage("Deployment"){ + steps{ + echo "Deployment" + } + } + stage("Install Docke"){ + steps{ + sh 'yum install docker -y' + } + } + stage("Create docker image"){ + steps{ + sh 'docker build -t devops .' + } + } +} +} \ No newline at end of file