Last active
March 11, 2021 09:00
-
-
Save mysticrenji/fe5f1196c5142936e21adabe7e3446c9 to your computer and use it in GitHub Desktop.
Jenkins file for simple java app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
podTemplate(containers: [ | |
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, command: 'cat'), | |
]) { | |
node(POD_LABEL) { | |
stage('Get a Maven project') { | |
git 'https://github.com/mysticrenji/jenkins-k8s-cluster-terraform.git' | |
container('maven') { | |
stage('Build a Maven project') { | |
withSonarQubeEnv('SonarQube') { | |
sh 'mvn clean package sonar:sonar' | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment