# i don't know much about Jenkins pipeline but this is my first time and here is what I did
//** pipeline to get the code from git branches and deploy to the staging or production server **//
node {
def mvnHome
stage('Preparation') { // for display purposes
// Get some code from a GitHub repository
// Get the Maven tool.
// ** NOTE: This 'M3' Maven tool must be configured
// ** in the global configuration.
}
stage('Execute commannds') {
//** Here you will aff the additional commands line npm
}
}
stage('deploy staging') {
ssh $user@IP 'cd $location && git status && git pll origin staging '\
}
}
if this is right Please guide me that how do I add the staging and production branches accordingly and if i want to compile the code on the way how do i do that . + how do i add secret variables in the jenkins that i can use in the pipeline script