From 347cfcef0385778dd0abae98e0320fd0fb94ff0c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Tue, 6 Jun 2017 14:40:53 +0100 Subject: [PATCH] Add concourse pipeline --- .gitignore | 1 + .mvn/settings.xml | 15 +++++++++++ pipeline.yml | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 .mvn/settings.xml create mode 100644 pipeline.yml diff --git a/.gitignore b/.gitignore index e1e4dd3e5..4cbf098da 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ _site/ .factorypath coverage-error.log .apt_generated +credentials.yml \ No newline at end of file diff --git a/.mvn/settings.xml b/.mvn/settings.xml new file mode 100644 index 000000000..f8860c9ca --- /dev/null +++ b/.mvn/settings.xml @@ -0,0 +1,15 @@ + + + + + sonatype-nexus-staging + ${env.sonatype_username} + ${env.sonatype_password} + + + repo.spring.io + ${env.spring_username} + ${env.spring_password} + + + diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 000000000..46632131f --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,66 @@ +# fly --target cloud login --concourse-url https://ci.spring.io --team-name spring-cloud +# fly --target cloud set-pipeline --config pipeline.yml --pipeline spring-cloud-function --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/markfisher/spring-cloud-function.git +- name: slack + type: slack-notification + source: + url: {{slack-url}} + +jobs: +- name: build + plan: + - get: source + trigger: true + - task: maven + config: + platform: linux + image_resource: + type: docker-image + source: + repository: springio/maven-base + inputs: + - name: source + run: + dir: source + path: ./mvnw + args: [deploy, "-s", ".mvn/settings.xml", "-Dgpg.passphrase=${passphrase}"] + 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