Set up CI with Azure Pipelines (#768)

* Set up CI with Azure Pipelines
This commit is contained in:
Xiaolu Dai 2019-11-12 17:09:06 +08:00 коммит произвёл GitHub
Родитель 390d8fdfdc
Коммит 494bd896f7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 51 добавлений и 40 удалений

Просмотреть файл

@ -1,28 +0,0 @@
language: java
jdk:
- openjdk8
before_install:
- sudo apt-get -y install python3-pip python-dev
- echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
- curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- sudo apt-get install apt-transport-https
- sudo apt-get update && sudo apt-get install azure-cli
install: "./mvnw -B install -DskipTests=true"
script:
- chmod +x ./travis-wait-mvn-build.sh && ./travis-wait-mvn-build.sh
- cd azure-spring-boot-samples && chmod +x gradlew && ./gradlew build
env:
global:
# CLIENT_ID
- secure: L9FcXIEVqVNqwseh24uP+6FO5BQMNZquI0LGYt9w+c8WHtREu/GjtRea/vLOi/xHDa07SVz8WCva66EizmJLx53ZR0A67PIXpqyf+Xj3czEjEU9PbX3IV1g4tuNIB6bl9TnAm12IE0pPscTGrFxt6xHV/yZDpBRZ7bP0LLdY6BDiT75g4iw/0FqLq6SU9khAAVl7qdDQucP6UQ4o9F8/a7yw/MQI0l0xGoGzR3lwXK1mNuGogJY/u3Ko98n8RQk2Fchq88BFuQ0X4+60uTHNrvtAWndOCiASfVhaArP1ZWuqqwJAL0VOaaOvPH+qarkFFUL2jVfzcgiFVu9Vmgum6PSvB51EilzaHH/omxC4S2pq05jN0IqoSLxdgQRCEKg1Kk3QCqlbPFLaJ5qw5B4DYvQuxriamaHMfzjN0wohrb3YJzJnC7JfHGW+Ywr+jX4SUYNowzT9Cv7fii9hFfT6+GI0jpHTj2FeZKNIXCsBrH7itGx+7DAy5KuulBf9CvlGd37UQtIXLsUJBoc01wMOWEISesu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eAIkAtt0dDnsGKEHXy5hkj9186MJUSQaHZFTfa4k8T9bamQePAkSv4g/HMmoJDL5oh9FwST6K1rBlilrQzw3vi0LJJmSj6qaMuk4jzewM+bqMi4GjSV8wHSgm6IuXNmbzOnIXDbUPAym+JrM10BumH+fZJSAaxmpVnKzyha8O4ANA+DP9ayxE5hwIypn7x9hcwfOod4ugj6mfyHR4HcpZlIKbWnA5s+oGC3frTMdiF8FgkBm/GIFCEgSiHEwUkWCWQw1yldfEG+D1Fyzi137J9hJ7kMWyfzTl7OA0EgSdcffJlZzk9fwJuUDLuRGWA7Y3o/Ry17uI1TmBB26qDqFj7DYqNrzRB8G/CHXUlv9tsuQ9Q3z0vsc57AolqJ4QlAzn+LYdBcoNyrdi/8vfIfYqEZ/VCuwHaLk0fcqKNLIyJgxlvpP28/Vz+UrB6z88c=

Просмотреть файл

@ -38,7 +38,7 @@ mvn clean install -DskipTests
Developing version naming convention is like `2.0.0-SNAPSHOT`. Release version naming convention is like `2.0.0`. Please don't update version if no release plan.
## CI
Both [Travis](https://travis-ci.org/Microsoft/azure-spring-boot) and [Appveyor](https://ci.appveyor.com/project/yungez/azure-spring-boot) CI is enabled.
[Appveyor](https://ci.appveyor.com/project/yungez/azure-spring-boot) CI is enabled.
## Contribution
Code contribution is welcome. To contribute to existing code or add a new starter, please make sure below check list is checked.

Просмотреть файл

@ -1,4 +1,4 @@
[![Travis CI](https://travis-ci.org/Microsoft/azure-spring-boot.svg?branch=master)](https://travis-ci.org/Microsoft/azure-spring-boot)
[![Build Status](https://msazure.visualstudio.com/AzureDMSS/_apis/build/status/unknown-compliance/microsoft.azure-spring-boot?branchName=master)](https://msazure.visualstudio.com/AzureDMSS/_build/latest?definitionId=105191&branchName=master)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/af0qeprdv3g9ox07/branch/master?svg=true)](https://ci.appveyor.com/project/yungez/azure-spring-boot)
[![codecov](https://codecov.io/gh/Microsoft/azure-spring-boot/branch/master/graph/badge.svg)](https://codecov.io/gh/Microsoft/azure-spring-boot)
[![MIT License](http://img.shields.io/badge/license-MIT-green.svg) ](https://github.com/Microsoft/azure-spring-boot/blob/master/LICENSE)

49
azure-pipelines.yml Normal file
Просмотреть файл

@ -0,0 +1,49 @@
# 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:
branches:
include:
- master
- 2.0.x
- 2.1.x
paths:
exclude:
- README.md
pr:
- master
- 2.0.x
- 2.1.x
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Maven@3
displayName: Maven Build
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean package verify'
env:
AZURE_TENANT: $(AZURE_TENANT)
AZURE_SUBSCRIPTION: $(AZURE_SUBSCRIPTION)
AZURE_CLIENT_ID: $(AZURE_CLIENT_ID)
AZURE_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)
- task: Gradle@2
displayName: Gradle Build
inputs:
gradleWrapperFile: 'azure-spring-boot-samples/gradlew'
workingDirectory: 'azure-spring-boot-samples'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
tasks: 'build'

Просмотреть файл

@ -1,10 +0,0 @@
#!/bin/bash
function write_visual_bells() {
while true; do
echo -en "\a"
sleep 10
done
}
write_visual_bells&
set -o pipefail && mvn cobertura:cobertura | grep -v "DEBUG"