0% found this document useful (0 votes)
7 views1 page

Jenkins File

This document outlines a Jenkins pipeline configuration for building and deploying a Java application using Maven. It includes parameters for a staging server and defines two main stages: 'Build' for packaging the application and 'Deployments' for transferring the built artifacts to the specified server. The pipeline utilizes shell commands for both the build and deployment processes.

Uploaded by

rkrsinha07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Jenkins File

This document outlines a Jenkins pipeline configuration for building and deploying a Java application using Maven. It includes parameters for a staging server and defines two main stages: 'Build' for packaging the application and 'Deployments' for transferring the built artifacts to the specified server. The pipeline utilizes shell commands for both the build and deployment processes.

Uploaded by

rkrsinha07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

pipeline {

agent any

tools {
maven 'local_maven'
}
parameters {
string(name: 'staging_server', defaultValue: '13.232.37.20', description:
'Remote Staging Server')
}

stages{
stage('Build'){
steps {
sh 'mvn clean package'
}
post {
success {
echo 'Archiving the artifacts'
archiveArtifacts artifacts: '**/target/*.war'
}
}
}

stage ('Deployments'){
parallel{
stage ("Deploy to Staging"){
steps {
sh "scp -v -o StrictHostKeyChecking=no **/*.war root@$
{params.staging_server}:/opt/tomcat/webapps/"
}
}
}
}
}
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy