diff --git a/jenkins.file b/jenkins.file new file mode 100644 index 0000000..9202877 --- /dev/null +++ b/jenkins.file @@ -0,0 +1,41 @@ +pipeline { + agent any + + environment { + scannerHome = tool "sonar" + } + + stages { + + stage('cleanws') { + steps { + cleanWs() + } + } + + stage('Code') { + steps { + git 'https://github.com/gopi-wp/python-code-library-app.git' + } + } + + stage('dependancy-check') { + steps { + dependencyCheck additionalArguments: '--scan ./ --disableYarnAudit --disableNodeAudit\'', nvdCredentialsId: 'owaps-cred', odcInstallation: 'dp-check' + dependencyCheckPublisher pattern: 'dependency-check-report.xml' + } + } + + stage('CQA') { + steps { + withSonarQubeEnv('sonar') { + sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=library" + } + } + } + + stage('Qualitygates') { + steps { + waitForQualityGate abortPipeline: false, credentialsId: 'sonar-id' + } + }