Skip to content

Commit

Permalink
Upload stemcells independently of using bosh-deployment resource to
Browse files Browse the repository at this point in the history
avoid manifest being treated as v2.

Add CREDHUB_MODE parameter for write-cats-config and only set for bal pipeline

Signed-off-by: Keaty Gross <kgross@pivotal.io>
Signed-off-by: Sam Coward <scoward@pivotal.io>
  • Loading branch information
idoru authored and cf-buildpacks-eng committed Nov 6, 2017
1 parent 04172ff commit 51bc826
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -165,3 +165,4 @@ Some repositories are private for historical or security reasons. We list them f
* [buildpacks-ci-robots](https://github.com/pivotal-cf/buildpacks-ci-robots) See repository README.
* [cflinuxfs2-nc](https://github.com/pivotal-cf/cflinuxfs2-nc) See repository README.
* [cflinuxfs2-nc-release](https://github.com/pivotal-cf/cflinuxfs2-nc-release) See repository README.

1 change: 1 addition & 0 deletions pipelines/bal.yml
Expand Up @@ -238,6 +238,7 @@ jobs:
CI_CF_PASSWORD: {{ci-cf-bal-password}}
APPS_DOMAIN: bal.buildpacks-gcp.ci.cf-app.com
DIEGO_DOCKER_ON: true
CREDHUB_MODE: assisted
- task: add-flake-attempts-to-cats
file: buildpacks-ci/tasks/add-flake-attempts-to-cats/task.yml
- task: cats
Expand Down
9 changes: 7 additions & 2 deletions pipelines/cf-release.yml
Expand Up @@ -323,6 +323,13 @@ jobs:
- get: staticfile-buildpack-github-release
- get: binary-buildpack-github-release
- get: dotnet-core-buildpack-github-release
- task: upload-stemcell-to-bosh-lite
file: buildpacks-ci/tasks/upload-stemcell-to-bosh-lite/task.yml
params:
DEPLOYMENT_NAME: cf-release.buildpacks-gcp.ci
BOSH_USER: {{bosh_user}}
BOSH_PASSWORD: {{gcp_bosh_lite_admin_password}}
BOSH_TARGET: cf-release.buildpacks-gcp.ci.cf-app.com
- task: generate-manifest
file: buildpacks-ci/tasks/generate-cf-and-diego-manifests/task.yml
params:
Expand All @@ -341,7 +348,6 @@ jobs:
- put: cf-release-cf-deployment
params:
manifest: generate-manifest-artifacts/cf-release.buildpacks-gcp.ci/manifest.yml
stemcells: [lite-stemcell/*.tgz]
releases: [cf-release-artifacts/dev_releases/cf/*.tgz]
- task: upload-diego-release
file: buildpacks-ci/tasks/upload-diego-release/task.yml
Expand All @@ -353,7 +359,6 @@ jobs:
- put: cf-release-diego-deployment
params:
manifest: generate-manifest-artifacts/cf-release.buildpacks-gcp.ci/diego.yml
stemcells: ['lite-stemcell/stemcell.tgz']
releases:
- diego-bosh-release/release.tgz
- cflinuxfs2-bosh-release/release.tgz
Expand Down
12 changes: 12 additions & 0 deletions tasks/upload-stemcell-to-bosh-lite/run.sh
@@ -0,0 +1,12 @@
#!/bin/bash -l

set -o errexit
set -o nounset
set -o pipefail

pushd buildpacks-ci
# shellcheck disable=SC1091
source ./bin/target_bosh "$DEPLOYMENT_NAME"
popd

bosh upload stemcell https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent
20 changes: 20 additions & 0 deletions tasks/upload-stemcell-to-bosh-lite/task.yml
@@ -0,0 +1,20 @@
---
platform: linux
image_resource:
type: docker-image
source:
repository: cfbuildpacks/ci
inputs:
- name: bosh-lite
- name: buildpacks-ci
- name: cf-release
- name: diego-release
outputs:
- name: upload-stemcell-to-bosh-lite
run:
path: buildpacks-ci/tasks/upload-stemcell-to-bosh-lite/run.sh
params:
DEPLOYMENT_NAME:
BOSH_USER:
BOSH_PASSWORD:
BOSH_TARGET:
3 changes: 2 additions & 1 deletion tasks/write-cats-config/run.rb
Expand Up @@ -6,13 +6,14 @@
admin_password = ENV.fetch('CI_CF_PASSWORD')
apps_domain = ENV.fetch('APPS_DOMAIN')
diego_docker_on = ENV.fetch('DIEGO_DOCKER_ON')
credhub_mode = ENV.fetch('CREDHUB_MODE')

cats_config = {
"admin_password" => admin_password,
"admin_user" => admin_user,
"api" => "api.#{apps_domain}",
"apps_domain" => apps_domain,
"credhub_mode" => "assisted",
"credhub_mode" => credhub_mode,
"async_service_operation_timeout" => 1200,
"backend" => "diego",
"cf_push_timeout" => 600,
Expand Down
1 change: 1 addition & 0 deletions tasks/write-cats-config/task.yml
Expand Up @@ -18,3 +18,4 @@ params:
CI_CF_PASSWORD:
APPS_DOMAIN:
DIEGO_DOCKER_ON:
CREDHUB_MODE:

0 comments on commit 51bc826

Please sign in to comment.