|
| 1 | +resource_types: |
| 2 | +- name: artifactory-resource |
| 3 | + type: docker-image |
| 4 | + source: |
| 5 | + repository: springio/artifactory-resource |
| 6 | + tag: 0.0.1 |
| 7 | +- name: email |
| 8 | + type: docker-image |
| 9 | + source: |
| 10 | + repository: pcfseceng/email-resource |
| 11 | +resources: |
| 12 | +- name: git-repo |
| 13 | + type: git |
| 14 | + source: |
| 15 | + uri: ((github-repo)) |
| 16 | + username: ((github-username)) |
| 17 | + password: ((github-password)) |
| 18 | + branch: ((branch)) |
| 19 | + ignore_paths: ["ci/images/*"] |
| 20 | +- name: ci-images-git-repo |
| 21 | + type: git |
| 22 | + source: |
| 23 | + uri: ((github-repo)) |
| 24 | + branch: ((branch)) |
| 25 | + paths: ["ci/images/*"] |
| 26 | +- name: spring-boot-ci-image |
| 27 | + type: docker-image |
| 28 | + source: |
| 29 | + repository: ((docker-hub-organization))/spring-boot-ci-image |
| 30 | + username: ((docker-hub-username)) |
| 31 | + password: ((docker-hub-password)) |
| 32 | + tag: ((branch)) |
| 33 | +- name: spring-boot-jdk9-ci-image |
| 34 | + type: docker-image |
| 35 | + source: |
| 36 | + repository: ((docker-hub-organization))/spring-boot-jdk9-ci-image |
| 37 | + username: ((docker-hub-username)) |
| 38 | + password: ((docker-hub-password)) |
| 39 | + tag: ((branch)) |
| 40 | +- name: artifactory-repo |
| 41 | + type: artifactory-resource |
| 42 | + source: |
| 43 | + uri: ((artifactory-server)) |
| 44 | + username: ((artifactory-username)) |
| 45 | + password: ((artifactory-password)) |
| 46 | + build_name: ((build-name)) |
| 47 | +- name: email-notification |
| 48 | + type: email |
| 49 | + source: |
| 50 | + smtp: |
| 51 | + host: ((email-server)) |
| 52 | + port: "25" |
| 53 | + anonymous: true |
| 54 | + skip_ssl_validation: true |
| 55 | + from: ((email-from)) |
| 56 | + to: ((email-to)) |
| 57 | +jobs: |
| 58 | +- name: build-spring-boot-ci-images |
| 59 | + plan: |
| 60 | + - get: ci-images-git-repo |
| 61 | + trigger: true |
| 62 | + - put: spring-boot-ci-image |
| 63 | + params: |
| 64 | + build: ci-images-git-repo/ci/images/spring-boot-ci-image |
| 65 | + - put: spring-boot-jdk9-ci-image |
| 66 | + params: |
| 67 | + build: ci-images-git-repo/ci/images/spring-boot-jdk9-ci-image |
| 68 | +- name: build |
| 69 | + serial: true |
| 70 | + plan: |
| 71 | + - get: spring-boot-ci-image |
| 72 | + - get: git-repo |
| 73 | + trigger: true |
| 74 | + - do: |
| 75 | + - task: build-project |
| 76 | + timeout: 1h30m |
| 77 | + image: spring-boot-ci-image |
| 78 | + file: git-repo/ci/tasks/build-project.yml |
| 79 | + - aggregate: |
| 80 | + - task: build-samples |
| 81 | + timeout: 1h30m |
| 82 | + image: spring-boot-ci-image |
| 83 | + file: git-repo/ci/tasks/build-samples.yml |
| 84 | + - task: build-integration-tests |
| 85 | + timeout: 1h30m |
| 86 | + image: spring-boot-ci-image |
| 87 | + file: git-repo/ci/tasks/build-integration-tests.yml |
| 88 | + - task: build-deployment-tests |
| 89 | + timeout: 1h30m |
| 90 | + image: spring-boot-ci-image |
| 91 | + file: git-repo/ci/tasks/build-deployment-tests.yml |
| 92 | + on_failure: |
| 93 | + put: email-notification |
| 94 | + params: |
| 95 | + subject_text: "Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" |
| 96 | + body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" |
| 97 | + - put: artifactory-repo |
| 98 | + params: &artifactory-params |
| 99 | + repo: libs-snapshot-local |
| 100 | + build_number: "${BUILD_ID}" |
| 101 | + folder: distribution-repository |
| 102 | + build_uri: "https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}" |
| 103 | + build_number: "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}" |
| 104 | + artifact_set: |
| 105 | + - include: |
| 106 | + - "/**/spring-boot-docs-*.zip" |
| 107 | + properties: |
| 108 | + zip-type: "docs" |
| 109 | + zip-deployed: "false" |
| 110 | +- name: jdk9-build |
| 111 | + serial: true |
| 112 | + plan: |
| 113 | + - get: spring-boot-jdk9-ci-image |
| 114 | + - get: git-repo |
| 115 | + - do: |
| 116 | + - task: build-project |
| 117 | + timeout: 1h30m |
| 118 | + image: spring-boot-jdk9-ci-image |
| 119 | + file: git-repo/ci/tasks/build-project.yml |
| 120 | + - aggregate: |
| 121 | + - task: build-samples |
| 122 | + timeout: 1h30m |
| 123 | + image: spring-boot-jdk9-ci-image |
| 124 | + file: git-repo/ci/tasks/build-samples.yml |
| 125 | + - task: build-integration-tests |
| 126 | + timeout: 1h30m |
| 127 | + image: spring-boot-jdk9-ci-image |
| 128 | + file: git-repo/ci/tasks/build-integration-tests.yml |
| 129 | + - task: build-deployment-tests |
| 130 | + timeout: 1h30m |
| 131 | + image: spring-boot-jdk9-ci-image |
| 132 | + file: git-repo/ci/tasks/build-deployment-tests.yml |
| 133 | + on_failure: |
| 134 | + put: email-notification |
| 135 | + params: |
| 136 | + subject_text: "JDK 9 Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}" |
| 137 | + body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!" |
| 138 | +- name: stage-milestone |
| 139 | + serial: true |
| 140 | + plan: |
| 141 | + - get: spring-boot-ci-image |
| 142 | + - get: git-repo |
| 143 | + trigger: false |
| 144 | + - task: stage |
| 145 | + image: spring-boot-ci-image |
| 146 | + file: git-repo/ci/tasks/stage.yml |
| 147 | + params: |
| 148 | + RELEASE_TYPE: M |
| 149 | + - put: artifactory-repo |
| 150 | + params: |
| 151 | + <<: *artifactory-params |
| 152 | + repo: libs-staging-local |
| 153 | + - put: git-repo |
| 154 | + params: |
| 155 | + repository: stage-git-repo |
| 156 | +- name: stage-rc |
| 157 | + serial: true |
| 158 | + plan: |
| 159 | + - get: spring-boot-ci-image |
| 160 | + - get: git-repo |
| 161 | + trigger: false |
| 162 | + - task: stage |
| 163 | + image: spring-boot-ci-image |
| 164 | + file: git-repo/ci/tasks/stage.yml |
| 165 | + params: |
| 166 | + RELEASE_TYPE: RC |
| 167 | + - put: artifactory-repo |
| 168 | + params: |
| 169 | + <<: *artifactory-params |
| 170 | + repo: libs-staging-local |
| 171 | + - put: git-repo |
| 172 | + params: |
| 173 | + repository: stage-git-repo |
| 174 | +- name: stage-release |
| 175 | + serial: true |
| 176 | + plan: |
| 177 | + - get: spring-boot-ci-image |
| 178 | + - get: git-repo |
| 179 | + trigger: false |
| 180 | + - task: stage |
| 181 | + image: spring-boot-ci-image |
| 182 | + file: git-repo/ci/tasks/stage.yml |
| 183 | + params: |
| 184 | + RELEASE_TYPE: RELEASE |
| 185 | + - put: artifactory-repo |
| 186 | + params: |
| 187 | + <<: *artifactory-params |
| 188 | + repo: libs-staging-local |
| 189 | + - put: git-repo |
| 190 | + params: |
| 191 | + repository: stage-git-repo |
| 192 | +- name: promote-milestone |
| 193 | + serial: true |
| 194 | + plan: |
| 195 | + - get: spring-boot-ci-image |
| 196 | + - get: git-repo |
| 197 | + trigger: false |
| 198 | + - get: artifactory-repo |
| 199 | + trigger: false |
| 200 | + passed: [stage-milestone] |
| 201 | + params: |
| 202 | + save_build_info: true |
| 203 | + - task: promote |
| 204 | + image: spring-boot-ci-image |
| 205 | + file: git-repo/ci/tasks/promote.yml |
| 206 | + params: |
| 207 | + RELEASE_TYPE: M |
| 208 | + ARTIFACTORY_SERVER: ((artifactory-server)) |
| 209 | + ARTIFACTORY_USERNAME: ((artifactory-username)) |
| 210 | + ARTIFACTORY_PASSWORD: ((artifactory-password)) |
| 211 | +- name: promote-rc |
| 212 | + serial: true |
| 213 | + plan: |
| 214 | + - get: git-repo |
| 215 | + trigger: false |
| 216 | + - get: artifactory-repo |
| 217 | + trigger: false |
| 218 | + passed: [stage-rc] |
| 219 | + params: |
| 220 | + save_build_info: true |
| 221 | + - task: promote |
| 222 | + image: spring-boot-ci-image |
| 223 | + file: git-repo/ci/tasks/promote.yml |
| 224 | + params: |
| 225 | + RELEASE_TYPE: RC |
| 226 | + ARTIFACTORY_SERVER: ((artifactory-server)) |
| 227 | + ARTIFACTORY_USERNAME: ((artifactory-username)) |
| 228 | + ARTIFACTORY_PASSWORD: ((artifactory-password)) |
| 229 | +- name: promote-release |
| 230 | + serial: true |
| 231 | + plan: |
| 232 | + - get: git-repo |
| 233 | + trigger: false |
| 234 | + - get: artifactory-repo |
| 235 | + trigger: false |
| 236 | + passed: [stage-release] |
| 237 | + params: |
| 238 | + save_build_info: true |
| 239 | + - task: promote |
| 240 | + image: spring-boot-ci-image |
| 241 | + file: git-repo/ci/tasks/promote.yml |
| 242 | + params: |
| 243 | + RELEASE_TYPE: RELEASE |
| 244 | + ARTIFACTORY_SERVER: ((artifactory-server)) |
| 245 | + ARTIFACTORY_USERNAME: ((artifactory-username)) |
| 246 | + ARTIFACTORY_PASSWORD: ((artifactory-password)) |
| 247 | + BINTRAY_USERNAME: ((bintray-username)) |
| 248 | + BINTRAY_PASSWORD: ((bintray-password)) |
| 249 | + SONATYPE_USERNAME: ((sonattype-username)) |
| 250 | + SONATYPE_PASSWORD: ((sonattype-password)) |
| 251 | + BINTRAY_SUBJECT: ((bintray-subject)) |
| 252 | + BINTRAY_REPO: ((bintray-repo)) |
| 253 | +groups: |
| 254 | +- name: "Build" |
| 255 | + jobs: ["build", "jdk9-build"] |
| 256 | +- name: "Release" |
| 257 | + jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release"] |
| 258 | +- name: "CI Images" |
| 259 | + jobs: ["build-spring-boot-ci-images"] |
0 commit comments