diff --git a/.gitignore b/.gitignore index e0953d8..44f712d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ target *.ipr *.iws .idea +credentials.yml diff --git a/.mvn/settings.xml b/.mvn/settings.xml new file mode 100644 index 0000000..ae5fee1 --- /dev/null +++ b/.mvn/settings.xml @@ -0,0 +1,24 @@ + + + + + release + true + + ${env.passphrase} + + + + + + sonatype-nexus-staging + ${env.sonatype_username} + ${env.sonatype_password} + + + repo.spring.io + ${env.spring_username} + ${env.spring_password} + + + diff --git a/mvnw b/mvnw index 0a7dac2..25f750c 100755 --- a/mvnw +++ b/mvnw @@ -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" \ diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..230d8ec --- /dev/null +++ b/pipeline.yml @@ -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 " + text: " 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 " + 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 diff --git a/pom.xml b/pom.xml index 459327e..ff1cdae 100644 --- a/pom.xml +++ b/pom.xml @@ -22,9 +22,56 @@ jar true - 4.3.3.RELEASE + 4.3.9.RELEASE + + spring + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + spring-releases + Spring Releases + https://repo.spring.io/release + + false + + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + strict