From d1bea9b4e8182f045310b8426d585ef74ed72da4 Mon Sep 17 00:00:00 2001 From: freedom780 Date: Sat, 17 Aug 2024 08:47:25 +1000 Subject: [PATCH 1/8] 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 000000000..7438c7453 --- /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: +- main + +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 c4822098e5e15a7548fac889a5eb11a8d1567a79 Mon Sep 17 00:00:00 2001 From: Roman Korobitsin Date: Sat, 24 Aug 2024 10:54:56 +1000 Subject: [PATCH 2/8] changed JSP --- src/main/webapp/index.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index b670dd6ee..25d5f2c7e 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,5 +1,5 @@ -

Hello World!

+

Hello World !!!

From 03258e1b30e8ddeeb2891854f48739b9cd691683 Mon Sep 17 00:00:00 2001 From: Roman Korobitsin Date: Sun, 25 Aug 2024 08:14:40 +1000 Subject: [PATCH 3/8] added snyk --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7438c7453..04aec7293 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,3 +20,9 @@ steps: publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' goals: 'package' +- task: SnykSecurityScan@1 + inputs: + serviceConnectionEndpoint: 'Snyk' + testType: 'app' + failOnIssues: true + monitorWhen: 'always' From 4c3970fde0e32df9f8405450132814dce4cba5c0 Mon Sep 17 00:00:00 2001 From: Roman Korobitsin Date: Sun, 25 Aug 2024 08:26:00 +1000 Subject: [PATCH 4/8] addded log4j --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index c681c0458..01ea00072 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,15 @@ 4.11 test + + + + org.apache.logging.log4j + log4j + 2.17.0 + pom + + From 78a753749484019df810dc8944ff5b43356710e3 Mon Sep 17 00:00:00 2001 From: Roman Korobitsin Date: Sun, 25 Aug 2024 10:34:38 +1000 Subject: [PATCH 5/8] commit --- pom.xml | 7 +++++++ src/main/java/com/microsoft/demo/Demo.java | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/pom.xml b/pom.xml index 01ea00072..498589f7f 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,13 @@ pom + + + org.springframework + spring-core + 3.0.3.RELEASE + + diff --git a/src/main/java/com/microsoft/demo/Demo.java b/src/main/java/com/microsoft/demo/Demo.java index 3ab319fe3..18fce83af 100644 --- a/src/main/java/com/microsoft/demo/Demo.java +++ b/src/main/java/com/microsoft/demo/Demo.java @@ -1,12 +1,21 @@ package com.microsoft.demo; +import org.springframework.core.enums.LabeledEnum; + public class Demo { + public void DoSomething(boolean flag){ + + + System.out.println(LabeledEnum.LABEL_ORDER); + //log.debug(); if(flag){ System.out.println("I am covered"); return; } + + System.out.println("I am not covered"); } } \ No newline at end of file From 3e60a9a5603e49854703cb77fe41faaebc2a4ad1 Mon Sep 17 00:00:00 2001 From: Roman Korobitsin Date: Sun, 25 Aug 2024 10:40:03 +1000 Subject: [PATCH 6/8] commit --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 04aec7293..5ddf3f9dd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,5 +24,5 @@ steps: inputs: serviceConnectionEndpoint: 'Snyk' testType: 'app' - failOnIssues: true + failOnIssues: false monitorWhen: 'always' From 14ca30e5081fefe72d68583fa433b99de7affb12 Mon Sep 17 00:00:00 2001 From: Roman Korobitsin Date: Sun, 25 Aug 2024 12:18:51 +1000 Subject: [PATCH 7/8] commit --- azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5ddf3f9dd..1075b4062 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,8 +6,10 @@ trigger: - main -pool: - vmImage: ubuntu-latest +#pool: +# vmImage: ubuntu-latest + +pool: SDT Pool steps: - task: Maven@3 From 29d8099fbaa9911799110ff427b80e9dd359166a Mon Sep 17 00:00:00 2001 From: Roman Korobitsin Date: Sun, 25 Aug 2024 13:34:01 +1000 Subject: [PATCH 8/8] commit --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1075b4062..399d5b66c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,5 +26,5 @@ steps: inputs: serviceConnectionEndpoint: 'Snyk' testType: 'app' - failOnIssues: false + failOnIssues: true monitorWhen: 'always'