Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Concourse resource for triggering pipelines based on BOSH deployment changes

License

Notifications You must be signed in to change notification settings

mkuratczyk/bosh-deployment-event-resource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BOSH Deployment Event Resource

A Concourse resource to trigger pipelines based on create/update/delete deployment events on a BOSH Director. The main use case is to trigger backup pipelines whenever there are deployment changes.

Known Issues

This resource will emit metadata which lists deployment changes. However, due to Concourse's architecture it may not perfectly reflect the content of the backup. This is because the metadata is collected during resource GET but backup is performed by your pipeline later (how much later depends on multiple factors, including what steps are there in your pipeline). Therefore some tasks can complete between the moment GET was executed and when the actual backup was taken and therefore the backup can contain changes not listed in the metadata.

Source Configuration

Field Required Type Description
target Y String BOSH Director URL (eg. https://192.168.50.6:25555)
client Y String BOSH client (eg. admin)
client_secret Y String BOSH client's secret (password)
ca_cert Y String BOSH Director CA Cert (as you would provide for BOSH CLI)
excluded_deployments N Array Deployment names that should be ignored (eg. ["bat", "dummy"])

Behavior

check: Returns the date of the most recent create/update/delete deployment event since the previous check (version).

in: Does nothing.

out: Does nothing.

Example Configuration

Resource Type

resource_types:
- name: bosh-deployment-event-resource
  type: docker-image
  source:
    repository: mkuratczyk/bosh-deployment-event-resource

Resource

resources:
- name: deployment-changes
  type: bosh-deployment-event-resource
  source:
    target: https://192.168.50.6:25555
    client: admin
    client_secret: password
    ca_cert: |
      -----BEGIN CERTIFICATE-----
      ...
      -----END CERTIFICATE-----
    excluded_deployments: ["dummy", "bat"]

Plan

This resource will only trigger your pipeline. You should have another task that perform the actual backup. Take a look bbr-pcf-pipeline-tasks for an example.

jobs:
- name: backup
  plan:
  - get: deployment-changes
    trigger: true
  - task: actual-backup-task
    ...

License

Apache License 2.0, see LICENSE.

About

Concourse resource for triggering pipelines based on BOSH deployment changes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages