Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 22 additions & 50 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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'
}
}
}
}
50 changes: 50 additions & 0 deletions Jenkinsfile1
Original file line number Diff line number Diff line change
@@ -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'
}
}
}
}
}
45 changes: 45 additions & 0 deletions Jenkinsfile_JSPln
Original file line number Diff line number Diff line change
@@ -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'
}
}
}
}
}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ The application will be available on `http://localhost:8080`.
</plugin>
</plugins>
</build>
```

git tase;lk;lkfds;lesing changes cannot nlkjlsd
=======
git tase;lk;lkfds;lesing changes
>>>>>>> c3229583f2efe77bdee1ed4728016e40d386ef42
4 changes: 4 additions & 0 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

<h3>WelCome to Jenkins! We are working on Code Pipeline version 2</h3>

<p> Welcome to Jenkins</p>

<p> This is change is to verify the Stage vs Production. Change made by the Owner</p>
=======
<p> This is change is to verify the Stage vs Production</p>

<p> Thanks Anshul Sir ! </p>
Expand Down