Skip to content

Instantly share code, notes, and snippets.

@Anthonyhawkins
Created June 8, 2021 17:30
Show Gist options
  • Save Anthonyhawkins/0f49eceaec5a76e72438dfa0d6baae9c to your computer and use it in GitHub Desktop.
Save Anthonyhawkins/0f49eceaec5a76e72438dfa0d6baae9c to your computer and use it in GitHub Desktop.
resources:
- name: config-repo
type: git
source:
uri: ((git_repo_uri))
branch: ((git_repo_branch))
# only watch for changes in config directory
paths: ["ci", "((config_dir))"]
- name: cf-mgmt
type: docker-image
source:
repository: pivotalservices/cf-mgmt
tag: "1.0.48"
- name: time-trigger
type: time
source:
interval: ((time-trigger))
jobs:
- name: create-orgs
plan:
- get: config-repo
trigger: true
- get: cf-mgmt
- task: create-orgs
image: cf-mgmt
config:
platform: linux
inputs:
- name: config-repo
params:
SYSTEM_DOMAIN: ((system_domain))
USER_ID: ((user_id))
PASSWORD: ((password))
CONFIG_DIR: ((config_dir))
CLIENT_SECRET: ((client_secret))
LOG_LEVEL: ((log_level))
CF_MGMT_COMMAND: create-orgs
run:
path: config-repo/ci/tasks/cf-mgmt.sh
- name: shared-domains
plan:
- get: config-repo
trigger: true
- get: cf-mgmt
- task: shared-domains
image: cf-mgmt
config:
platform: linux
inputs:
- name: config-repo
params:
SYSTEM_DOMAIN: ((system_domain))
USER_ID: ((user_id))
PASSWORD: ((password))
CONFIG_DIR: ((config_dir))
CLIENT_SECRET: ((client_secret))
LOG_LEVEL: ((log_level))
CF_MGMT_COMMAND: shared-domains
run:
path: config-repo/ci/tasks/cf-mgmt.sh
...
- name: cleanup-org-users
plan:
- get: config-repo
passed: [update-org-users,update-space-users]
trigger: true
- get: cf-mgmt
- get: time-trigger
trigger: true
- task: cleanup-org-users
image: cf-mgmt
config:
platform: linux
inputs:
- name: config-repo
params:
SYSTEM_DOMAIN: ((system_domain))
USER_ID: ((user_id))
PASSWORD: ((password))
CONFIG_DIR: ((config_dir))
CLIENT_SECRET: ((client_secret))
LOG_LEVEL: ((log_level))
CF_MGMT_COMMAND: cleanup-org-users
run:
path: config-repo/ci/tasks/cf-mgmt.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment