|
@@ -32,17 +32,10 @@ node{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- stage('SonarQube analysis')
|
|
|
|
|
- {
|
|
|
|
|
- def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
|
|
|
|
|
- withSonarQubeEnv('SonarQube')
|
|
|
|
|
- {
|
|
|
|
|
- // If you have configured more than one global server connection, you can specify its name
|
|
|
|
|
- sh "${scannerHome}/bin/sonar-scanner \
|
|
|
|
|
- -Dsonar.projectKey=FatboarProject \
|
|
|
|
|
- -Dsonar.sources=. \
|
|
|
|
|
- -Dsonar.host.url=https://sonarqube.foodgame.fr \
|
|
|
|
|
- -Dsonar.login=sqa_9980d9f6eac6a910947f1b55aaa280c93f02236b"
|
|
|
|
|
|
|
+ stage('Push Docker images to Nexus') {
|
|
|
|
|
+ withCredentials([usernamePassword(credentialsId: 'nexus', usernameVariable: 'admin', passwordVariable: 'azerty10')]) {
|
|
|
|
|
+ sh 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD nexus.foodgame.fr:8443'
|
|
|
|
|
+ sh 'docker-compose push'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|