diff --git a/README.md b/README.md index 206b83e..df6a7fe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # XIV Stats Gatherer (Java) # -[![Build Status](https://ci.reidweb.com/job/XIVStats/job/XIVStats-Gatherer-Java/job/master/badge/icon)](https://mygitlab.org:4043/job/XIVStats/job/XIVStats-Gatherer-Java/job/master/) +[![Build Status](https://dev.azure.com/xivstats/XIVStats-Gatherer-Java/_apis/build/status/XIVStats.XIVStats-Gatherer-Java?branchName=master)](https://dev.azure.com/xivstats/XIVStats-Gatherer-Java/_build/latest?definitionId=1&branchName=master) [![codecov.io](https://codecov.io/github/XIVStats/XIVStats-Gatherer-Java/coverage.svg?branch=master)](https://codecov.io/github/XIVStats/XIVStats-Gatherer-Java?branch=master) XIVStats Gatherer Java is a multi threaded Java program with the purpose of diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..2def72e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,50 @@ + # Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + + +pool: + vmImage: 'ubuntu-16.04' + +steps: +- task: Maven@3 + displayName: 'Build' + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: false + testResultsFiles: '**/TEST-*.xml' + goals: 'package' + +- script: | + mkdir - p target/release + cp target/*.jar target/release/XIVStats-Gatherer-Java.jar + cp config_example.xml target/release + zip -r XIVStats-Gatherer-Java.zip target/release/ + displayName: zip + +- task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/XIVStats-Gatherer-Java.zip' + ArtifactName: 'artifacts' + +- script: | + cp config_example.xml config.xml + sed -i -e "s/mysql:\/\/localhost:3306/$(hostUri)/" -e "s/value/$(password)/" -e "s/xivstats/$(username)/" -e "s/dbplayers/$(database)/" -e "s/32/$(threads)/" config.xml + displayName: 'Prepare for test' + +- task: Maven@3 + displayName: 'Test' + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/TEST-*.xml' + goals: 'verify' diff --git a/config_example.xml b/config_example.xml index eaefe79..e1c7e8d 100644 --- a/config_example.xml +++ b/config_example.xml @@ -4,7 +4,7 @@ mysql://localhost:3306 dbplayers xivstats - password + value 32