CI/CD Script notes (CLONE+BUILD+CODE ANALYSIS)

 pipeline {

    agent any

environment {

    PATH="${PATH}:/opt/maven/bin"

}

  

    stages {

        stage('CLONE') {

            steps {

                git branch: 'main', url: 'https://github.com/raghu4devops/vansro22.git'

            }

        }

        stage('BUILD') {

            steps {

                sh 'mvn clean package'

            }

        }

        stage('CODE ANALYSIS') {

            steps {

                withSonarQubeEnv('SonarQube-Server')

                {

                    sh 'mvn sonar:sonar'

                }

            }

        }

    }

}


Comments

Popular posts from this blog

Top 10 Git Commands

Kubernetes cluster setup NOTES step by step using minikube

SonarQube Installation & Configuration Step by step