Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
add set-pipeline for gcp lre pipelines to pcf-pipeline update-pipelin…
Browse files Browse the repository at this point in the history
…es job

[#141653359]
  • Loading branch information
xchapter7x committed Jun 6, 2017
1 parent e68c5cc commit baa16bb
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 47 deletions.
5 changes: 5 additions & 0 deletions ci/pcf-pipelines/params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ upgrade_opsman_gcp_opsman_gcp_zone:
upgrade_opsman_gcp_opsman_gcp_diskimage_name:
upgrade_opsman_gcp_opsman_gcp_credfile_contents:
upgrade_opsman_gcp_opsman_major_minor_version:
params_lre2_gcp_ert_upgrade:
params_lre2_gcp_opsman_upgrade:
params_lre3_gcp_ert_upgrade:
params_lre3_gcp_opsman_upgrade:

149 changes: 102 additions & 47 deletions ci/pcf-pipelines/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,94 +187,115 @@ jobs:
- task: create-update-ert-config
file: pcf-pipelines/ci/tasks/create_update_ert_config.yml
params:
<<: *update_pipeline_params
<<: *aws_update_pipeline_params
- task: update-ert-pipeline
input_mapping: { config: update_ert_config }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: lre1-aws-ert-upgrade
PIPELINE_PATH: release/pcf-pipelines/upgrade-ert/pipeline.yml
ATC_EXTERNAL_URL: {{atc_external_url}}
ATC_BASIC_AUTH_USERNAME: {{fly_basic_auth_username}}
ATC_BASIC_AUTH_PASSWORD: {{fly_basic_auth_password}}
ATC_TEAM_NAME: {{atc_team_name}}
<<: *atc_creds

- do:
- task: create-update-buildpacks-config
file: pcf-pipelines/ci/tasks/create_update_buildpacks_config.yml
params:
<<: *update_pipeline_params
<<: *aws_update_pipeline_params
- task: update-buildpacks-pipeline
input_mapping: { config: update_buildpacks_config }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: lre1-aws-buildpacks-upgrade
PIPELINE_PATH: release/pcf-pipelines/upgrade-buildpacks/pipeline.yml
ATC_EXTERNAL_URL: {{atc_external_url}}
ATC_BASIC_AUTH_USERNAME: {{fly_basic_auth_username}}
ATC_BASIC_AUTH_PASSWORD: {{fly_basic_auth_password}}
ATC_TEAM_NAME: {{atc_team_name}}
<<: *atc_creds

- task: trigger-buildpacks-pipelines
file: pcf-pipelines/ci/tasks/trigger_buildpacks_pipelines.yml
params:
ATC_EXTERNAL_URL: {{atc_external_url}}
ATC_BASIC_AUTH_USERNAME: {{fly_basic_auth_username}}
ATC_BASIC_AUTH_PASSWORD: {{fly_basic_auth_password}}
ATC_TEAM_NAME: {{atc_team_name}}
<<: *atc_creds

- do:
- task: create-upgrade-opsman-aws-config
file: pcf-pipelines/ci/tasks/create_upgrade_opsman_aws_config.yml
params:
AWS_SECRET_ACCESS_KEY: {{upgrade_opsman_aws_aws_secret_access_key}}
AWS_REGION: {{upgrade_opsman_aws_aws_region}}
AWS_VPC_ID: {{upgrade_opsman_aws_aws_vpc_id}}
AWS_ACCESS_KEY_ID: {{upgrade_opsman_aws_aws_access_key_id}}
EXISTING_OPSMAN_VM_NAME: {{upgrade_opsman_aws_existing_opsman_vm_name}}
OPSMAN_URI: {{upgrade_opsman_aws_opsman_uri}}
OPSMAN_ADMIN_USERNAME: {{upgrade_opsman_aws_opsman_admin_username}}
OPSMAN_ADMIN_PASSWORD: {{upgrade_opsman_aws_opsman_admin_password}}
OPSMAN_TIMEOUT_SECONDS: {{opsman_timeout_seconds}}
OPSMAN_MAJOR_MINOR_VERSION: {{opsman_major_minor_version}}
PIVNET_TOKEN: {{pivnet_token}}
CHECK_NEW_OPSMAN_EVERY: 24h
<<: *aws_update_opsman_params

- task: update-upgrade-opsman-aws
input_mapping: { config: upgrade_opsman_aws_config }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: lre1-aws-opsman-upgrade
PIPELINE_PATH: release/pcf-pipelines/upgrade-ops-manager/aws/pipeline.yml
ATC_EXTERNAL_URL: {{atc_external_url}}
ATC_BASIC_AUTH_USERNAME: {{fly_basic_auth_username}}
ATC_BASIC_AUTH_PASSWORD: {{fly_basic_auth_password}}
ATC_TEAM_NAME: {{atc_team_name}}
<<: *atc_creds

- do:
- task: create-upgrade-opsman-gcp-config
file: pcf-pipelines/ci/tasks/create_upgrade_opsman_gcp_config.yml
params:
OPSMAN_PROJECT: {{upgrade_opsman_gcp_opsman_gcp_project}}
OPSMAN_ZONE: {{upgrade_opsman_gcp_opsman_gcp_zone}}
OPSMAN_DISKIMAGE_NAME: {{upgrade_opsman_gcp_opsman_gcp_diskimage_name}}
OPSMAN_GCP_CREDFILE_CONTENTS: {{upgrade_opsman_gcp_opsman_gcp_credfile_contents}}
EXISTING_OPSMAN_VM_NAME: {{upgrade_opsman_gcp_existing_opsman_vm_name}}
OPSMAN_URI: {{upgrade_opsman_gcp_opsman_uri}}
OPSMAN_ADMIN_USERNAME: {{upgrade_opsman_gcp_opsman_admin_username}}
OPSMAN_ADMIN_PASSWORD: {{upgrade_opsman_gcp_opsman_admin_password}}
OPSMAN_TIMEOUT_SECONDS: {{opsman_timeout_seconds}}
OPSMAN_MAJOR_MINOR_VERSION: {{upgrade_opsman_gcp_opsman_major_minor_version}}
PIVNET_TOKEN: {{pivnet_token}}
CHECK_NEW_OPSMAN_EVERY: 24h
<<: *gcp_update_opsman_params

- task: update-upgrade-opsman-gcp
input_mapping: { config: upgrade_opsman_gcp_config }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: upgrade-opsman-gcp
PIPELINE_PATH: release/pcf-pipelines/upgrade-ops-manager/gcp/pipeline.yml
ATC_EXTERNAL_URL: {{atc_external_url}}
ATC_BASIC_AUTH_USERNAME: {{fly_basic_auth_username}}
ATC_BASIC_AUTH_PASSWORD: {{fly_basic_auth_password}}
ATC_TEAM_NAME: {{atc_team_name}}
<<: *atc_creds

- do:
- task: lre2-gcp-create-update-ert-config
file: pcf-pipelines/ci/tasks/create_params.yml
params:
PARAMS_RAW: {{params_lre2_gcp_ert_upgrade}}
- task: lre2-gcp-update-ert-pipeline
input_mapping: { config: pipeline_params }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: lre2-gcp-ert-upgrade
PIPELINE_PATH: release/pcf-pipelines/upgrade-ert/pipeline.yml
<<: *atc_creds

- do:
- task: lre3-gcp-create-update-ert-config
file: pcf-pipelines/ci/tasks/create_params.yml
params:
PARAMS_RAW: {{params_lre3_gcp_ert_upgrade}}
- task: lre3-gcp-update-ert-pipeline
input_mapping: { config: pipeline_params }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: lre3-gcp-ert-upgrade
PIPELINE_PATH: release/pcf-pipelines/upgrade-ert/pipeline.yml
<<: *atc_creds

- do:
- task: lre2-gcp-opsman-upgrade-config
file: pcf-pipelines/ci/tasks/create_params.yml
params:
PARAMS_RAW: {{params_lre2_gcp_opsman_upgrade}}

- task: lre2-gcp-opsman-upgrade-pipeline
input_mapping: { config: pipeline_params }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: lre2-gcp-opsman-upgrade
PIPELINE_PATH: release/pcf-pipelines/upgrade-ops-manager/gcp/pipeline.yml
<<: *atc_creds

- do:
- task: lre3-gcp-opsman-upgrade-config
file: pcf-pipelines/ci/tasks/create_params.yml
params:
PARAMS_RAW: {{params_lre3_gcp_opsman_upgrade}}

- task: lre3-gcp-opsman-upgrade-pipeline
input_mapping: { config: pipeline_params }
file: pcf-pipelines/ci/tasks/set_pipeline.yml
params:
PIPELINE_NAME: lre3-gcp-opsman-upgrade
PIPELINE_PATH: release/pcf-pipelines/upgrade-ops-manager/gcp/pipeline.yml
<<: *atc_creds


- name: publish-release
serial_groups: [version]
Expand Down Expand Up @@ -343,7 +364,7 @@ jobs:
- put: version
params: {bump: patch, pre: rc}

update_pipeline_params: &update_pipeline_params
aws_update_pipeline_params: &aws_update_pipeline_params
IAAS_TYPE: {{iaas_type}}
PIVNET_TOKEN: {{pivnet_token}}
PIVNET_POLL_INTERVAL: {{pivnet_poll_interval}}
Expand All @@ -357,6 +378,40 @@ update_pipeline_params: &update_pipeline_params
OPSMAN_ADMIN_USERNAME: {{opsman_admin_username}}
OPSMAN_ADMIN_PASSWORD: {{opsman_admin_password}}

gcp_update_opsman_params: &gcp_update_opsman_params
OPSMAN_PROJECT: {{upgrade_opsman_gcp_opsman_gcp_project}}
OPSMAN_ZONE: {{upgrade_opsman_gcp_opsman_gcp_zone}}
OPSMAN_DISKIMAGE_NAME: {{upgrade_opsman_gcp_opsman_gcp_diskimage_name}}
OPSMAN_GCP_CREDFILE_CONTENTS: {{upgrade_opsman_gcp_opsman_gcp_credfile_contents}}
EXISTING_OPSMAN_VM_NAME: {{upgrade_opsman_gcp_existing_opsman_vm_name}}
OPSMAN_URI: {{upgrade_opsman_gcp_opsman_uri}}
OPSMAN_ADMIN_USERNAME: {{upgrade_opsman_gcp_opsman_admin_username}}
OPSMAN_ADMIN_PASSWORD: {{upgrade_opsman_gcp_opsman_admin_password}}
OPSMAN_TIMEOUT_SECONDS: {{opsman_timeout_seconds}}
OPSMAN_MAJOR_MINOR_VERSION: {{upgrade_opsman_gcp_opsman_major_minor_version}}
PIVNET_TOKEN: {{pivnet_token}}
CHECK_NEW_OPSMAN_EVERY: 24h

aws_update_opsman_params: &aws_update_opsman_params
AWS_SECRET_ACCESS_KEY: {{upgrade_opsman_aws_aws_secret_access_key}}
AWS_REGION: {{upgrade_opsman_aws_aws_region}}
AWS_VPC_ID: {{upgrade_opsman_aws_aws_vpc_id}}
AWS_ACCESS_KEY_ID: {{upgrade_opsman_aws_aws_access_key_id}}
EXISTING_OPSMAN_VM_NAME: {{upgrade_opsman_aws_existing_opsman_vm_name}}
OPSMAN_URI: {{upgrade_opsman_aws_opsman_uri}}
OPSMAN_ADMIN_USERNAME: {{upgrade_opsman_aws_opsman_admin_username}}
OPSMAN_ADMIN_PASSWORD: {{upgrade_opsman_aws_opsman_admin_password}}
OPSMAN_TIMEOUT_SECONDS: {{opsman_timeout_seconds}}
OPSMAN_MAJOR_MINOR_VERSION: {{opsman_major_minor_version}}
PIVNET_TOKEN: {{pivnet_token}}
CHECK_NEW_OPSMAN_EVERY: 24h

atc_creds: &atc_creds
ATC_EXTERNAL_URL: {{atc_external_url}}
ATC_BASIC_AUTH_USERNAME: {{fly_basic_auth_username}}
ATC_BASIC_AUTH_PASSWORD: {{fly_basic_auth_password}}
ATC_TEAM_NAME: {{atc_team_name}}

notify_slack: &notify_slack
put: slack
params:
Expand Down
22 changes: 22 additions & 0 deletions ci/tasks/create_params.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
platform: linux

image_resource:
type: docker-image
source:
repository: czero/cflinuxfs2

outputs:
- name: pipeline_params

params:
PARAMS_RAW:

run:
path: bash
args:
- -ce
- |
cat > pipeline_params/params.yml <<EOF
${PARAMS_RAW}
EOF

0 comments on commit baa16bb

Please sign in to comment.