diff --git a/ci/pipeline.yml b/ci/pipeline.yml index b6782b02c0d..eeba189709f 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -12,6 +12,11 @@ resource_types: type: docker-image source: repository: jtarchie/pr +- name: github-status-resource + type: docker-image + source: + repository: dpb587/github-status-resource + tag: master resources: - name: git-repo type: git @@ -72,6 +77,27 @@ resources: skip_ssl_validation: true from: ((email-from)) to: ((email-to)) +- name: repo-status-build + type: github-status-resource + source: + repository: ((github-repo-name)) + access_token: ((github-access-token)) + branch: ((branch)) + context: build +- name: repo-status-jdk9-build + type: github-status-resource + source: + repository: ((github-repo-name)) + access_token: ((github-access-token)) + branch: ((branch)) + context: jdk9-build +- name: repo-status-jdk10-build + type: github-status-resource + source: + repository: ((github-repo-name)) + access_token: ((github-access-token)) + branch: ((branch)) + context: jdk10-build jobs: - name: build-spring-boot-ci-images plan: @@ -93,6 +119,8 @@ jobs: - get: spring-boot-ci-image - get: git-repo trigger: true + - put: repo-status-build + params: { state: "pending", commit: "git-repo" } - do: - task: build-project privileged: true @@ -113,10 +141,15 @@ jobs: image: spring-boot-ci-image file: git-repo/ci/tasks/build-deployment-tests.yml on_failure: - put: email-notification - params: - subject_text: "Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" - body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" + do: + - put: repo-status-build + params: { state: "failure", commit: "git-repo" } + - put: email-notification + params: + subject_text: "Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" + body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" + - put: repo-status-build + params: { state: "success", commit: "git-repo" } - put: artifactory-repo params: &artifactory-params repo: libs-snapshot-local @@ -181,6 +214,8 @@ jobs: - get: spring-boot-jdk9-ci-image - get: git-repo trigger: true + - put: repo-status-jdk9-build + params: { state: "pending", commit: "git-repo" } - do: - task: build-project privileged: true @@ -201,10 +236,15 @@ jobs: image: spring-boot-jdk9-ci-image file: git-repo/ci/tasks/build-deployment-tests.yml on_failure: - put: email-notification - params: - subject_text: "JDK 9 Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" - body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" + do: + - put: repo-status-jdk9-build + params: { state: "failure", commit: "git-repo" } + - put: email-notification + params: + subject_text: "JDK 9 Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" + body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" + - put: repo-status-jdk9-build + params: { state: "success", commit: "git-repo" } - name: jdk10-build serial: true public: true @@ -212,6 +252,8 @@ jobs: - get: spring-boot-jdk10-ci-image - get: git-repo trigger: true + - put: repo-status-jdk10-build + params: { state: "pending", commit: "git-repo" } - do: - task: build-project privileged: true @@ -232,10 +274,15 @@ jobs: image: spring-boot-jdk10-ci-image file: git-repo/ci/tasks/build-deployment-tests.yml on_failure: - put: email-notification - params: - subject_text: "JDK 10 Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" - body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" + do: + - put: repo-status-jdk10-build + params: { state: "failure", commit: "git-repo" } + - put: email-notification + params: + subject_text: "JDK 10 Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" + body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" + - put: repo-status-jdk10-build + params: { state: "success", commit: "git-repo" } - name: stage-milestone serial: true plan: