From 588bc6e93c93faded396c0f3f912b7aeefb5b410 Mon Sep 17 00:00:00 2001 From: barani-aj6575 <106611326+barani-aj6575@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:33:33 +0530 Subject: [PATCH 1/4] Delete azure-pipelines-1.yml --- azure-pipelines-1.yml | 68 ------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml deleted file mode 100644 index 9060868..0000000 --- a/azure-pipelines-1.yml +++ /dev/null @@ -1,68 +0,0 @@ -# Maven package Java project Web App to Linux on Azure -# Build your Java project and deploy it to Azure as a Linux web app -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/java - -trigger: -- main - -variables: - - # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'adaa8ff0-8a2a-4d1a-bd3a-5e8ca98427d0' - - # Web app name - webAppName: 'javawebapp0001' - - # Environment name - environmentName: 'javawebapp0001' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - -stages: -- stage: Build - displayName: Build stage - jobs: - - job: MavenPackageAndPublishArtifacts - displayName: Maven Package and Publish Artifacts - pool: - vmImage: $(vmImageName) - - steps: - - task: Maven@3 - displayName: 'Maven Package' - inputs: - mavenPomFile: 'pom.xml' - - - task: CopyFiles@2 - displayName: 'Copy Files to artifact staging directory' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)' - Contents: '**/target/*.?(war|jar)' - TargetFolder: $(Build.ArtifactStagingDirectory) - - - upload: $(Build.ArtifactStagingDirectory) - artifact: drop - -- stage: Deploy - displayName: Deploy stage - dependsOn: Build - condition: succeeded() - jobs: - - deployment: DeployLinuxWebApp - displayName: Deploy Linux Web App - environment: $(environmentName) - pool: - vmImage: $(vmImageName) - strategy: - runOnce: - deploy: - steps: - - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: javawebapp0001' - inputs: - azureSubscription: $(azureSubscription) - appType: webAppLinux - appName: $(webAppName) - package: '$(Pipeline.Workspace)/drop/**/target/*.?(war|jar)' From 5bef88201d4da9ee9e84f6542e4376ed1d1b0ee8 Mon Sep 17 00:00:00 2001 From: barani-aj6575 <106611326+barani-aj6575@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:33:43 +0530 Subject: [PATCH 2/4] Delete azure-pipelines-2.yml --- azure-pipelines-2.yml | 68 ------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 azure-pipelines-2.yml diff --git a/azure-pipelines-2.yml b/azure-pipelines-2.yml deleted file mode 100644 index f128292..0000000 --- a/azure-pipelines-2.yml +++ /dev/null @@ -1,68 +0,0 @@ -# Maven package Java project Web App to Linux on Azure -# Build your Java project and deploy it to Azure as a Linux web app -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/java - -trigger: -- main - -variables: - - # Azure Resource Manager connection created during pipeline creation - azureSubscription: '4357536e-4204-46b2-9d77-db07b174bb06' - - # Web app name - webAppName: 'javawebapp0001' - - # Environment name - environmentName: 'javawebapp0001' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - -stages: -- stage: Build - displayName: Build stage - jobs: - - job: MavenPackageAndPublishArtifacts - displayName: Maven Package and Publish Artifacts - pool: - vmImage: $(vmImageName) - - steps: - - task: Maven@3 - displayName: 'Maven Package' - inputs: - mavenPomFile: 'pom.xml' - - - task: CopyFiles@2 - displayName: 'Copy Files to artifact staging directory' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)' - Contents: '**/target/*.?(war|jar)' - TargetFolder: $(Build.ArtifactStagingDirectory) - - - upload: $(Build.ArtifactStagingDirectory) - artifact: drop - -- stage: Deploy - displayName: Deploy stage - dependsOn: Build - condition: succeeded() - jobs: - - deployment: DeployLinuxWebApp - displayName: Deploy Linux Web App - environment: $(environmentName) - pool: - vmImage: $(vmImageName) - strategy: - runOnce: - deploy: - steps: - - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: javawebapp0001' - inputs: - azureSubscription: $(azureSubscription) - appType: webAppLinux - appName: $(webAppName) - package: '$(Pipeline.Workspace)/drop/**/target/*.?(war|jar)' From 798e228a396da2f3b31c3103dedaa1584df209b6 Mon Sep 17 00:00:00 2001 From: barani-aj6575 <106611326+barani-aj6575@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:33:52 +0530 Subject: [PATCH 3/4] Delete azure-pipelines.yml --- azure-pipelines.yml | 68 --------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 3932501..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,68 +0,0 @@ -# Maven package Java project Web App to Linux on Azure -# Build your Java project and deploy it to Azure as a Linux web app -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/java - -trigger: -- main - -variables: - - # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'b01f618b-6bf9-4e92-bc72-4a6515175c4c' - - # Web app name - webAppName: 'app0021' - - # Environment name - environmentName: 'app0021' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - -stages: -- stage: Build - displayName: Build stage - jobs: - - job: MavenPackageAndPublishArtifacts - displayName: Maven Package and Publish Artifacts - pool: - vmImage: $(vmImageName) - - steps: - - task: Maven@3 - displayName: 'Maven Package' - inputs: - mavenPomFile: 'pom.xml' - - - task: CopyFiles@2 - displayName: 'Copy Files to artifact staging directory' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)' - Contents: '**/target/*.?(war|jar)' - TargetFolder: $(Build.ArtifactStagingDirectory) - - - upload: $(Build.ArtifactStagingDirectory) - artifact: drop - -- stage: Deploy - displayName: Deploy stage - dependsOn: Build - condition: succeeded() - jobs: - - deployment: DeployLinuxWebApp - displayName: Deploy Linux Web App - environment: $(environmentName) - pool: - vmImage: $(vmImageName) - strategy: - runOnce: - deploy: - steps: - - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: app90888' - inputs: - azureSubscription: $(azureSubscription) - appType: webAppLinux - appName: $(webAppName) - package: '$(Pipeline.Workspace)/drop/**/target/*.?(war|jar)' From 291234fd00305cba47c9c05d049fb65fe399274e Mon Sep 17 00:00:00 2001 From: barani-aj6575 <106611326+barani-aj6575@users.noreply.github.com> Date: Mon, 13 Nov 2023 21:13:12 +0530 Subject: [PATCH 4/4] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 68 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..0bb2589 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,68 @@ +# Maven package Java project Web App to Linux on Azure +# Build your Java project and deploy it to Azure as a Linux web app +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/java + +trigger: +- main + +variables: + + # Azure Resource Manager connection created during pipeline creation + azureSubscription: 'c42dfeb9-1115-4374-9340-24b9c1b66eec' + + # Web app name + webAppName: 'javawebappbar' + + # Environment name + environmentName: 'javawebappbar' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: MavenPackageAndPublishArtifacts + displayName: Maven Package and Publish Artifacts + pool: + vmImage: $(vmImageName) + + steps: + - task: Maven@3 + displayName: 'Maven Package' + inputs: + mavenPomFile: 'pom.xml' + + - task: CopyFiles@2 + displayName: 'Copy Files to artifact staging directory' + inputs: + SourceFolder: '$(System.DefaultWorkingDirectory)' + Contents: '**/target/*.?(war|jar)' + TargetFolder: $(Build.ArtifactStagingDirectory) + + - upload: $(Build.ArtifactStagingDirectory) + artifact: drop + +- stage: Deploy + displayName: Deploy stage + dependsOn: Build + condition: succeeded() + jobs: + - deployment: DeployLinuxWebApp + displayName: Deploy Linux Web App + environment: $(environmentName) + pool: + vmImage: $(vmImageName) + strategy: + runOnce: + deploy: + steps: + - task: AzureWebApp@1 + displayName: 'Azure Web App Deploy: javawebappbar' + inputs: + azureSubscription: $(azureSubscription) + appType: webAppLinux + appName: $(webAppName) + package: '$(Pipeline.Workspace)/drop/**/target/*.?(war|jar)'