From eccf5bd666f1c9cc48d3f373f1611b85d5265168 Mon Sep 17 00:00:00 2001 From: devopsadmin12 <94431252+devopsadmin12@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:30:20 +0530 Subject: [PATCH 1/6] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..34edff5 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,22 @@ +# Maven +# Build your Java project and run tests with Apache Maven. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/java + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: Maven@3 + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'package' From bb600bbb14a8b35a7121ad8b315c025002153b09 Mon Sep 17 00:00:00 2001 From: devopsadmin12 <94431252+devopsadmin12@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:41:02 +0530 Subject: [PATCH 2/6] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 34edff5..fc75e80 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,9 @@ # Maven +- task: dependency-check-build-task@6 + inputs: + projectName: 'Dependency Check' + scanPath: 'Demo-WebGoat' + format: 'HTML' # Build your Java project and run tests with Apache Maven. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/java From 0a79414bdbebe687cfb916a407e0b0e024b90d69 Mon Sep 17 00:00:00 2001 From: devopsadmin12 <94431252+devopsadmin12@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:42:47 +0530 Subject: [PATCH 3/6] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fc75e80..b9f560a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,12 +1,4 @@ # Maven -- task: dependency-check-build-task@6 - inputs: - projectName: 'Dependency Check' - scanPath: 'Demo-WebGoat' - format: 'HTML' -# Build your Java project and run tests with Apache Maven. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/java trigger: - master @@ -25,3 +17,12 @@ steps: publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' goals: 'package' + +- task: dependency-check-build-task@6 + inputs: + projectName: 'Dependency Check' + scanPath: 'Demo-WebGoat' + format: 'HTML' +# Build your Java project and run tests with Apache Maven. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/java From 2c76a40b966298374ff681f32c9c9503b01a574c Mon Sep 17 00:00:00 2001 From: devopsadmin12 <94431252+devopsadmin12@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:51:54 +0530 Subject: [PATCH 4/6] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b9f560a..8727544 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,11 @@ # Maven +- task: WhiteSource@20 + inputs: + cwd: '$(Build.SourcesDirectory)' + extensions: '.dll' + checkPolicies: 'SEND_ALERTS' + projectRule: 'projectName' + projectName: '$(Build.Repository.Name)' trigger: - master @@ -18,11 +25,11 @@ steps: testResultsFiles: '**/surefire-reports/TEST-*.xml' goals: 'package' -- task: dependency-check-build-task@6 + +- task: WhiteSource@20 inputs: - projectName: 'Dependency Check' - scanPath: 'Demo-WebGoat' - format: 'HTML' -# Build your Java project and run tests with Apache Maven. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/java + cwd: '$(Build.SourcesDirectory)' + extensions: '.dll' + checkPolicies: 'SEND_ALERTS' + projectRule: 'projectName' + projectName: '$(Build.Repository.Name)' From 3ed10b5dda2b1b55f27cbd990ae809b252764901 Mon Sep 17 00:00:00 2001 From: devopsadmin12 <94431252+devopsadmin12@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:54:43 +0530 Subject: [PATCH 5/6] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8727544..f404a64 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,11 +1,4 @@ # Maven -- task: WhiteSource@20 - inputs: - cwd: '$(Build.SourcesDirectory)' - extensions: '.dll' - checkPolicies: 'SEND_ALERTS' - projectRule: 'projectName' - projectName: '$(Build.Repository.Name)' trigger: - master @@ -23,13 +16,4 @@ steps: jdkArchitectureOption: 'x64' publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' - goals: 'package' - - -- task: WhiteSource@20 - inputs: - cwd: '$(Build.SourcesDirectory)' - extensions: '.dll' - checkPolicies: 'SEND_ALERTS' - projectRule: 'projectName' - projectName: '$(Build.Repository.Name)' + goals: 'package' \ No newline at end of file From e4508c47879b47445a4b8e380fa03cddc6ddc78d Mon Sep 17 00:00:00 2001 From: devopsadmin12 <94431252+devopsadmin12@users.noreply.github.com> Date: Tue, 14 Jun 2022 12:03:05 +0530 Subject: [PATCH 6/6] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f404a64..656233f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,4 @@ # Maven - trigger: - master @@ -16,4 +15,10 @@ steps: jdkArchitectureOption: 'x64' publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' - goals: 'package' \ No newline at end of file + goals: 'package' + +- task: dependency-check-build-task@6 + inputs: + projectName: 'Dependency-Check' + scanPath: 'src/main' + format: 'HTML'