Permalink
Fetching contributors…
Cannot retrieve contributors at this time
216 lines (193 sloc) 4.39 KB
groups: []
resource_types:
- name: gcs-resource
type: docker-image
source:
repository: frodenas/gcs-resource
- name: pull-request
type: docker-image
source:
repository: jtarchie/pr
resources:
- name: goulash-rc
type: gcs-resource
source:
bucket: goulash-releases
json_key: {{gcs-service-key}}
regexp: rc/goulash-(.*).tgz
- name: goulash-gh-release
type: github-release
source:
user: pivotalservices
repository: goulash
access_token: {{github-access-token}}
- name: goulash-gcs-release
type: gcs-resource
source:
bucket: goulash-releases
json_key: {{gcs-service-key}}
regexp: final/goulash-(.*).tgz
- name: goulash
type: git
source:
branch: master
private_key: {{git-private-key}}
uri: git@github.com:pivotalservices/goulash.git
- name: version
type: semver
source:
initial_version: 2.0.0-rc.1
driver: git
uri: git@github.com:pivotalservices/goulash.git
branch: version
file: version
private_key: {{git-private-key}}
- name: goulash-staging
type: cf
source:
api: https://api.run.pivotal.io
organization: {{cf-org}}
username: {{cf-username}}
password: {{cf-password}}
skip_cert_check: false
space: butler-staging
- name: goulash-production
type: cf
source:
api: https://api.run.pivotal.io
organization: {{cf-org}}
username: {{cf-username}}
password: {{cf-password}}
skip_cert_check: false
space: butler-production
- name: pr
type: pull-request
source:
repo: pivotalservices/goulash
access_token: {{github-access-token}}
private_key: {{git-private-key}}
jobs:
- name: test-and-build
plan:
- aggregate:
- get: goulash
resource: pr
trigger: true
- task: install-dependencies
file: goulash/ci/install-dependencies.yml
- do:
- aggregate:
- task: unit
file: goulash/ci/unit.yml
- task: build
file: goulash/ci/build.yml
on_failure:
put: pr
params:
path: goulash
status: failure
- put: pr
params:
path: goulash
status: success
- name: create-rc
serial_groups: [version]
plan:
- aggregate:
- get: goulash
trigger: true
- get: version
params: {pre: rc}
- task: install-dependencies
file: goulash/ci/install-dependencies.yml
- aggregate:
- task: unit
file: goulash/ci/unit.yml
- task: build
file: goulash/ci/build.yml
- aggregate:
- put: version
params: {pre: rc}
- put: goulash-rc
params:
file: tarball/goulash-*.tgz
- name: deploy-staging
plan:
- aggregate:
- get: release
resource: goulash-rc
passed: [create-rc]
trigger: true
- get: goulash
- task: unpack-release
file: goulash/ci/unpack-release.yml
- put: goulash-staging
params:
manifest: goulash/manifests/staging.yml
path: unpacked-release
current_app_name: the-butler
- name: shipit
serial_groups: [version]
plan:
- aggregate:
- get: goulash-rc
passed: [deploy-staging]
- get: version
params: {bump: final}
- get: goulash
passed: [deploy-staging]
- put: goulash
params:
only_tag: true
tag: version/version
tag_prefix: v
repository: goulash
- task: finalize-release
config:
platform: linux
image_resource:
type: docker-image
source:
repository: busybox
inputs:
- name: goulash-rc
- name: version
outputs:
- name: goulash-final-release
run:
path: sh
args:
- -exc
- |
version=$(cat version/version)
mv goulash-rc/goulash-*.tgz "goulash-final-release/goulash-$version.tgz"
- put: goulash-gcs-release
params:
file: goulash-final-release/goulash-*.tgz
- put: goulash-gh-release
params:
name: version/version
tag: version/version
tag_prefix: v
globs:
- goulash-rc/goulash-*.tgz
- put: version
params:
bump: minor
pre: rc
- name: deploy-production
plan:
- aggregate:
- get: release
resource: goulash-gcs-release
passed: [shipit]
trigger: true
- get: goulash
passed: [shipit]
- task: unpack-release
file: goulash/ci/unpack-release.yml
- put: goulash-production
params:
manifest: goulash/manifests/prod.yml
path: unpacked-release
current_app_name: the-butler