From c6c6ca344006dba7a883be4ce56f2300ccb94f11 Mon Sep 17 00:00:00 2001 From: rasnayake Date: Thu, 30 Apr 2020 19:40:43 +0100 Subject: [PATCH] Update Jenkinsfile version one, removed SAST and DAST actions --- Jenkinsfile | 55 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 518c77c27..1890a9c58 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,57 +12,6 @@ pipeline { ''' } } - - stage ('Check-Git-Secrets') { - steps { - sh 'rm trufflehog || true' - sh 'docker run gesellix/trufflehog --json https://github.com/cehkunal/webapp.git > trufflehog' - sh 'cat trufflehog' - } - } - - stage ('Source Composition Analysis') { - steps { - sh 'rm owasp* || true' - sh 'wget "https://raw.githubusercontent.com/cehkunal/webapp/master/owasp-dependency-check.sh" ' - sh 'chmod +x owasp-dependency-check.sh' - sh 'bash owasp-dependency-check.sh' - sh 'cat /var/lib/jenkins/OWASP-Dependency-Check/reports/dependency-check-report.xml' - - } - } - - stage ('SAST') { - steps { - withSonarQubeEnv('sonar') { - sh 'mvn sonar:sonar' - sh 'cat target/sonar/report-task.txt' - } - } - } - - stage ('Build') { - steps { - sh 'mvn clean package' - } - } - - stage ('Deploy-To-Tomcat') { - steps { - sshagent(['tomcat']) { - sh 'scp -o StrictHostKeyChecking=no target/*.war ubuntu@13.232.202.25:/prod/apache-tomcat-8.5.39/webapps/webapp.war' - } - } - } - - - stage ('DAST') { - steps { - sshagent(['zap']) { - sh 'ssh -o StrictHostKeyChecking=no ubuntu@13.232.158.44 "docker run -t owasp/zap2docker-stable zap-baseline.py -t http://13.232.202.25:8080/webapp/" || true' - } - } - } - } -} + +