-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from DiamondLightSource/azure-pipelines
Set up CI with Azure Pipelines
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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 | ||
|
||
variables: # pipeline-level | ||
MYSQL_ROOT_PASSWORD: mysql_root_pwd | ||
|
||
trigger: | ||
- master | ||
|
||
resources: | ||
containers: | ||
- container: mariadb | ||
image: mariadb:10.5 | ||
env: | ||
MYSQL_DATABASE: ispybtest | ||
MYSQL_ROOT_PASSWORD: $(MYSQL_ROOT_PASSWORD) | ||
ports: | ||
- 3306:3306 | ||
|
||
pool: | ||
vmImage: ubuntu-20.04 | ||
|
||
stages: | ||
- stage: build | ||
displayName: Build | ||
dependsOn: | ||
jobs: | ||
- job: build | ||
displayName: build package | ||
pool: | ||
vmImage: ubuntu-20.04 | ||
services: | ||
db: mariadb | ||
steps: | ||
- task: Maven@3 | ||
inputs: | ||
mavenPomFile: 'pom.xml' | ||
mavenOptions: '-Xmx3072m' | ||
options: '-Dispyb.url="jdbc:mariadb://127.0.0.1:3306" -Dispyb.user=root -Dispyb.pw="$(MYSQL_ROOT_PASSWORD)" -Dispyb.host=127.0.0.1' | ||
javaHomeOption: 'JDKVersion' | ||
jdkVersionOption: '1.8' | ||
jdkArchitectureOption: 'x64' | ||
publishJUnitResults: true | ||
testResultsFiles: '**/surefire-reports/TEST-*.xml' | ||
goals: 'package' |