|
| 1 | +--- |
| 2 | +# |
| 3 | +# ci/pipeline.yml |
| 4 | +# |
| 5 | +# Pipeline structure file for a BOSH Release pipeline |
| 6 | +# |
| 7 | +# DO NOT MAKE CHANGES TO THIS FILE. Instead, modify |
| 8 | +# ci/settings.yml and override what needs overridden. |
| 9 | +# This uses spruce, so you have some options there. |
| 10 | +# |
| 11 | +# author: James Hunt <[email protected]> |
| 12 | +# created: 2016-03-30 |
| 13 | + |
| 14 | +meta: |
| 15 | + name: (( param "Please name your pipeline" )) |
| 16 | + target: (( param "Please identify the name of the target Concourse CI" )) |
| 17 | + pipeline: (( grab meta.name )) |
| 18 | + |
| 19 | + aws: |
| 20 | + bucket: (( concat meta.name "-pipeline" )) |
| 21 | + access_key: (( param "Please set your AWS Access Key ID" )) |
| 22 | + secret_key: (( param "Please set your AWS Secret Key ID" )) |
| 23 | + |
| 24 | + github: |
| 25 | + uri: (( concat "[email protected]:" meta.github.owner "/" meta.github.repo )) |
| 26 | + owner: (( param "Please specify the name of the user / organization that owns the Github repository" )) |
| 27 | + repo: (( param "Please specify the name of the Github repository" )) |
| 28 | + branch: master |
| 29 | + private_key: (( param "Please generate an SSH Deployment Key for this repo and specify it here" )) |
| 30 | + access_token: (( param "Please generate a Personal Access Token and specify it here" )) |
| 31 | + |
| 32 | + bosh-lite: |
| 33 | + target: (( param "Please specify the BOSH target URI for the bosh-lite to run test deployments against" )) |
| 34 | + username: admin |
| 35 | + password: admin |
| 36 | + |
| 37 | + slack: |
| 38 | + webhook: (( param "Please specify your Slack Incoming Webhook Integration URL" )) |
| 39 | + notification: '(( concat ":sadpanda: " meta.name " build failed!<br>URL-GOES-HERE" ))' |
| 40 | + channel: (( param "Please specify the channel (#name) or user (@user) to send messages to" )) |
| 41 | + username: concourse |
| 42 | + icon: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png |
| 43 | + |
| 44 | +groups: |
| 45 | + - name: (( grab meta.name )) |
| 46 | + jobs: |
| 47 | + - testflight |
| 48 | + - rc |
| 49 | + - shipit |
| 50 | + - major |
| 51 | + - minor |
| 52 | + |
| 53 | +jobs: |
| 54 | + - name: testflight |
| 55 | + public: true |
| 56 | + serial: true |
| 57 | + plan: |
| 58 | + - aggregate: |
| 59 | + - { get: git } |
| 60 | + - { get: changes, trigger: true } |
| 61 | + - task: testflight |
| 62 | + config: |
| 63 | + platform: linux |
| 64 | + image: docker:///starkandwayne/concourse |
| 65 | + inputs: |
| 66 | + - { name: git } |
| 67 | + run: |
| 68 | + path: ./git/ci/scripts/testflight |
| 69 | + args: [] |
| 70 | + params: |
| 71 | + REPO_ROOT: git |
| 72 | + BOSH_LITE_TARGET: (( grab meta.bosh-lite.target )) |
| 73 | + BOSH_LITE_USERNAME: (( grab meta.bosh-lite.username )) |
| 74 | + BOSH_LITE_PASSWORD: (( grab meta.bosh-lite.password )) |
| 75 | + BOSH_LITE_DEPLOYMENT: (( concat "ci-" meta.name )) |
| 76 | + |
| 77 | + - name: rc |
| 78 | + public: true |
| 79 | + plan: |
| 80 | + - aggregate: |
| 81 | + - { get: git, trigger: true, passed: [testflight] } |
| 82 | + - { get: version, trigger: false, params: {pre: rc} } |
| 83 | + - put: version |
| 84 | + params: {file: version/number} |
| 85 | + |
| 86 | + - name: minor |
| 87 | + public: true |
| 88 | + plan: |
| 89 | + - { get: version, trigger: false, params: {bump: minor} } |
| 90 | + - { put: version, params: {file: version/number} } |
| 91 | + |
| 92 | + - name: major |
| 93 | + public: true |
| 94 | + plan: |
| 95 | + - { get: version, trigger: false, params: {bump: major} } |
| 96 | + - { put: version, params: {file: version/number} } |
| 97 | + |
| 98 | + - name: shipit |
| 99 | + public: true |
| 100 | + serial: true |
| 101 | + plan: |
| 102 | + - aggregate: |
| 103 | + - { get: version, passed: [rc], params: {bump: final} } |
| 104 | + - { get: git, passed: [rc] } |
| 105 | + - task: release |
| 106 | + config: |
| 107 | + image: docker:///starkandwayne/concourse |
| 108 | + platform: linux |
| 109 | + inputs: |
| 110 | + - name: version |
| 111 | + - name: git |
| 112 | + outputs: |
| 113 | + - name: gh |
| 114 | + - name: pushme |
| 115 | + run: |
| 116 | + path: ./git/ci/scripts/shipit |
| 117 | + args: [] |
| 118 | + params: |
| 119 | + REPO_ROOT: git |
| 120 | + VERSION_FROM: version/number |
| 121 | + RELEASE_NAME: (( concat meta.name " BOSH Release" )) |
| 122 | + RELEASE_ROOT: gh |
| 123 | + REPO_OUT: pushme |
| 124 | + BRANCH: (( grab meta.github.branch )) |
| 125 | + |
| 126 | + BOSH_LITE_TARGET: (( grab meta.bosh-lite.target )) |
| 127 | + BOSH_LITE_USERNAME: (( grab meta.bosh-lite.username )) |
| 128 | + BOSH_LITE_PASSWORD: (( grab meta.bosh-lite.password )) |
| 129 | + BOSH_LITE_DEPLOYMENT: (( concat "ci-" meta.name )) |
| 130 | + |
| 131 | + AWS_ACCESS_KEY: (( grab meta.aws.access_key )) |
| 132 | + AWS_SECRET_KEY: (( grab meta.aws.secret_key )) |
| 133 | + |
| 134 | + - aggregate: |
| 135 | + - put: version |
| 136 | + params: |
| 137 | + bump: patch |
| 138 | + - put: git |
| 139 | + params: |
| 140 | + rebase: true |
| 141 | + repository: pushme/git |
| 142 | + - put: github |
| 143 | + params: |
| 144 | + name: gh/name |
| 145 | + tag: gh/tag |
| 146 | + body: gh/notes.md |
| 147 | + globs: [gh/artifacts/*] |
| 148 | + - put: s3 |
| 149 | + params: |
| 150 | + from: gh/artifacts/.*-(.*).tgz |
| 151 | + |
| 152 | +resource_types: |
| 153 | + - name: slack-notification |
| 154 | + type: docker-image |
| 155 | + source: |
| 156 | + repository: cfcommunity/slack-notification-resource |
| 157 | + |
| 158 | +resources: |
| 159 | + - name: git |
| 160 | + type: git |
| 161 | + source: |
| 162 | + uri: (( grab meta.github.uri )) |
| 163 | + branch: (( grab meta.github.branch )) |
| 164 | + private_key: (( grab meta.github.private_key )) |
| 165 | + - name: changes |
| 166 | + type: git |
| 167 | + source: |
| 168 | + uri: (( grab meta.github.uri )) |
| 169 | + branch: (( grab meta.github.branch )) |
| 170 | + private_key: (( grab meta.github.private_key )) |
| 171 | + paths: |
| 172 | + - src/**/* |
| 173 | + - jobs/**/* |
| 174 | + - packages/**/* |
| 175 | + - config/blobs.yml |
| 176 | + - templates/**/* |
| 177 | + |
| 178 | + - name: version |
| 179 | + type: semver |
| 180 | + source : |
| 181 | + driver: s3 |
| 182 | + bucket: (( grab meta.aws.bucket )) |
| 183 | + key: version |
| 184 | + access_key_id: (( grab meta.aws.access_key )) |
| 185 | + secret_access_key: (( grab meta.aws.secret_key )) |
| 186 | + initial_version: (( grab meta.initial_version || "0.0.1" )) |
| 187 | + |
| 188 | + - name: notify |
| 189 | + type: slack-notification |
| 190 | + source: |
| 191 | + url: (( grab meta.slack.webhook )) |
| 192 | + |
| 193 | + - name: github |
| 194 | + type: github-release |
| 195 | + source: |
| 196 | + user: (( grab meta.github.owner )) |
| 197 | + repository: (( grab meta.github.repo )) |
| 198 | + access_token: (( grab meta.github.access_token )) |
| 199 | + |
| 200 | + - name: s3 |
| 201 | + type: s3 |
| 202 | + source: |
| 203 | + bucket: (( grab meta.aws.bucket )) |
| 204 | + regexp: (( concat meta.name "-(.*).tgz" )) |
| 205 | + access_key_id: (( grab meta.aws.access_key )) |
| 206 | + secret_access_key: (( grab meta.aws.secret_key )) |
0 commit comments