diff --git a/ci/pipeline-template.yml b/ci/pipeline-template.yml index 111aefce..29ead2c0 100644 --- a/ci/pipeline-template.yml +++ b/ci/pipeline-template.yml @@ -64,6 +64,11 @@ resources: repository: spring-projects/spring-ws branch: ((branch)) +- name: slack + type: slack-notification + source: + url: ((slack)) + groups: - name: spring-ws jobs: @@ -92,6 +97,24 @@ jobs: - task: test file: spring-ws-github/ci/test.yml params: { PROFILE: "distribute,convergence" } + on_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 + on_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 - name: Test - JDK 8 and Spring.NEXT serial: true @@ -104,6 +127,24 @@ jobs: - task: test file: spring-ws-github/ci/test.yml params: { PROFILE: "springnext,convergence" } + on_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 + on_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 - name: Test - JDK 8 and Spring.NEXT (snapshots) serial: true @@ -116,6 +157,24 @@ jobs: - task: test file: spring-ws-github/ci/test.yml params: { PROFILE: "springnext-buildsnapshot,convergence" } + on_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 + on_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 - name: Test - JDK 8 and Spring (snapshots) serial: true @@ -128,6 +187,24 @@ jobs: - task: test file: spring-ws-github/ci/test.yml params: { PROFILE: "spring-buildsnapshot,convergence" } + on_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 + on_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 - name: Test - JDK 11 serial: true @@ -141,6 +218,24 @@ jobs: image: openjdk:11-jdk file: spring-ws-github/ci/test.yml params: { PROFILE: "distribute,java11,convergence" } + on_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 + on_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 - name: Test - JDK 11 and Spring.NEXT serial: true @@ -154,6 +249,24 @@ jobs: image: openjdk:11-jdk file: spring-ws-github/ci/test.yml params: { PROFILE: "springnext,java11,convergence" } + on_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 + on_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 - name: Test - JDK 11 and Spring.NEXT (snapshots) serial: true @@ -167,6 +280,24 @@ jobs: image: openjdk:11-jdk file: spring-ws-github/ci/test.yml params: { PROFILE: "springnext-buildsnapshot,java11,convergence" } + on_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 + on_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 - name: Test - JDK 11 and Spring (snapshots) serial: true @@ -180,6 +311,24 @@ jobs: image: openjdk:11-jdk file: spring-ws-github/ci/test.yml params: { PROFILE: "spring-buildsnapshot,java11,convergence" } + on_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 + on_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 - name: Build serial: true @@ -215,16 +364,34 @@ jobs: properties: archives: '*:*:*:*@zip zip.name:spring-ws, zip.displayname:Spring Web Services, zip.deployed:false' on_failure: - put: spring-ws-status - params: - commit: spring-ws-github - state: failure + aggregate: + - put: spring-ws-status + params: + commit: spring-ws-github + state: 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 on_success: - put: spring-ws-status - params: - commit: spring-ws-github - state: success - + aggregate: + - put: spring-ws-status + params: + commit: spring-ws-github + state: 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 + - name: spring-ws-pull-requests public: true plan: @@ -233,7 +400,6 @@ jobs: trigger: true version: every - get: openjdk:11-jdk - trigger: true - put: spring-ws-pull-requests params: path: spring-ws-github @@ -268,12 +434,30 @@ jobs: file: spring-ws-github/ci/test.yml params: { PROFILE: "spring-buildsnapshot,java11,convergence" } on_failure: - put: spring-ws-pull-requests - params: - path: spring-ws-github - status: failure + aggregate: + - put: spring-ws-pull-requests + params: + path: spring-ws-github + status: 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 on_success: - put: spring-ws-pull-requests - params: - path: spring-ws-github - status: success + aggregate: + - put: spring-ws-pull-requests + params: + path: spring-ws-github + status: 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