Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up CI with Azure Pipelines #48

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
50 changes: 50 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion config_example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<url>mysql://localhost:3306</url>
<database>dbplayers</database>
<username>xivstats</username>
<password>password</password>
<password>value</password>
</jdbc>
<execution>
<threads>32</threads>
Expand Down