From 7a9d26198eb7fe1a98cd034fe879642719ac61f2 Mon Sep 17 00:00:00 2001 From: autumn0914 <53305303+autumn0914@users.noreply.github.com> Date: Tue, 15 Feb 2022 08:26:56 +0800 Subject: [PATCH 1/5] Create Jenkins --- Jenkins | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Jenkins diff --git a/Jenkins b/Jenkins new file mode 100644 index 00000000..cb827940 --- /dev/null +++ b/Jenkins @@ -0,0 +1,35 @@ +pipeline { + agent any + stages { + stage('Static Analysis') { + steps { + echo 'Run the static analysis to the code' + } + } + stage('Compile') { + steps { + echo 'Compile the source code' + } + } + stage('Security Check') { + steps { + echo 'Run the security check against the application' + } + } + stage('Run Unit Tests') { + steps { + echo 'Run unit tests from the source code' + } + } + stage('Run Integration Tests') { + steps { + echo 'Run only crucial integration tests from the source code' + } + } + stage('Publish Artifacts') { + steps { + echo 'Save the assemblies generated from the compilation' + } + } + } +} From bbc7ef6445af9c64b34afbe6f5c98eff06410bc1 Mon Sep 17 00:00:00 2001 From: autumn0914 <53305303+autumn0914@users.noreply.github.com> Date: Sun, 13 Apr 2025 20:06:21 +0800 Subject: [PATCH 2/5] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..27a798ad --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,19 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- script: echo Hello, world! + displayName: 'Run a one-line script' + +- script: | + echo Add other tasks to build, test, and deploy your project. + echo See https://aka.ms/yaml + displayName: 'Run a multi-line script' From bbf2406a054f4d5be78848ccf38d3dc620d91752 Mon Sep 17 00:00:00 2001 From: autumn0914 <53305303+autumn0914@users.noreply.github.com> Date: Sun, 13 Apr 2025 20:35:01 +0800 Subject: [PATCH 3/5] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 27a798ad..51aeed3f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,6 +14,5 @@ steps: displayName: 'Run a one-line script' - script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' + java -jar C:\Test\BDDetect\detect-10.3.0.jar --blackduck.url=https://sca.demo.blackduck.com --blackduck.trust.cert=true --blackduck.api.token=NmUyNjJlOTgtZWIyYi00YWY3LTg1YTYtMWQ0NDQzODNkNTk2Ojc2ZTdiYjE5LWRmZDYtNDQ2Ny05YmFlLTgwY2RjMGUwZWM4Zg== --detect.source.path=C:\Demo\insecure-bank-master --detect.project.name=InsecBank --detect.project.version.name=1.0 --detect.cleanup=false --blackduck.offline.mode=false + displayName: 'Run SCA Analysis' From 72d1b2968c4c03f68ffc2f31ec7d1055498a6864 Mon Sep 17 00:00:00 2001 From: autumn0914 <53305303+autumn0914@users.noreply.github.com> Date: Sun, 13 Apr 2025 20:38:37 +0800 Subject: [PATCH 4/5] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 51aeed3f..958f6ca4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,15 +4,14 @@ # https://aka.ms/yaml trigger: -- master +- main -pool: - vmImage: ubuntu-latest +pool: Default steps: - script: echo Hello, world! displayName: 'Run a one-line script' - script: | - java -jar C:\Test\BDDetect\detect-10.3.0.jar --blackduck.url=https://sca.demo.blackduck.com --blackduck.trust.cert=true --blackduck.api.token=NmUyNjJlOTgtZWIyYi00YWY3LTg1YTYtMWQ0NDQzODNkNTk2Ojc2ZTdiYjE5LWRmZDYtNDQ2Ny05YmFlLTgwY2RjMGUwZWM4Zg== --detect.source.path=C:\Demo\insecure-bank-master --detect.project.name=InsecBank --detect.project.version.name=1.0 --detect.cleanup=false --blackduck.offline.mode=false + java -jar C:\Test\BDDetect\detect-10.3.0.jar --blackduck.url=https://sca.demo.blackduck.com --blackduck.trust.cert=true --blackduck.api.token=NmUyNjJlOTgtZWIyYi00YWY3LTg1YTYtMWQ0NDQzODNkNTk2Ojc2ZTdiYjE5LWRmZDYtNDQ2Ny05YmFlLTgwY2RjMGUwZWM4Zg== --detect.source.path=$(System.DefaultWorkingDirectory) --detect.project.name=InsecBank --detect.project.version.name=1.0 --detect.cleanup=false --blackduck.offline.mode=false displayName: 'Run SCA Analysis' From 6a9033368cfe21ed2895e60f4750252d0e917b4c Mon Sep 17 00:00:00 2001 From: autumn0914 <53305303+autumn0914@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:59:15 +0800 Subject: [PATCH 5/5] Update azure-pipelines.yml --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 958f6ca4..7d6486fb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,5 +13,5 @@ steps: displayName: 'Run a one-line script' - script: | - java -jar C:\Test\BDDetect\detect-10.3.0.jar --blackduck.url=https://sca.demo.blackduck.com --blackduck.trust.cert=true --blackduck.api.token=NmUyNjJlOTgtZWIyYi00YWY3LTg1YTYtMWQ0NDQzODNkNTk2Ojc2ZTdiYjE5LWRmZDYtNDQ2Ny05YmFlLTgwY2RjMGUwZWM4Zg== --detect.source.path=$(System.DefaultWorkingDirectory) --detect.project.name=InsecBank --detect.project.version.name=1.0 --detect.cleanup=false --blackduck.offline.mode=false + java -jar C:\Test\BDDetect\detect-10.3.0.jar --blackduck.url=https://sca.demo.blackduck.com --blackduck.trust.cert=true --blackduck.api.token= --detect.source.path=$(System.DefaultWorkingDirectory) --detect.project.name=InsecBank --detect.project.version.name=1.0 --detect.cleanup=false --blackduck.offline.mode=false displayName: 'Run SCA Analysis'