From 888b25e1349b84ea483f6637373571b0f78cae7b Mon Sep 17 00:00:00 2001 From: Archer743 <61616845+Archer743@users.noreply.github.com> Date: Sat, 21 Mar 2026 17:39:05 +0200 Subject: [PATCH 1/9] 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..e8f3d6f54 --- /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.11' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'package' From 13393b3f2b7c533c7659b0d2287556af46f2c648 Mon Sep 17 00:00:00 2001 From: Archer743 <61616845+Archer743@users.noreply.github.com> Date: Sat, 21 Mar 2026 18:31:02 +0200 Subject: [PATCH 2/9] Add build status badge to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f88d52f73..98cc4818f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://dev.azure.com/ikanyov/First%20Project/_apis/build/status%2FArcher743.azure-pipelines-java?branchName=main)](https://dev.azure.com/ikanyov/First%20Project/_build/latest?definitionId=1&branchName=main) # Contributing From b84b6a54c24cac1c9ecf436cbf07e214a4ba6efd Mon Sep 17 00:00:00 2001 From: Archer743 <61616845+Archer743@users.noreply.github.com> Date: Sun, 22 Mar 2026 12:18:53 +0200 Subject: [PATCH 3/9] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e8f3d6f54..30cbb3018 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,6 +5,7 @@ trigger: - main +- feature/* pool: vmImage: ubuntu-latest @@ -20,3 +21,10 @@ steps: publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' goals: 'package' + +- script: cp target/*.jar $(Build.ArtifactStagingDirectory) + +- task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)' + artifact: 'jar-file' \ No newline at end of file From d786bf9a2fd388b61bf1b0b21d72ce9d52c98d43 Mon Sep 17 00:00:00 2001 From: Archer743 <61616845+Archer743@users.noreply.github.com> Date: Sun, 22 Mar 2026 12:25:36 +0200 Subject: [PATCH 4/9] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 30cbb3018..56acebe30 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,9 +22,11 @@ steps: testResultsFiles: '**/surefire-reports/TEST-*.xml' goals: 'package' -- script: cp target/*.jar $(Build.ArtifactStagingDirectory) +- script: | + mkdir -p $(Build.ArtifactStagingDirectory) + cp target/*.war $(Build.ArtifactStagingDirectory) - task: PublishPipelineArtifact@1 inputs: targetPath: '$(Build.ArtifactStagingDirectory)' - artifact: 'jar-file' \ No newline at end of file + artifact: 'webapp' \ No newline at end of file From 6f4b42dd9bec2a5802d7942dd695aed38ce0a5a9 Mon Sep 17 00:00:00 2001 From: Archer743 <61616845+Archer743@users.noreply.github.com> Date: Sun, 22 Mar 2026 12:39:34 +0200 Subject: [PATCH 5/9] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 56acebe30..a515c632d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,7 +11,7 @@ pool: vmImage: ubuntu-latest steps: -- task: Maven@3 +- task: Maven@4 inputs: mavenPomFile: 'pom.xml' mavenOptions: '-Xmx3072m' From 1a039f135dec2fcd078ff6c6e8c97cf3aeac7525 Mon Sep 17 00:00:00 2001 From: Archer743 <61616845+Archer743@users.noreply.github.com> Date: Sun, 22 Mar 2026 17:14:18 +0200 Subject: [PATCH 6/9] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a515c632d..5cee09793 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,6 +7,10 @@ trigger: - main - feature/* +# Pull Requests targeting the main branch +pr: +- main + pool: vmImage: ubuntu-latest From 87556feb24fbd6128e916e0bb75be2e1212b712f Mon Sep 17 00:00:00 2001 From: Archer743 <61616845+Archer743@users.noreply.github.com> Date: Sun, 22 Mar 2026 21:10:39 +0200 Subject: [PATCH 7/9] Add a variable group to the Azure pipeline --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5cee09793..f5b67832b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,6 +3,9 @@ # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/java +variables: +- group: first-var-group + trigger: - main - feature/* @@ -15,6 +18,9 @@ pool: vmImage: ubuntu-latest steps: +- bash: | + echo "Environment: $(env)" + echo "Password: $(password)" - task: Maven@4 inputs: mavenPomFile: 'pom.xml' From ffbf3061094cd13af0d7decd2fcf70a52445a4be Mon Sep 17 00:00:00 2001 From: Archer743 Date: Sun, 22 Mar 2026 22:38:41 +0200 Subject: [PATCH 8/9] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f5b67832b..f7cbca04e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,6 +21,7 @@ steps: - bash: | echo "Environment: $(env)" echo "Password: $(password)" + - task: Maven@4 inputs: mavenPomFile: 'pom.xml' From 739d80ee8c3c9fc37c42fa0bea87c233930a0aea Mon Sep 17 00:00:00 2001 From: Archer743 Date: Sun, 22 Mar 2026 22:40:40 +0200 Subject: [PATCH 9/9] Add test.txt --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 000000000..e69de29bb