diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..b3e4b1e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,44 @@ +# 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: + + + # Web app name + webAppName: 'javashopstaging' + + # Environment name + environmentName: 'javashopstaging' + + # Agent VM image name + vmImageName: 'ubuntu-20.04' + +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 \ No newline at end of file