diff --git a/.mvn/settings.xml b/.mvn/settings.xml index f8860c9..ae5fee1 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -1,6 +1,15 @@ - + + + release + true + + ${env.passphrase} + + + + sonatype-nexus-staging ${env.sonatype_username} diff --git a/pipeline.yml b/pipeline.yml index c19e875..8d8121d 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -1,11 +1,21 @@ # fly --target team login --concourse-url https://ci.spring.io --team-name "Spring Team" # fly --target team set-pipeline --config pipeline.yml --pipeline spring-guice --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-guice.git +- name: slack + type: slack-notification + source: + url: {{slack-url}} jobs: - name: build @@ -24,7 +34,7 @@ jobs: run: dir: source path: ./mvnw - args: [deploy, "-s", ".mvn/settings.xml", "-Dgpg.passphrase=${passphrase}"] + args: [deploy, "-s", ".mvn/settings.xml"] params: TERM: -dumb passphrase: {{passphrase}} @@ -32,4 +42,25 @@ jobs: sonatype_password: {{sonatype-password}} spring_username: {{spring-username}} spring_password: {{spring-password}} - \ No newline at end of file + 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