pipeline {
agent any
tools {
maven 'maven3'
jdk 'jdk11'
}
environment{
SONAR_SCANNER_HOME= tool 'sonar-scanner'
}
stages {
stage('Code Checkout') {
steps {
git changelog: false, poll: false, url: 'https://github.com/kishoraswar22/spring-boot-war-example.git'
}
}
stage('Code Build') {
steps {
sh 'mvn compile'
}
}
stage('Code Test') {
tools{
jdk 'jdk17'
}
steps {
withSonarQubeEnv('sonar') {
sh '''
$SONAR_SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=SpringWebapp -Dsonar.projectKey=SpringWebapp \
-Dsonar.java.binaries=.
'''
}
}
}
stage('Dev Deploy') {
steps {
deploy adapters: [tomcat9(credentialsId: 'tomcat_admin', path: '', url: 'http://43.204.32.171:8080')], contextPath: null, war: '**/*.war'
}
}
}
}
Thursday, April 11, 2024
Jenkins Sonarqube Pipeline
Subscribe to:
Post Comments (Atom)
Sample Game App Deployment on EKS cluster
https://padmakshi.medium.com/setting-up-an-eks-cluster-and-deploying-a-game-application-a-step-by-step-guide-08790e0be117
-
Docker Compose is a tool that was developed to help define and share multi-container applications. With Compose, we can create a YAML file ...
-
Compose and Swarm are both tools provided by Docker for managing and deploying containerized applications, but they have different use cas...
-
Step 1) Create AWS EC2 Instance and install docker on it. Step 2) Initialize swarm cluster using below command #docker swarm init or # dock...
No comments:
Post a Comment