satish8450 / Documents-AWS

Documents Listed her
0 stars 0 forks source link

Jenkins Pipeline Syntax #10

Open satish8450 opened 1 year ago

satish8450 commented 1 year ago

pipeline { agent any

stages {
    stage('Clone Repository') {
        steps {
            // Define the Git SCM checkout step
            script {
                git url: 'https://github.com/MithunTechnologiesDevOps/spring-boot-mongo-docker.git'
                    branch: 'main' 
            }
        }
    }

    // Add more stages for your build or deployment process here

    stage('Build') {
        steps {
            // Compile your Java code and package it into a JAR file
            sh 'mvn clean package' // Use 'mvn' or 'gradle' depending on your build tool
        }
    }
      }

}