Permalink
Fetching contributors…
Cannot retrieve contributors at this time
453 lines (418 sloc) 16.5 KB
resource_types: #######################################################################################################
- name: concourse2tracker
type: docker-image
source:
repository: cfbuildpacks/concourse2tracker
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
resources: ############################################################################################################
## Git Repos ##
- name: binary-builder
type: git
source:
uri: {{binary-builder-git-uri}}
- name: buildpacks-ci
type: git
source:
uri: {{buildpacks-ci-git-uri-public}}
branch: {{buildpacks-ci-git-uri-public-branch}}
- name: builds-out
type: git
source:
uri: git@github.com:cloudfoundry/public-buildpacks-ci-robots
branch: master
paths: [ binary-builds/* ]
private_key: {{public-buildpacks-ci-robots-private-key}}
# used to make concourse display layout match logical layout
- name: dummy-resource
type: git
source:
uri: https://github.com/cloudfoundry/public-buildpacks-ci-robots
branch: master
<% dep_build_names = %w(bower go bundler composer dotnet glide godep dep hwc jruby php php7 python node nginx ruby) %>
<% dep_build_names.each do |dep| %>
- name: <%= dep %>-builds
type: git
source:
uri: git@github.com:cloudfoundry/public-buildpacks-ci-robots
branch: master
paths: [ binary-builds/<%= dep %>-builds.yml ]
private_key: {{public-buildpacks-ci-robots-private-key}}
<% end %>
<% dep_built_output_names = dep_build_names + %w(dotnet-framework) %>
<% dep_built_output_names.each do |dep| %>
- name: <%= dep %>-built-output
type: git
source:
uri: git@github.com:cloudfoundry/public-buildpacks-ci-robots
branch: master
paths: [ binary-built-output/<%= dep %>-built.yml ]
private_key: {{public-buildpacks-ci-robots-private-key}}
<% end %>
- name: dotnet-framework-built-output-trigger
type: git
source:
uri: git@github.com:cloudfoundry/public-buildpacks-ci-robots
branch: master
paths: [ binary-built-output/dotnet-framework-built.yml ]
private_key: {{public-buildpacks-ci-robots-private-key}}
<% %w(bower bundler composer dotnet glide godep dep hwc nginx node).each do |auto_dep| %>
- name: <%= auto_dep %>-builds-in
type: git
source:
uri: git@github.com:cloudfoundry/public-buildpacks-ci-robots
branch: master
paths: [ binary-builds/<%= auto_dep %>-builds.yml ]
private_key: {{public-buildpacks-ci-robots-private-key}}
- name: <%= auto_dep %>-new-releases
type: git
source:
uri: git@github.com:cloudfoundry/public-buildpacks-ci-robots
branch: master
paths: [ new-release-notifications/<%= auto_dep %>-new.yml ]
private_key: {{public-buildpacks-ci-robots-private-key}}
<% end %>
<% %w(go dotnet-core hwc nodejs ruby php staticfile).each do |language| %>
- name: <%= language %>-buildpack
type: git
source:
uri: git@github.com:<%= organization %>/<%= language %>-buildpack.git
private_key: {{<%= language %>-buildpack-private-key}}
branch: develop
ignore_paths:
- VERSION
- CHANGELOG
<% end %>
<% %w(nodejs dotnet-core).each do |language| %>
- name: previous-<%= language %>-buildpack
type: git
source:
uri: git@github.com:<%= organization %>/<%= language %>-buildpack.git
private_key: {{<%= language %>-buildpack-private-key}}
branch: master
tag_filter: "v*[0-9].*[0-9].*[0-9]"
ignore_paths:
- VERSION
- CHANGELOG
<% end %>
## Concourse2Tracker ##
- name: concourse2tracker
type: concourse2tracker
- name: failure-alert
type: slack-notification
source:
url: {{concourse-job-failure-notifications-slack-webhook}}
## Docker Images ##
- name: docker-cflinuxfs2-rootfs
type: docker-image
source:
repository: cloudfoundry/cflinuxfs2
username: {{buildpacks-docker-username}}
password: {{buildpacks-docker-password}}
email: cf-buildpacks-eng@pivotal.io
<% dep_build_names = %w(bower go bundler composer dotnet glide godep dep hwc jruby php php7 python node nginx ruby) %>
<% dep_build_names.each do |dep| %>
- name: buildpacks-bucket-<%= dep %>
type: s3
source:
bucket: {{buildpacks-binaries-s3-bucket}}
access_key_id: {{pivotal-buildpacks-s3-access-key}}
secret_access_key: {{pivotal-buildpacks-s3-secret-key}}
regexp: dependencies/<%= dep %>/<%= dep %>.*(\d+.\d+.\d+)(.*)
<% end %>
groups: ###############################################################################################################
- name: enqueue-automated-builds
jobs:
<% %w(bower bundler composer dotnet glide godep dep hwc nginx node).each do |auto_dep| %>
- trigger-<%= auto_dep %>-build
<% end %>
- name: automated-builds
jobs:
- binary-builder-specs
<% %w(bower bundler composer dotnet glide godep dep hwc nginx node).each do |auto_dep| %>
- build-<%= auto_dep %>
<% end %>
<% {go: ["godep", "glide", "dep" ], hwc: ["hwc"], staticfile: ["nginx"], php: ["nginx", "composer"], nodejs: ["node"], ruby: ["node","bundler"], 'dotnet-core' => ['dotnet', 'node', 'bower', 'dotnet-framework'] }.each do |buildpack, dependencies| %>
<% dependencies.each do |dependency| %>
- update-<%= dependency %>-in-<%= buildpack %>-buildpack
<% end %>
- extract-dotnet-framework
<% end %>
- name: manual-builds
jobs:
- binary-builder-specs
<% %w(go php php7 ruby jruby python).each do |dependency| %>
- build-<%= dependency %>
<% end %>
<% integration_spec_names = %w(bundler glide go godep dep httpd hwc jruby nginx nodejs php5 php7 php5_with_oracle php7_with_oracle php5_with_geolitedb php7_with_geolitedb python ruby url_output yaml_flag dotnet) %>
- name: binary-builder-specs
jobs:
- binary-builder-specs
- binary-builder-specs-unit
<% integration_spec_names.each do |spec_name| %>
- binary-builder-specs-<%= spec_name %>
<% end %>
jobs: #################################################################################################################
- name: binary-builder-specs
serial: true
public: true
plan:
- aggregate:
- get: buildpacks-ci
- get: binary-builder
trigger: true
passed:
<% integration_spec_names.each do |spec_name| %>
- binary-builder-specs-<%= spec_name %>
<% end %>
- name: binary-builder-specs-unit
serial: true
public: true
plan:
- aggregate:
- get: buildpacks-ci
- get: docker-cflinuxfs2-rootfs
trigger: true
- get: binary-builder
trigger: true
- do:
- task: all-expected-integration-specs-will-run
file: buildpacks-ci/tasks/check-for-binary-builder-integration-spec-presence/task.yml
params:
SPEC_NAMES: <%= integration_spec_names.join(',') %>
- task: all-unit-tests
file: buildpacks-ci/tasks/run-binary-builder-unit-specs/task.yml
params:
RUBYGEM_MIRROR: {{rubygem-mirror}}
on_failure:
put: failure-alert
params:
text: "$BUILD_PIPELINE_NAME $BUILD_JOB_NAME job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
channel: {{concourse-job-failure-notifications-slack-channel}}
username: concourse
icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% integration_spec_names.each do |spec_name| %>
- name: binary-builder-specs-<%= spec_name %>
serial: true
public: true
plan:
- aggregate:
- get: buildpacks-ci
- get: docker-cflinuxfs2-rootfs
trigger: true
- get: binary-builder
passed: [ binary-builder-specs-unit ]
trigger: true
- do:
- aggregate:
- task: integration-<%= spec_name %>
file: buildpacks-ci/tasks/run-binary-builder-integration-specs/task.yml
params:
SPEC_TO_RUN: <%= spec_name %>
RUBYGEM_MIRROR: {{rubygem-mirror}}
RUN_ORACLE_PHP_TESTS: <%= run_oracle_php_tests %>
<% if run_oracle_php_tests == 'true' %>
AWS_ACCESS_KEY_ID: {{oracle-client-library-s3-download-access-key}}
AWS_SECRET_ACCESS_KEY: {{oracle-client-library-s3-download-secret-key}}
AWS_DEFAULT_REGION: us-east-1
ORACLE_LIBS_AWS_BUCKET: {{oracle-client-libs-s3-bucket}}
ORACLE_LIBS_FILENAME: {{oracle-client-libs-filename}}
<% end %>
attempts: 5
on_failure:
put: failure-alert
params:
text: "$BUILD_PIPELINE_NAME $BUILD_JOB_NAME job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
channel: {{concourse-job-failure-notifications-slack-channel}}
username: concourse
icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% end %>
<% %w(go php php7 ruby jruby python).each do |dependency| %>
- name: build-<%= dependency %>
serial: true
public: true
disable_manual_trigger: true # instead, trigger jobs by pushing yaml to public-buildpacks-ci-robots/binary-builds
plan:
- aggregate:
- get: builds-yaml
resource: <%= dependency %>-builds
trigger: true
- get: binary-builder
passed: [binary-builder-specs]
- get: buildpacks-ci
- get: built-yaml
resource: <%= dependency %>-built-output
- do:
- task: build-binary
file: buildpacks-ci/tasks/build-binary/task.yml
params:
DEPENDENCY: <%= dependency %>
GIT_SSH_KEY: {{public-buildpacks-ci-robots-private-key}}
RUBYGEM_MIRROR: {{rubygem-mirror}}
BINARY_BUILDER_PLATFORM: {{binary-builder-platform}}
BINARY_BUILDER_OS_NAME: {{binary-builder-os-name}}
- put: buildpacks-bucket-<%= dependency %>
params:
file: binary-builder-artifacts/<%= dependency %>*
- put: builds-out
params:
repository: builds-yaml-artifacts
rebase: true
- put: concourse2tracker
params:
api_token: {{pivotal-tracker-api-token}}
git_path: builds-yaml
project_id: {{cf-buildpacks-public-tracker-id}}
on_failure:
put: failure-alert
params:
text: "$BUILD_PIPELINE_NAME $BUILD_JOB_NAME job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
channel: {{concourse-job-failure-notifications-slack-channel}}
username: concourse
icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% end %>
<% %w(bower bundler godep dep hwc dotnet composer glide nginx node).each do |dependency| %>
- name: trigger-<%= dependency %>-build
serial: true
public: true
plan:
- aggregate:
- get: buildpacks-ci
- get: new-releases
resource: <%= dependency %>-new-releases
trigger: true
- get: binary-builds
resource: <%= dependency %>-builds
- task: queue-binary-build
file: buildpacks-ci/tasks/queue-dependency-build/task.yml
params:
DEPENDENCY: <%= dependency %>
- put: <%= dependency %>-builds
params:
repository: binary-builds-artifacts
rebase: true
- name: build-<%= dependency %>
serial: true
public: true
plan:
- aggregate:
- get: built-yaml
resource: <%= dependency %>-built-output
- get: builds-yaml
resource: <%= dependency %>-builds-in
version: every
trigger: true
- get: binary-builder
passed: [binary-builder-specs]
- get: buildpacks-ci
- do:
- task: build-binary
<% if dependency.to_s == 'nginx' %> #nginx flakes on build-binary
attempts: 3
<% end %>
file: buildpacks-ci/tasks/build-binary/task.yml
params:
GIT_SSH_KEY: {{public-buildpacks-ci-robots-private-key}}
DEPENDENCY: <%= dependency %>
RUBYGEM_MIRROR: {{rubygem-mirror}}
BINARY_BUILDER_PLATFORM: {{binary-builder-platform}}
BINARY_BUILDER_OS_NAME: {{binary-builder-os-name}}
- put: buildpacks-bucket-<%= dependency %>
params:
file: binary-builder-artifacts/<%= dependency %>*
- put: builds-out
resource: <%= dependency %>-built-output
params:
repository: builds-yaml-artifacts
rebase: true
- put: concourse2tracker
params:
api_token: {{pivotal-tracker-api-token}}
git_path: builds-yaml
project_id: {{cf-buildpacks-public-tracker-id}}
on_failure:
put: failure-alert
params:
text: "$BUILD_PIPELINE_NAME $BUILD_JOB_NAME job on Concourse failed! \n Check: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME"
channel: {{concourse-job-failure-notifications-slack-channel}}
username: concourse
icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png
<% end %>
<% core_dependencies = { nodejs: ["node"], 'dotnet-core' => ["dotnet"] } %>
<% {go: ["godep", "glide", "dep"], hwc: ["hwc"], staticfile: ["nginx"], php: ["nginx", "composer"], nodejs: ["node"], ruby: ["node", "bundler"], 'dotnet-core' => ['dotnet', 'node', 'bower', 'dotnet-framework']}.each do |buildpack, dependencies| %>
<% dependencies.each do |dependency| %>
- name: update-<%= dependency %>-in-<%= buildpack %>-buildpack
serial: true
public: true
plan:
- do:
- aggregate:
- get: buildpacks-ci
- get: buildpack-input
resource: <%= buildpack %>-buildpack
- get: previous-buildpack
<% if core_dependencies[buildpack] && core_dependencies[buildpack].include?(dependency) %>
resource: previous-<%= buildpack %>-buildpack
<% else %>
resource: dummy-resource
<% end %>
- get: built-out
<% if dependency != 'dotnet-framework' %>
resource: <%= dependency %>-built-output
passed: [ build-<%= dependency %> ]
<% else %>
resource: <%= dependency %>-built-output-trigger
<% end %>
version: every
trigger: true
<% if dependency == 'dotnet-framework' %>
- get: dummy-resource
passed: [ extract-dotnet-framework ]
<% end %>
- task: update-dependency-in-manifests
file: buildpacks-ci/tasks/update-dependency-in-buildpack/task.yml
params:
BUILDPACK_NAME: <%= buildpack %>
DEPENDENCY: <%= dependency %>
TRACKER_PROJECT_ID: {{cf-buildpacks-public-tracker-id}}
TRACKER_API_TOKEN: {{pivotal-tracker-api-token}}
TRACKER_REQUESTER_ID: {{cf-buildpacks-requester-id}}
BUILDPACK_DEPENDENCIES_HOST_DOMAIN: {{buildpack-dependencies-host-domain}}
BOSH_LITE_DOMAIN_NAME: {{bosh-lite-domain-name}}
- put: <%= buildpack %>-buildpack
params:
repository: buildpack
rebase: true
<% end %>
<% end %>
- name: extract-dotnet-framework
serial: true
public: true
plan:
- aggregate:
- get: buildpacks-ci
- get: dummy-resource
- get: built-yaml
passed: [ build-dotnet ]
resource: dotnet-built-output
trigger: true
- get: dotnet-framework-built
resource: dotnet-framework-built-output
- do:
- task: extract-dotnet-framework
file: buildpacks-ci/tasks/extract-dotnet-framework/task.yml
- task: push-binary
file: buildpacks-ci/tasks/push-binary/task.yml
params:
DEPENDENCY: dotnet-framework
BUCKET_NAME: {{buildpacks-binaries-s3-bucket}}
AWS_ACCESS_KEY_ID: {{pivotal-buildpacks-s3-access-key}}
AWS_SECRET_ACCESS_KEY: {{pivotal-buildpacks-s3-secret-key}}
AWS_DEFAULT_REGION: us-east-1
TEST_CREDENTIAL_FILTER_WHITELIST: BUCKET_NAME
- put: dotnet-framework-built-output
params:
repository: dotnet-framework-built-output
rebase: true