Skip to content

mevansam/cf-event-resource-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Foundry Event Resource

Detects cloud foundry events within a given target. The following events will be reported along with the application name, GUID and timestamp.

Event Description
created New application pushed
modified Application updated via push or restage
scaled Application was scaled up or down
routed-added A route was added to an application
routed-deleted A route was deleted from an application
deleted Application was deleted

Source Configuration

  • api: Required. The Cloud Foundry API endpoint.

  • user: Required. The Cloud Foundry user.

  • password: Required. The Cloud Foundry user's password.

  • org: Required. The target organization.

  • space: Required. The target space.

  • apps: *Optional. List of application names for which events will be retrieved.

  • skip-ssl-validation: *Optional. Skips verification of SSL certificates.

  • debug: *Optional. Enables debug logging of the concourse resource type.

  • trace: *Optional. Enable tracing HTTP request/responses to the Cloud Controller API.

Example

resource_types:

- name: cf-event-type
  type: docker-image
  source:
    repository: mevansam/cf-event
    tag: latest

resources:

- name: cf-event
  type: cf-event-type
  source:
    api: https://api.local.pcfdev.io
    user: admin
    password: admin
    org: pcfdev-org
    space: pcfdev-space
    skip-ssl-validation: true
    apps:
    - app1
    - app2

Behavior

check: Check for new events.

Queries the Cloud Foundry target's Event API and retrieves events for the given applications or all apps within the space. Only events that occurred after that last cached event will be retrieved. If no events are cached then the last application push event will be returned.

in: Fetch most recent events.

Creates content within the download directory that can be retrieved by jobs to determine the type of event, timestamp, etc.

Creates the following files in the download directory:

  • Env.sh exports the values passed in within the source configuration as shell variables.

    Example:

    export CF_API="https://api.local.pcfdev.io"
    export CF_USER="admin"
    export CF_PASSWORD="admin"
    export CF_ORG="pcfdev-org"
    export CF_SPACE="pcfdev-space"
    export CF_SKIP_SSL_VALIDATION="--skip-ssl-validation"
    export CF_APPS="app1 app2 "
  • version list of applications and event data.

  • metadata contains data around application events and when their timestamps

  • [app name].event contains the event for the app name

  • [app name].timestamp contains the timestamp for the event recorded for app name as a Unix timestamp integer value

Parameters

Not Applicable

About

Concourse resource type to detect Cloud Foundry events

Resources

Stars

Watchers

Forks

Packages

No packages published