diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3e67588 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM tomcat:9.0-jdk11-openjdk +WORKDIR $CATALINA_HOME/webapps/ +COPY target/SimpleTomcatWebApp.war /usr/local/tomcat/webapps/SimpleTomcatWebApp.war +EXPOSE 8080 +CMD ["catalina.sh", "run"] diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..630248b --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,31 @@ +# 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: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: Maven@3 + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '11' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'package' +- task: CopyFiles@2 + inputs: + Contents: '**/*.war' + TargetFolder: +- task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'java' + publishLocation: 'Container'