Add CI pipeline
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ target
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea
|
||||
credentials.yml
|
||||
|
||||
24
.mvn/settings.xml
Normal file
24
.mvn/settings.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<settings>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<activation><activeByDefault>true</activeByDefault></activation>
|
||||
<properties>
|
||||
<gpg.passphrase>${env.passphrase}</gpg.passphrase>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<servers>
|
||||
<server>
|
||||
<id>sonatype-nexus-staging</id>
|
||||
<username>${env.sonatype_username}</username>
|
||||
<password>${env.sonatype_password}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>repo.spring.io</id>
|
||||
<username>${env.spring_username}</username>
|
||||
<password>${env.spring_password}</password>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
||||
8
mvnw
vendored
8
mvnw
vendored
@@ -238,6 +238,14 @@ else
|
||||
echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//')
|
||||
fi
|
||||
|
||||
if echo $VERSION | egrep -q 'RELEASE'; then
|
||||
echo Activating \"central\" profile for version=\"$VERSION\"
|
||||
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pcentral"
|
||||
else
|
||||
echo Deactivating \"central\" profile for version=\"$VERSION\"
|
||||
echo $MAVEN_ARGS | grep -q central && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pcentral//')
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
|
||||
107
pipeline.yml
Normal file
107
pipeline.yml
Normal file
@@ -0,0 +1,107 @@
|
||||
# fly --target team login --concourse-url https://ci.spring.io --team-name "Spring Team"
|
||||
# fly --target team set-pipeline --config pipeline.yml --pipeline spring-retry --load-vars-from credentials.yml
|
||||
---
|
||||
resource_types:
|
||||
- name: slack-notification
|
||||
type: docker-image
|
||||
source:
|
||||
repository: nebhale/slack-notification-resource
|
||||
|
||||
resources:
|
||||
- name: source
|
||||
type: git
|
||||
source:
|
||||
uri: https://github.com/spring-projects/spring-retry.git
|
||||
- name: slack
|
||||
type: slack-notification
|
||||
source:
|
||||
url: {{slack-url}}
|
||||
|
||||
jobs:
|
||||
- name: build
|
||||
plan:
|
||||
- get: source
|
||||
trigger: true
|
||||
- task: build
|
||||
config:
|
||||
platform: linux
|
||||
image_resource:
|
||||
type: docker-image
|
||||
source:
|
||||
repository: springio/spring-ci-base
|
||||
inputs:
|
||||
- name: source
|
||||
run:
|
||||
dir: source
|
||||
path: ./mvnw
|
||||
args: [install, "-s", ".mvn/settings.xml"]
|
||||
params:
|
||||
TERM: dumb
|
||||
passphrase: {{passphrase}}
|
||||
- name: next
|
||||
plan:
|
||||
- get: source
|
||||
trigger: true
|
||||
- task: build
|
||||
config:
|
||||
platform: linux
|
||||
image_resource:
|
||||
type: docker-image
|
||||
source:
|
||||
repository: springio/spring-ci-base
|
||||
inputs:
|
||||
- name: source
|
||||
run:
|
||||
dir: source
|
||||
path: ./mvnw
|
||||
args: [install, "-Dspring.framework.version=5.0.0.RC2", "-s", ".mvn/settings.xml"]
|
||||
params:
|
||||
TERM: dumb
|
||||
passphrase: {{passphrase}}
|
||||
- name: deploy
|
||||
plan:
|
||||
- get: source
|
||||
trigger: true
|
||||
passed: [build, next]
|
||||
- task: deploy
|
||||
config:
|
||||
platform: linux
|
||||
image_resource:
|
||||
type: docker-image
|
||||
source:
|
||||
repository: springio/spring-ci-base
|
||||
inputs:
|
||||
- name: source
|
||||
run:
|
||||
dir: source
|
||||
path: ./mvnw
|
||||
args: [clean, deploy, "-DskipTests", "-s", ".mvn/settings.xml"]
|
||||
params:
|
||||
TERM: dumb
|
||||
passphrase: {{passphrase}}
|
||||
sonatype_username: {{sonatype-username}}
|
||||
sonatype_password: {{sonatype-password}}
|
||||
spring_username: {{spring-username}}
|
||||
spring_password: {{spring-password}}
|
||||
on_failure: *slack-failure
|
||||
on_success: *slack-success
|
||||
|
||||
slack-failure: &slack-failure
|
||||
put: slack
|
||||
params:
|
||||
attachments:
|
||||
- color: danger
|
||||
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <FAILURE>"
|
||||
text: "<!here> Build has failed"
|
||||
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
||||
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
||||
|
||||
slack-success: &slack-success
|
||||
put: slack
|
||||
params:
|
||||
attachments:
|
||||
- color: good
|
||||
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <SUCCESS>"
|
||||
text: "Build has succeeded"
|
||||
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
||||
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
||||
49
pom.xml
49
pom.xml
@@ -22,9 +22,56 @@
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.test.failure.ignore>true</maven.test.failure.ignore>
|
||||
<spring.framework.version>4.3.3.RELEASE</spring.framework.version>
|
||||
<spring.framework.version>4.3.9.RELEASE</spring.framework.version>
|
||||
</properties>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>spring</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>strict</id>
|
||||
<properties>
|
||||
|
||||
Reference in New Issue
Block a user