diff --git a/Jenkinsfile b/Jenkinsfile index c549f81c..53d9ea9e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,50 +1,22 @@ -pipeline { - agent any - stages { - stage ('Build Servlet Project') { - steps { - /*For windows machine */ - bat 'mvn clean package' - - /*For Mac & Linux machine */ - // sh 'mvn clean package' - } - - post{ - success{ - echo 'Now Archiving ....' - - archiveArtifacts artifacts : '**/*.war' - } - } - } - - stage ('Deploy Build in Staging Area'){ - steps{ - - build job : 'Deploy-StagingArea-Piple' - - } - } - - stage ('Deploy to Production'){ - steps{ - timeout (time: 5, unit:'DAYS'){ - input message: 'Approve PRODUCTION Deployment?' - } - - build job : 'Deploy-Production-Pipeline' - } - - post{ - success{ - echo 'Deployment on PRODUCTION is Successful' - } - - failure{ - echo 'Deployement Failure on PRODUCTION' - } - } - } - } -} +pipeline { + agent any + stages { + stage ('Initialize') { + steps { + echo "Initializing the Code File" + } + } + + stage ('Build') { + steps { + echo 'Hello World' + } + } + + stage ('Deploy') { + steps { + echo 'Deployed an Artifact' + } + } + } +} \ No newline at end of file diff --git a/Jenkinsfile1 b/Jenkinsfile1 new file mode 100644 index 00000000..c549f81c --- /dev/null +++ b/Jenkinsfile1 @@ -0,0 +1,50 @@ +pipeline { + agent any + stages { + stage ('Build Servlet Project') { + steps { + /*For windows machine */ + bat 'mvn clean package' + + /*For Mac & Linux machine */ + // sh 'mvn clean package' + } + + post{ + success{ + echo 'Now Archiving ....' + + archiveArtifacts artifacts : '**/*.war' + } + } + } + + stage ('Deploy Build in Staging Area'){ + steps{ + + build job : 'Deploy-StagingArea-Piple' + + } + } + + stage ('Deploy to Production'){ + steps{ + timeout (time: 5, unit:'DAYS'){ + input message: 'Approve PRODUCTION Deployment?' + } + + build job : 'Deploy-Production-Pipeline' + } + + post{ + success{ + echo 'Deployment on PRODUCTION is Successful' + } + + failure{ + echo 'Deployement Failure on PRODUCTION' + } + } + } + } +} diff --git a/Jenkinsfile_JSPln b/Jenkinsfile_JSPln new file mode 100644 index 00000000..de1fa8cd --- /dev/null +++ b/Jenkinsfile_JSPln @@ -0,0 +1,45 @@ +pipeline { + agent any + stages { + stage ('Build Servlet Project') { + steps { + /*For Windows machine*/ + bat 'mvn clean package' + + /*For Mac & Linuc machines*/ + //sh 'mvn clean package' + + } + + post { + success{ + echo 'Now archiving...' + + archiveArtifacts artifacts : '**/*.war' + } + } + } + stage ('Deploy Build in staging area') { + steps{ + build job: 'Deploy_Staging_Env_Pipeline' + } + } + stage ('Deploy to Production'){ + steps{ + timeout (time: 5, unit:'DAYS') { + input message: 'Approve Production Deployment?' + } + build job: 'Deploy-Prod-Pipeline' + } + + post{ + success{ + echo 'Deployment to Production Successful' + } + failure{ + echo 'Deployment failed' + } + } + } + } +} diff --git a/README.md b/README.md index de9dd576..486263cb 100644 --- a/README.md +++ b/README.md @@ -51,4 +51,8 @@ The application will be available on `http://localhost:8080`. - ``` + +git tase;lk;lkfds;lesing changes cannot nlkjlsd +======= +git tase;lk;lkfds;lesing changes +>>>>>>> c3229583f2efe77bdee1ed4728016e40d386ef42 diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 6fb84bba..c8145908 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -4,6 +4,10 @@
Welcome to Jenkins
+ +This is change is to verify the Stage vs Production. Change made by the Owner
+=======This is change is to verify the Stage vs Production
Thanks Anshul Sir !