Enable CircleCI build.
See gh-97.
This commit is contained in:
60
.settings.xml
Normal file
60
.settings.xml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<settings>
|
||||||
|
<servers>
|
||||||
|
<server>
|
||||||
|
<id>repo.spring.io</id>
|
||||||
|
<username>${env.CI_DEPLOY_USERNAME}</username>
|
||||||
|
<password>${env.CI_DEPLOY_PASSWORD}</password>
|
||||||
|
</server>
|
||||||
|
</servers>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>spring</id>
|
||||||
|
<activation><activeByDefault>true</activeByDefault></activation>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>http://repo.spring.io/libs-snapshot-local</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>http://repo.spring.io/libs-milestone-local</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-releases</id>
|
||||||
|
<name>Spring Releases</name>
|
||||||
|
<url>http://repo.spring.io/release</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>http://repo.spring.io/libs-snapshot-local</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>http://repo.spring.io/libs-milestone-local</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
</settings>
|
||||||
56
circle.yml
Normal file
56
circle.yml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
general:
|
||||||
|
branches:
|
||||||
|
ignore:
|
||||||
|
- gh-pages # list of branches to ignore
|
||||||
|
|
||||||
|
machine:
|
||||||
|
services:
|
||||||
|
- rabbitmq-server
|
||||||
|
java:
|
||||||
|
version: oraclejdk8
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
override:
|
||||||
|
- ./mvnw -s .settings.xml -B -U --fail-never dependency:go-offline || true
|
||||||
|
cache_directories:
|
||||||
|
- "download"
|
||||||
|
- "~/.m2"
|
||||||
|
|
||||||
|
database:
|
||||||
|
override:
|
||||||
|
- mkdir -p download
|
||||||
|
- test -f download/apache-cassandra-2.2.8-bin.tar.gz || wget https://archive.apache.org/dist/cassandra/2.2.8/apache-cassandra-2.2.8-bin.tar.gz -O download/apache-cassandra-2.2.8-bin.tar.gz
|
||||||
|
- tar xzf download/apache-cassandra-2.2.8-bin.tar.gz
|
||||||
|
- cp -f spring-cloud-vault-config-databases/src/test/resources/cassandra.yaml apache-cassandra-2.2.8/conf
|
||||||
|
- mkdir -p apache-cassandra-2.2.8/data
|
||||||
|
- apache-cassandra-2.2.8/bin/cassandra -f:
|
||||||
|
background: true
|
||||||
|
- sudo rabbitmq-plugins enable rabbitmq_management
|
||||||
|
- sudo service rabbitmq-server restart
|
||||||
|
- mysql -e "CREATE USER 'springvault' IDENTIFIED by 'springvault';"
|
||||||
|
- mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'springvault'@'%' WITH GRANT OPTION;";
|
||||||
|
- psql -U postgres -c "CREATE ROLE springvault WITH LOGIN PASSWORD 'springvault' CREATEROLE CREATEUSER;"
|
||||||
|
- |-
|
||||||
|
mongo admin --eval "db.createUser({user: 'springvault', pwd:'springvault', roles:['root']});"
|
||||||
|
- apache-cassandra-2.2.8/bin/cqlsh localhost -u cassandra -p cassandra -e "CREATE USER 'springvault' WITH PASSWORD 'springvault' SUPERUSER"
|
||||||
|
- src/test/bash/install_vault.sh
|
||||||
|
- src/test/bash/install_consul.sh
|
||||||
|
|
||||||
|
test:
|
||||||
|
pre:
|
||||||
|
- src/test/bash/create_certificates.sh
|
||||||
|
- src/test/bash/local_run_vault.sh:
|
||||||
|
background: true
|
||||||
|
- src/test/bash/local_run_consul.sh:
|
||||||
|
background: true
|
||||||
|
override:
|
||||||
|
- ./mvnw -s .settings.xml clean install -U -P sonar -nsu -B -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||||
|
- ./mvnw -s .settings.xml org.jacoco:jacoco-maven-plugin:report -U -P sonar -Djacoco.dataFile=$(pwd)/target/jacoco.exec
|
||||||
|
post:
|
||||||
|
- apache-cassandra-2.2.8/bin/nodetool stopdaemon || true
|
||||||
|
- pkill vault || true
|
||||||
|
- pkill consul || true
|
||||||
|
- find . -type f -regex ".*/spring-cloud-*.*/target/*.*" | cpio -pdm $CIRCLE_ARTIFACTS
|
||||||
|
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
|
||||||
|
- find . -type f -regex ".*/target/.*-reports/.*" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
|
||||||
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
71
pom.xml
71
pom.xml
@@ -1,12 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-build</artifactId>
|
<artifactId>spring-cloud-build</artifactId>
|
||||||
<version>1.3.1.RELEASE</version>
|
<version>1.3.1.RELEASE</version>
|
||||||
<relativePath />
|
<relativePath/>
|
||||||
<!-- lookup parent from repository -->
|
<!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -30,8 +32,10 @@
|
|||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://github.com/spring-cloud/spring-cloud-vault</url>
|
<url>https://github.com/spring-cloud/spring-cloud-vault</url>
|
||||||
<connection>scm:git:git://github.com/spring-cloud/spring-cloud-vault.git</connection>
|
<connection>scm:git:git://github.com/spring-cloud/spring-cloud-vault.git
|
||||||
<developerConnection>scm:git:ssh://git@github.com/spring-cloud/spring-cloud-vault.git
|
</connection>
|
||||||
|
<developerConnection>
|
||||||
|
scm:git:ssh://git@github.com/spring-cloud/spring-cloud-vault.git
|
||||||
</developerConnection>
|
</developerConnection>
|
||||||
<tag>HEAD</tag>
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
@@ -193,13 +197,70 @@
|
|||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spring-releases</id>
|
<id>spring-snap</id>
|
||||||
<name>Spring Releases</name>
|
<name>Spring Releases</name>
|
||||||
<url>https://repo.spring.io/release</url>
|
<url>https://repo.spring.io/release</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>https://repo.spring.io/libs-snapshot</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>sonar</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
<configuration>
|
||||||
|
<destFile>${sonar.jacoco.reportPath}</destFile>
|
||||||
|
<append>true</append>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>report</id>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<properties>
|
||||||
|
<property>
|
||||||
|
<name>listener</name>
|
||||||
|
<value>org.sonar.java.jacoco.JUnitListener</value>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Reference in New Issue
Block a user