diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index a2df42b1..00000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,112 +0,0 @@
-pipeline{
- agent any
- environment{
- VERSION = "${env.BUILD_ID}"
- }
- stages{
- stage("sonar quality check"){
- agent {
- docker {
- image 'openjdk:11'
- }
- }
- steps{
- script{
- withSonarQubeEnv(credentialsId: 'sonar-token') {
- sh 'chmod +x gradlew'
- sh './gradlew sonarqube'
- }
-
- timeout(time: 1, unit: 'HOURS') {
- def qg = waitForQualityGate()
- if (qg.status != 'OK') {
- error "Pipeline aborted due to quality gate failure: ${qg.status}"
- }
- }
-
- }
- }
- }
- stage("docker build & docker push"){
- steps{
- script{
- withCredentials([string(credentialsId: 'docker_pass', variable: 'docker_password')]) {
- sh '''
- docker build -t 34.125.214.226:8083/springapp:${VERSION} .
- docker login -u admin -p $docker_password 34.125.214.226:8083
- docker push 34.125.214.226:8083/springapp:${VERSION}
- docker rmi 34.125.214.226:8083/springapp:${VERSION}
- '''
- }
- }
- }
- }
- stage('indentifying misconfigs using datree in helm charts'){
- steps{
- script{
-
- dir('kubernetes/') {
- withEnv(['DATREE_TOKEN=GJdx2cP2TCDyUY3EhQKgTc']) {
- sh 'helm datree test myapp/'
- }
- }
- }
- }
- }
- stage("pushing the helm charts to nexus"){
- steps{
- script{
- withCredentials([string(credentialsId: 'docker_pass', variable: 'docker_password')]) {
- dir('kubernetes/') {
- sh '''
- helmversion=$( helm show chart myapp | grep version | cut -d: -f 2 | tr -d ' ')
- tar -czvf myapp-${helmversion}.tgz myapp/
- curl -u admin:$docker_password http://34.125.214.226:8081/repository/helm-hosted/ --upload-file myapp-${helmversion}.tgz -v
- '''
- }
- }
- }
- }
- }
-
- stage('manual approval'){
- steps{
- script{
- timeout(10) {
- mail bcc: '', body: "
Project: ${env.JOB_NAME}
Build Number: ${env.BUILD_NUMBER}
Go to build url and approve the deployment request
URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "${currentBuild.result} CI: Project name -> ${env.JOB_NAME}", to: "deekshith.snsep@gmail.com";
- input(id: "Deploy Gate", message: "Deploy ${params.project_name}?", ok: 'Deploy')
- }
- }
- }
- }
-
- stage('Deploying application on k8s cluster') {
- steps {
- script{
- withCredentials([kubeconfigFile(credentialsId: 'kubernetes-config', variable: 'KUBECONFIG')]) {
- dir('kubernetes/') {
- sh 'helm upgrade --install --set image.repository="34.125.214.226:8083/springapp" --set image.tag="${VERSION}" myjavaapp myapp/ '
- }
- }
- }
- }
- }
-
- stage('verifying app deployment'){
- steps{
- script{
- withCredentials([kubeconfigFile(credentialsId: 'kubernetes-config', variable: 'KUBECONFIG')]) {
- sh 'kubectl run curl --image=curlimages/curl -i --rm --restart=Never -- curl myjavaapp-myapp:8080'
-
- }
- }
- }
- }
- }
-
- post {
- always {
- mail bcc: '', body: "
Project: ${env.JOB_NAME}
Build Number: ${env.BUILD_NUMBER}
URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "${currentBuild.result} CI: Project name -> ${env.JOB_NAME}", to: "deekshith.snsep@gmail.com";
- }
- }
-}
diff --git a/README.md b/README.md
index 93676f58..0c5a43e8 100644
--- a/README.md
+++ b/README.md
@@ -2,10 +2,10 @@
This application is java spring boot web application
-build tool is ** gradle **
+build tool is *** gradle ***
when we build the code using command ```./gradlew build ``` it will generate war file. that war can be placed in tomcat server to see application web page
code is integrated with sonarqube plugin which help us in static code analysis
-``` ./gradlew sonarqube ```
\ No newline at end of file
+``` ./gradlew sonarqube ```