github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/ci/infrastructure/pipeline.yml (about)

     1  ---
     2  groups:
     3  - name: create
     4    jobs:
     5    - setup-infrastructure
     6    - deploy-cf
     7  - name: delete
     8    jobs:
     9    - delete-cf
    10    - delete-infrastructure
    11  
    12  resources:
    13  - name: freshen-((stack_name))
    14    type: time
    15    source:
    16      start: 09:00 PM
    17      stop: 10:00 PM
    18      location: America/Los_Angeles
    19      days: [Saturday]
    20  - name: cf-deployment-concourse-tasks
    21    type: git
    22    source:
    23      uri: https://github.com/cloudfoundry/cf-deployment-concourse-tasks
    24      tag_filter: v*
    25  - name: cli-ci
    26    type: git
    27    source:
    28      uri: https://github.com/cloudfoundry/cli
    29      branch: master
    30      path: ci
    31  - name: cf-deployment
    32    type: git
    33    source:
    34      uri: https://github.com/cloudfoundry/cf-deployment
    35      tag_filter: v*
    36  - name: ops-files
    37    type: git
    38    source:
    39      uri: https://github.com/cloudfoundry/cf-deployment
    40      tag_filter: v*
    41  - name: state
    42    type: git
    43    source:
    44      uri: git@github.com:cloudfoundry/cli-private
    45      private_key: ((cli-private-github-private-key-write))
    46      branch: master
    47      paths:
    48      - ci/infrastructure/((stack_name))/bbl-state.json
    49  - name: cf-state
    50    type: git
    51    source:
    52      uri: git@github.com:cloudfoundry/cli-private
    53      private_key: ((cli-private-github-private-key-write))
    54      branch: master
    55      paths:
    56      - ci/infrastructure/((stack_name))/deployment-vars.yml
    57  
    58  jobs:
    59  - name: setup-infrastructure
    60    serial_groups: [((stack_name))]
    61    build_logs_to_retain: 100
    62    plan:
    63    - get: freshen-((stack_name))
    64      trigger: true
    65    - aggregate:
    66      - get: cf-deployment-concourse-tasks
    67      - get: state
    68    - task: setup-infrastructure
    69      file: cf-deployment-concourse-tasks/bbl-up/task.yml
    70      input_mapping:
    71        ops-files: state
    72        env-repo: state
    73      params:
    74        BBL_IAAS: gcp
    75        BBL_GCP_SERVICE_ACCOUNT_KEY: ((google_account_creds))
    76        BBL_GCP_PROJECT_ID: ((gcp_project))
    77        BBL_GCP_REGION: us-central1
    78        BBL_GCP_ZONE: us-central1-f
    79        BBL_LB_CERT: ((ssl_cert))
    80        BBL_LB_KEY: ((ssl_cert_private_key))
    81        LB_DOMAIN: ((stack_name)).cli.fun
    82        BBL_ENV_NAME: ((stack_name))
    83        BBL_STATE_DIR: ci/infrastructure/((stack_name))
    84      ensure:
    85        put: state
    86        params:
    87          repository: updated-env-repo
    88          rebase: true
    89  
    90  - name: deploy-cf
    91    serial_groups: [((stack_name))]
    92    build_logs_to_retain: 100
    93    plan:
    94    - aggregate:
    95      - get: cf-deployment-concourse-tasks
    96      - get: state
    97        passed: [setup-infrastructure]
    98        trigger: true
    99      - get: cf-state
   100      - get: cf-deployment
   101      - get: ops-files
   102      - get: cli-ci
   103    - task: upload-stemcell
   104      file: cf-deployment-concourse-tasks/bosh-upload-stemcell-from-cf-deployment/task.yml
   105      input_mapping:
   106        env-repo: state
   107      params:
   108        INFRASTRUCTURE: google
   109        BBL_STATE_DIR: ci/infrastructure/((stack_name))
   110    - task: create-vars-file
   111      file: cli-ci/ci/infrastructure/tasks/create-vars-file.yml
   112      params:
   113        CLIENT_SECRET: ((client_secret))
   114    - task: copy-ops-files
   115      file: cli-ci/ci/infrastructure/tasks/combine-inputs.yml
   116      input_mapping:
   117        input1: ops-files
   118        input2: cli-ci
   119      params:
   120        COPY_PATHS: "input1/operations/scale-to-one-az.yml input1/operations/test/add-persistent-isolation-segment-diego-cell.yml input1/operations/use-compiled-releases.yml input2/ci/infrastructure/operations/cli-isolation-cell-overrides.yml input2/ci/infrastructure/operations/default-app-memory.yml input2/ci/infrastructure/operations/diego-cell-instances.yml input2/ci/infrastructure/operations/skip-ssl-override.yml input2/ci/infrastructure/operations/uaa-vm_type-override.yml input2/ci/infrastructure/operations/add-uaa-client-credentials.yml"
   121    - task: deploy-cf
   122      file: cf-deployment-concourse-tasks/bosh-deploy/task.yml
   123      input_mapping:
   124        env-repo: state
   125        vars-store: cf-state
   126        vars-files: vars_path
   127        ops-files: combine_inputs_output
   128      params:
   129        SYSTEM_DOMAIN: ((stack_name)).cli.fun
   130        OPS_FILES: "add-persistent-isolation-segment-diego-cell.yml use-compiled-releases.yml cli-isolation-cell-overrides.yml default-app-memory.yml skip-ssl-override.yml scale-to-one-az.yml diego-cell-instances.yml uaa-vm_type-override.yml add-uaa-client-credentials.yml"
   131        VARS_STORE_FILE: ci/infrastructure/((stack_name))/deployment-vars.yml
   132        VARS_FILES: vars.yml
   133        BBL_STATE_DIR: ci/infrastructure/((stack_name))
   134      ensure:
   135        put: cf-state
   136        params:
   137          repository: updated-vars-store
   138          rebase: true
   139    - task: bosh-cleanup
   140      file: cf-deployment-concourse-tasks/bosh-cleanup/task.yml
   141      input_mapping:
   142        env-repo: state
   143      params:
   144        BBL_STATE_DIR: ci/infrastructure/((stack_name))
   145        CLEAN_ALL: true
   146  
   147  - name: delete-cf
   148    serial_groups: [((stack_name))]
   149    build_logs_to_retain: 100
   150    plan:
   151    - aggregate:
   152      - get: cf-deployment-concourse-tasks
   153      - get: state
   154    - task: delete-cf-deployment
   155      file: cf-deployment-concourse-tasks/bosh-delete-deployment/task.yml
   156      input_mapping:
   157        env-repo: state
   158      params:
   159        BBL_STATE_DIR: ci/infrastructure/((stack_name))
   160  
   161  - name: delete-infrastructure
   162    serial_groups: [((stack_name))]
   163    build_logs_to_retain: 100
   164    plan:
   165    - aggregate:
   166      - get: cf-deployment-concourse-tasks
   167      - get: state
   168    - task: destroy-infrastructure
   169      file: cf-deployment-concourse-tasks/bbl-destroy/task.yml
   170      input_mapping:
   171        env-repo: state
   172      params:
   173        BBL_STATE_DIR: ci/infrastructure/((stack_name))
   174      ensure:
   175        put: state
   176        params:
   177          repository: updated-env-repo
   178          rebase: true