From f6b2e99b5eba5cffaecb1bbbfedba73f0e51fa57 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Tue, 20 Feb 2024 11:48:19 +0530 Subject: [PATCH 01/31] added .pipelines --- .devcontainer/Dockerfile | 8 +++++ .devcontainer/devcontainer.json | 15 ++++++++ .pipelines/lib/app/jobs/build/build.yml | 11 ++++++ .pipelines/lib/app/stages/build/build.yml | 22 ++++++++++++ .pipelines/production/pr_develop.yml | 42 +++++++++++++++++++++++ .pipelines/vars/global_variables.yml | 3 ++ 6 files changed, 101 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .pipelines/lib/app/jobs/build/build.yml create mode 100644 .pipelines/lib/app/stages/build/build.yml create mode 100644 .pipelines/production/pr_develop.yml create mode 100644 .pipelines/vars/global_variables.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..5670fa30 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,8 @@ +ARG DOCKER_BASE_IMAGE="ubuntu:latest" +FROM ${DOCKER_BASE_IMAGE} + +RUN apt update + + +ENTRYPOINT ["tail", "-f", "/dev/null"] + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..c55e9ac3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "name": "Spring Framework Petclinic", + "build": { + "dockerfile": "Dockerfile", + "context": ".", + "args": { + "USERNAME": "${localEnv:USER}" + } + }, + "containerEnv": { + "USER": "${localEnv:USER}" + } + + +} diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml new file mode 100644 index 00000000..eba92747 --- /dev/null +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -0,0 +1,11 @@ +parameters: +- name: APP + type: object +steps: +- bash: + echo $PWD + cd $PWD + cd ../ + echo $PWD + mvn clean install + \ No newline at end of file diff --git a/.pipelines/lib/app/stages/build/build.yml b/.pipelines/lib/app/stages/build/build.yml new file mode 100644 index 00000000..7bfe8f8d --- /dev/null +++ b/.pipelines/lib/app/stages/build/build.yml @@ -0,0 +1,22 @@ +parameters: +- name: APP + type: object +stages: +- stage: build_${{ parameters.APP.name }} + displayName: Build pet clinic app + jobs: + - job: build_${{ parameters.APP.name }} + pool: + name: $[ variables.${{ parameters.APP.build.pool }}] + workspace: + clean: all + container: default_image + condition: eq(${{ parameters.APP.build.enabled }}, 'true') + steps: + - checkout: self + clean: true + submodules: recursive + path: $(code_repo_name) + - template: ../../jobs/build/build.yml + parameters: + APP: ${{ parameters.APP }} \ No newline at end of file diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml new file mode 100644 index 00000000..b8e8df56 --- /dev/null +++ b/.pipelines/production/pr_develop.yml @@ -0,0 +1,42 @@ +# 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: none +pr: + branches: + include: + - main +parameters: + - name: DOCKER_BUILD_IMAGE + displayName: Docker image + type: string + default: 'openjdk:22-ea-17-oracle' + - name: PET_CLINIC_APP + displayName: Petclinic + type: object + default: + - name: petClinic + build: + enabled: true + setup_env: ../../../custom/jobs/build/setup_env_build.yml + docker_image: default_image + pool: default_pool + + +resources: + containers: + - container: default_image + image: ${{ parameters.DOCKER_BUILD_IMAGE }} +variables: +- name: default_pool + value: 'Azure Pipelines' +stages: +- ${{ each app in parameters.PET_CLINIC_APP }}: + - template: ../lib/app/stages/build/build.yml + parameters: + APP: ${{ app }} + + + diff --git a/.pipelines/vars/global_variables.yml b/.pipelines/vars/global_variables.yml new file mode 100644 index 00000000..ae12f06a --- /dev/null +++ b/.pipelines/vars/global_variables.yml @@ -0,0 +1,3 @@ +variables: + code_repo_name: spring-framework-petclinic + \ No newline at end of file From 7f27b3d911b0a647199658e5027a6574eec0649c Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Tue, 20 Feb 2024 12:00:40 +0530 Subject: [PATCH 02/31] IMage changed --- .pipelines/production/pr_develop.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index b8e8df56..e79b176f 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -12,12 +12,12 @@ parameters: - name: DOCKER_BUILD_IMAGE displayName: Docker image type: string - default: 'openjdk:22-ea-17-oracle' - - name: PET_CLINIC_APP + default: 'gnishanth777/springapp:1.4.0' + - name: JAVA_APP displayName: Petclinic type: object default: - - name: petClinic + - name: javaApp build: enabled: true setup_env: ../../../custom/jobs/build/setup_env_build.yml From aa65a9bc316519b13f20409a8aeafd54ed70f84f Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Tue, 20 Feb 2024 12:28:58 +0530 Subject: [PATCH 03/31] names corrected --- .pipelines/lib/app/stages/build/build.yml | 2 +- .pipelines/production/pr_develop.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/lib/app/stages/build/build.yml b/.pipelines/lib/app/stages/build/build.yml index 7bfe8f8d..911893e9 100644 --- a/.pipelines/lib/app/stages/build/build.yml +++ b/.pipelines/lib/app/stages/build/build.yml @@ -3,7 +3,7 @@ parameters: type: object stages: - stage: build_${{ parameters.APP.name }} - displayName: Build pet clinic app + displayName: BuildJavaApp jobs: - job: build_${{ parameters.APP.name }} pool: diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index e79b176f..e777e8d5 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -14,7 +14,7 @@ parameters: type: string default: 'gnishanth777/springapp:1.4.0' - name: JAVA_APP - displayName: Petclinic + displayName: JavaApp type: object default: - name: javaApp @@ -33,7 +33,7 @@ variables: - name: default_pool value: 'Azure Pipelines' stages: -- ${{ each app in parameters.PET_CLINIC_APP }}: +- ${{ each app in parameters.JAVA_APP }}: - template: ../lib/app/stages/build/build.yml parameters: APP: ${{ app }} From 8402f4fb54ade38c4329e691defb564497d683bc Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Tue, 20 Feb 2024 12:32:01 +0530 Subject: [PATCH 04/31] names corrected --- .pipelines/vars/global_variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/vars/global_variables.yml b/.pipelines/vars/global_variables.yml index ae12f06a..38c1087b 100644 --- a/.pipelines/vars/global_variables.yml +++ b/.pipelines/vars/global_variables.yml @@ -1,3 +1,3 @@ variables: - code_repo_name: spring-framework-petclinic + code_repo_name: simple-java-project \ No newline at end of file From bd884982092c30fcbc99f64f83f3b407a08ae80f Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Tue, 20 Feb 2024 13:35:32 +0530 Subject: [PATCH 05/31] names corrected --- .pipelines/lib/app/jobs/build/build.yml | 6 +----- .pipelines/lib/app/stages/build/build.yml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index eba92747..f3c5c573 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -3,9 +3,5 @@ parameters: type: object steps: - bash: - echo $PWD - cd $PWD - cd ../ - echo $PWD - mvn clean install + mvn clean install \ No newline at end of file diff --git a/.pipelines/lib/app/stages/build/build.yml b/.pipelines/lib/app/stages/build/build.yml index 911893e9..79027170 100644 --- a/.pipelines/lib/app/stages/build/build.yml +++ b/.pipelines/lib/app/stages/build/build.yml @@ -16,7 +16,7 @@ stages: - checkout: self clean: true submodules: recursive - path: $(code_repo_name) + #path: $(code_repo_name) - template: ../../jobs/build/build.yml parameters: APP: ${{ parameters.APP }} \ No newline at end of file From 9bb3bbe2da18cbfcebd4fd85871f0824bba941f4 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Tue, 20 Feb 2024 13:39:36 +0530 Subject: [PATCH 06/31] names corrected --- .pipelines/lib/app/jobs/build/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index f3c5c573..e2bbdce4 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -3,5 +3,6 @@ parameters: type: object steps: - bash: - mvn clean install + mvn clean install -Dmaven.test.skip=true + displayName: Build the code \ No newline at end of file From f0dedaf280d9ddf41d6d7fcfd6fc09f20aff713c Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:16:03 +0530 Subject: [PATCH 07/31] artifact publish enabled --- .pipelines/lib/app/jobs/build/build.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index e2bbdce4..2be597d9 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -1,8 +1,19 @@ parameters: - name: APP type: object + +- name: PUBLISH + type: boolean + default: True steps: - bash: mvn clean install -Dmaven.test.skip=true - displayName: Build the code + mkdir $(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }} + cp target/works-with-heroku-1.0.war $(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }} + displayName: Build the code + +- ${{ if eq(parameters.PUBLISH, 'True') }}: + - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }}' + artifact: BUILD_${{ parameters.APP.name }} + displayName: Publish Artifacts ${{ parameters.APP.name }} \ No newline at end of file From 90c3db47e55271e3d90cc938e35aae3dc1cdb06e Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:21:00 +0530 Subject: [PATCH 08/31] publish artifacts added --- .pipelines/lib/app/jobs/build/build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 2be597d9..4646af10 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -1,17 +1,21 @@ parameters: - name: APP type: object - + - name: PUBLISH type: boolean default: True steps: - bash: mvn clean install -Dmaven.test.skip=true - mkdir $(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }} - cp target/works-with-heroku-1.0.war $(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }} displayName: Build the code +- task: CopyFiles@2 + displayName: 'Copy Artifacts' + inputs: + contents: 'target/works-with-heroku-1.0.war' + targetFolder: '$(Build.ArtifactStagingDirectory)' + - ${{ if eq(parameters.PUBLISH, 'True') }}: - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }}' artifact: BUILD_${{ parameters.APP.name }} From 56ae6879d42f6ea9aa253cf29c2b9675a35fdb85 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:23:59 +0530 Subject: [PATCH 09/31] publish artifacts --- .pipelines/lib/app/jobs/build/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 4646af10..c67c01ae 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -14,7 +14,7 @@ steps: displayName: 'Copy Artifacts' inputs: contents: 'target/works-with-heroku-1.0.war' - targetFolder: '$(Build.ArtifactStagingDirectory)' + targetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.APP.name }}' - ${{ if eq(parameters.PUBLISH, 'True') }}: - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }}' From 31624d673269bdfad7648e46f73758b467e739de Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:33:20 +0530 Subject: [PATCH 10/31] publish artifacts --- .pipelines/lib/app/jobs/build/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index c67c01ae..4218d8cc 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -14,10 +14,10 @@ steps: displayName: 'Copy Artifacts' inputs: contents: 'target/works-with-heroku-1.0.war' - targetFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.APP.name }}' + targetFolder: '$(Build.ArtifactStagingDirectory)' - ${{ if eq(parameters.PUBLISH, 'True') }}: - - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }}' - artifact: BUILD_${{ parameters.APP.name }} + - publish: '$(Build.ArtifactoryStagingDirectory)' + artifact: ${{ parameters.APP.name }} displayName: Publish Artifacts ${{ parameters.APP.name }} \ No newline at end of file From afe92c883b7cd942a6205054495f4486f816b5b0 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:37:35 +0530 Subject: [PATCH 11/31] publish artifacts --- .pipelines/lib/app/jobs/build/build.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 4218d8cc..3443488a 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -10,14 +10,8 @@ steps: mvn clean install -Dmaven.test.skip=true displayName: Build the code -- task: CopyFiles@2 - displayName: 'Copy Artifacts' - inputs: - contents: 'target/works-with-heroku-1.0.war' - targetFolder: '$(Build.ArtifactStagingDirectory)' - - ${{ if eq(parameters.PUBLISH, 'True') }}: - - publish: '$(Build.ArtifactoryStagingDirectory)' - artifact: ${{ parameters.APP.name }} + - publish: '$(Build.ArtifactoryStagingDirectory)/target/*.war' + artifact: BUILD_${{ parameters.APP.name }} displayName: Publish Artifacts ${{ parameters.APP.name }} \ No newline at end of file From ae478893861ed016154f9aeeff325caa1c046dd7 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:41:56 +0530 Subject: [PATCH 12/31] publish artifacts modified --- .pipelines/lib/app/jobs/build/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 3443488a..6ae60d41 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -10,8 +10,15 @@ steps: mvn clean install -Dmaven.test.skip=true displayName: Build the code +- task: CopyFiles@2 + displayName: Copy Artifacts from local to staging + inputs: + SourceFolder: $(Build.Repository.LocalPath)/target + Contents: '*.war' + TargetFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.VARIANT.name }} + - ${{ if eq(parameters.PUBLISH, 'True') }}: - - publish: '$(Build.ArtifactoryStagingDirectory)/target/*.war' + - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.VARIANT.name }}' artifact: BUILD_${{ parameters.APP.name }} displayName: Publish Artifacts ${{ parameters.APP.name }} \ No newline at end of file From 8f191c654e2e7ebd2ced45d4fe4bcdd6f647d056 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:42:39 +0530 Subject: [PATCH 13/31] publish artifacts modified --- .pipelines/lib/app/jobs/build/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 6ae60d41..97b9b1bc 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -15,10 +15,10 @@ steps: inputs: SourceFolder: $(Build.Repository.LocalPath)/target Contents: '*.war' - TargetFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.VARIANT.name }} + TargetFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.APP.name }} - ${{ if eq(parameters.PUBLISH, 'True') }}: - - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.VARIANT.name }}' + - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }}' artifact: BUILD_${{ parameters.APP.name }} displayName: Publish Artifacts ${{ parameters.APP.name }} \ No newline at end of file From 911574ec8b5ea9eb34a483e47a33eda070a55405 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 12:49:07 +0530 Subject: [PATCH 14/31] publish artifacts modified --- .pipelines/lib/app/jobs/build/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 97b9b1bc..6237d457 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -18,7 +18,7 @@ steps: TargetFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.APP.name }} - ${{ if eq(parameters.PUBLISH, 'True') }}: - - publish: '$(Build.ArtifactoryStagingDirectory)/${{ parameters.APP.name }}' + - publish: '$(Build.ArtifactStagingDirectory)/${{ parameters.APP.name }}' artifact: BUILD_${{ parameters.APP.name }} displayName: Publish Artifacts ${{ parameters.APP.name }} \ No newline at end of file From ce0ed417372a21d04460674ebd694996f72ef745 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:06:32 +0530 Subject: [PATCH 15/31] image changed --- .pipelines/lib/custom/jobs/build/setup_build_env.yml | 6 ++++++ .pipelines/production/pr_develop.yml | 2 +- pom.xml | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .pipelines/lib/custom/jobs/build/setup_build_env.yml diff --git a/.pipelines/lib/custom/jobs/build/setup_build_env.yml b/.pipelines/lib/custom/jobs/build/setup_build_env.yml new file mode 100644 index 00000000..15aa1726 --- /dev/null +++ b/.pipelines/lib/custom/jobs/build/setup_build_env.yml @@ -0,0 +1,6 @@ +steps: +- bash: + cd /scripts + chmod +x script.sh + ./script.sh +displayName: setup env for maven \ No newline at end of file diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index e777e8d5..d8ba8c8f 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -12,7 +12,7 @@ parameters: - name: DOCKER_BUILD_IMAGE displayName: Docker image type: string - default: 'gnishanth777/springapp:1.4.0' + default: 'gnishanth777/spring:1.5.0' - name: JAVA_APP displayName: JavaApp type: object diff --git a/pom.xml b/pom.xml index 19f98e41..13cbcdf9 100644 --- a/pom.xml +++ b/pom.xml @@ -6,6 +6,16 @@ works-with-heroku 1.0 war + + udz1kor + https://pkgs.dev.azure.com/udz1kor/_packaging/udz1kor/maven/v1 + + true + + + true + + javax.servlet From 25f2f78913974efca90805d4a0e18ee7c48023ed Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:07:53 +0530 Subject: [PATCH 16/31] image changed --- .pipelines/production/pr_develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index d8ba8c8f..77352751 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -20,7 +20,7 @@ parameters: - name: javaApp build: enabled: true - setup_env: ../../../custom/jobs/build/setup_env_build.yml + setup_env: ../../../custom/jobs/build/setup_build_env.yml docker_image: default_image pool: default_pool From d6af93828f9ed80d78322d9c0750461d51bd957e Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:13:03 +0530 Subject: [PATCH 17/31] pom modified --- pom.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 13cbcdf9..1c7b54b8 100644 --- a/pom.xml +++ b/pom.xml @@ -6,16 +6,18 @@ works-with-heroku 1.0 war + - udz1kor - https://pkgs.dev.azure.com/udz1kor/_packaging/udz1kor/maven/v1 - + udz1kor + https://pkgs.dev.azure.com/udz1kor/_packaging/udz1kor/maven/v1 + true - - + + true - - + + + javax.servlet From fee844200da59e8cc6a4326a9198f4c445564060 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:13:42 +0530 Subject: [PATCH 18/31] pom modified --- .pipelines/lib/app/jobs/build/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 6237d457..1cb1fb5b 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -7,7 +7,7 @@ parameters: default: True steps: - bash: - mvn clean install -Dmaven.test.skip=true + mvn clean deploy -Dmaven.test.skip=true displayName: Build the code - task: CopyFiles@2 From 2fe5fcaaa141ed27860bf9ccfcc2dd209e5e40bb Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:18:33 +0530 Subject: [PATCH 19/31] pom.xml modified --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1c7b54b8..e2288f64 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ works-with-heroku 1.0 war - + udz1kor https://pkgs.dev.azure.com/udz1kor/_packaging/udz1kor/maven/v1 @@ -17,7 +17,7 @@ true - + javax.servlet From 2846986b1b1f7d79b729105d40fc89d38d63f356 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:19:43 +0530 Subject: [PATCH 20/31] setup script added modified --- .pipelines/lib/app/jobs/build/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 1cb1fb5b..418ce588 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -6,6 +6,10 @@ parameters: type: boolean default: True steps: + +- ${{ if ne(parameters.VARIANT.build.setup_env, 'none') }}: + - template: ${{ parameters.VARIANT.build.setup_env }} + - bash: mvn clean deploy -Dmaven.test.skip=true displayName: Build the code From 8ea511dee419424177b26247f0a99108ec2858ff Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:20:22 +0530 Subject: [PATCH 21/31] setup script added modified --- .pipelines/lib/app/jobs/build/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index 418ce588..cf4f4027 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -8,8 +8,8 @@ parameters: steps: - ${{ if ne(parameters.VARIANT.build.setup_env, 'none') }}: - - template: ${{ parameters.VARIANT.build.setup_env }} - + - template: ${{ parameters.APP.build.setup_env }} + - bash: mvn clean deploy -Dmaven.test.skip=true displayName: Build the code From c9d99037a19d51fbd0214c47b88f0f56dd8b60c9 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:22:14 +0530 Subject: [PATCH 22/31] pom.xml modified --- .pipelines/lib/app/jobs/build/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index cf4f4027..aa205427 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -7,7 +7,7 @@ parameters: default: True steps: -- ${{ if ne(parameters.VARIANT.build.setup_env, 'none') }}: +- ${{ if ne(parameters.APP.build.setup_env, 'none') }}: - template: ${{ parameters.APP.build.setup_env }} - bash: From 2c0ab93a222bd6a2784f4160079b683e9ec39a93 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:23:43 +0530 Subject: [PATCH 23/31] setup script added modified --- .pipelines/production/pr_develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index 77352751..6019e3e4 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -20,7 +20,7 @@ parameters: - name: javaApp build: enabled: true - setup_env: ../../../custom/jobs/build/setup_build_env.yml + setup_env: ../../custom/jobs/build/setup_build_env.yml docker_image: default_image pool: default_pool From ddb4e279d206dc215edc7ca13d5f369a671373c7 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:25:25 +0530 Subject: [PATCH 24/31] setup script added modified --- .pipelines/lib/custom/jobs/build/setup_build_env.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pipelines/lib/custom/jobs/build/setup_build_env.yml b/.pipelines/lib/custom/jobs/build/setup_build_env.yml index 15aa1726..4d736fbb 100644 --- a/.pipelines/lib/custom/jobs/build/setup_build_env.yml +++ b/.pipelines/lib/custom/jobs/build/setup_build_env.yml @@ -1,6 +1,6 @@ steps: -- bash: - cd /scripts - chmod +x script.sh - ./script.sh +- bash: | + cd /scripts + chmod +x script.sh + ./script.sh displayName: setup env for maven \ No newline at end of file From 2e271f590885671882a6bdd4fbb003377466e431 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:26:11 +0530 Subject: [PATCH 25/31] setup script added modified --- .pipelines/lib/custom/jobs/build/setup_build_env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/lib/custom/jobs/build/setup_build_env.yml b/.pipelines/lib/custom/jobs/build/setup_build_env.yml index 4d736fbb..fcfae9ce 100644 --- a/.pipelines/lib/custom/jobs/build/setup_build_env.yml +++ b/.pipelines/lib/custom/jobs/build/setup_build_env.yml @@ -3,4 +3,4 @@ steps: cd /scripts chmod +x script.sh ./script.sh -displayName: setup env for maven \ No newline at end of file + displayName: Setup env for Maven \ No newline at end of file From 71b47d56640b39d985b7bc802fff1e4221926792 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:33:54 +0530 Subject: [PATCH 26/31] setup script added modified --- .pipelines/production/pr_develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index 6019e3e4..629a532c 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -12,7 +12,7 @@ parameters: - name: DOCKER_BUILD_IMAGE displayName: Docker image type: string - default: 'gnishanth777/spring:1.5.0' + default: 'gnishanth777/spring:1.6.0' - name: JAVA_APP displayName: JavaApp type: object From bf61a8fb2a321e278b6ec5d1ce6b9fdb20b8c7b4 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:41:15 +0530 Subject: [PATCH 27/31] setup script added modified --- .pipelines/production/pr_develop.yml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index 629a532c..c00a4229 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -12,7 +12,7 @@ parameters: - name: DOCKER_BUILD_IMAGE displayName: Docker image type: string - default: 'gnishanth777/spring:1.6.0' + default: 'gnishanth777/spring:1.7.0' - name: JAVA_APP displayName: JavaApp type: object diff --git a/pom.xml b/pom.xml index e2288f64..06600f84 100644 --- a/pom.xml +++ b/pom.xml @@ -8,8 +8,8 @@ war - udz1kor - https://pkgs.dev.azure.com/udz1kor/_packaging/udz1kor/maven/v1 + artifacts + https://pkgs.dev.azure.com/udz1kor/azurepipelinestest/_packaging/artifacts/maven/v1 true From 1df09781932d71505e5b9dea7924c3b3d258d237 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:48:09 +0530 Subject: [PATCH 28/31] setup script added modified --- .pipelines/production/pr_develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/production/pr_develop.yml b/.pipelines/production/pr_develop.yml index c00a4229..a916a197 100644 --- a/.pipelines/production/pr_develop.yml +++ b/.pipelines/production/pr_develop.yml @@ -12,7 +12,7 @@ parameters: - name: DOCKER_BUILD_IMAGE displayName: Docker image type: string - default: 'gnishanth777/spring:1.7.0' + default: 'gnishanth777/spring:1.8.0' - name: JAVA_APP displayName: JavaApp type: object From 49f6b9219c41f6df74bfc67ce990d230f311b282 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 15:57:02 +0530 Subject: [PATCH 29/31] pom.xml modified --- .pipelines/lib/app/jobs/build/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index aa205427..bee89b79 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -11,7 +11,7 @@ steps: - template: ${{ parameters.APP.build.setup_env }} - bash: - mvn clean deploy -Dmaven.test.skip=true + mvn clean install deploy -Dmaven.test.skip=true displayName: Build the code - task: CopyFiles@2 From 3a2377cd5579bf7b4c49ccb16d3ed6fb38948ad8 Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 16:04:10 +0530 Subject: [PATCH 30/31] pom.xml modified --- .pipelines/lib/app/jobs/build/build.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index bee89b79..b2e9b074 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -10,9 +10,17 @@ steps: - ${{ if ne(parameters.APP.build.setup_env, 'none') }}: - template: ${{ parameters.APP.build.setup_env }} -- bash: - mvn clean install deploy -Dmaven.test.skip=true - displayName: Build the code +- task: Maven@3 + inputs: + mavenPomFile: '/pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + mavenAuthenticateFeed: true + publishJUnitResults: false + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'deploy' - task: CopyFiles@2 displayName: Copy Artifacts from local to staging From 5ca79361d6d80eadc8fa36505b269c224247656c Mon Sep 17 00:00:00 2001 From: "Gundlapalle Nishanth (MS/ESW-TM-XC)" Date: Mon, 26 Feb 2024 16:08:52 +0530 Subject: [PATCH 31/31] pom.xml modified --- .pipelines/lib/app/jobs/build/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/lib/app/jobs/build/build.yml b/.pipelines/lib/app/jobs/build/build.yml index b2e9b074..593d930f 100644 --- a/.pipelines/lib/app/jobs/build/build.yml +++ b/.pipelines/lib/app/jobs/build/build.yml @@ -12,7 +12,7 @@ steps: - task: Maven@3 inputs: - mavenPomFile: '/pom.xml' + mavenPomFile: 'simple-java-project/pom.xml' mavenOptions: '-Xmx3072m' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.8'