CI/CD for JakartaEE examples

As part of on boarding with my current employer (Microsoft) I am getting familiar with the Azure technology stack and I was pleasantly surprised that it has a free solution for CI/CD for open source projects. As the Manorrock JakartaEE examples GitHub repository is open source and we did not setup an automated CI/CD for it I felt it was time to take the plunge on that!

The first step was adding the azure-pipelines.yml file to get the examples to compile.

# 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: '1.8'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: false
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: 'package'
        

The second step was adding another step to the azure-pipelines.yml file to run the tests against Glassfish.

- task: Maven@3
  inputs:
    mavenPomFile: 'pom.xml'
    mavenOptions: '-Xmx3072m'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: false
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: '-P glassfish5 verify'
        

More servers will be added in the future and contributions for those are highly desired so feel free to help us out!

So for any contributors this means they can see if their contribution passes all the tests as part of the pull request process. E.g. see the PR that enabled all this.

Posted June 6th, 2019

Up