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

Commit

Permalink
Add delete-unused-products job to update-tile
Browse files Browse the repository at this point in the history
[#151811558]

Signed-off-by: Arron Hocking <ahocking@pivotal.io>
  • Loading branch information
christianang authored and ahocking committed Oct 24, 2017
1 parent 165d7fa commit c29b244
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tasks/delete-unused-products/task.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -eu

# Copyright 2017-Present Pivotal Software, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

echo "Delete unused products on Ops Manager @ ${OPSMAN_DOMAIN_OR_IP_ADDRESS}"

om-linux \
--target "https://${OPSMAN_DOMAIN_OR_IP_ADDRESS}" \
--skip-ssl-validation \
--username "${OPSMAN_USERNAME}" \
--password "${OPSMAN_PASSWORD}" \
delete-unused-products
31 changes: 31 additions & 0 deletions tasks/delete-unused-products/task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2017-Present Pivotal Software, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
platform: linux

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

inputs:
- name: pcf-pipelines

params:
OPSMAN_USERNAME:
OPSMAN_PASSWORD:
OPSMAN_DOMAIN_OR_IP_ADDRESS:

run:
path: pcf-pipelines/tasks/delete-unused-products/task.sh
11 changes: 11 additions & 0 deletions upgrade-tile/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,14 @@ jobs:
OPSMAN_USERNAME: {{opsman_admin_username}}
OPSMAN_PASSWORD: {{opsman_admin_password}}
OPSMAN_DOMAIN_OR_IP_ADDRESS: {{opsman_domain_or_ip_address}}

- name: delete-unused-products
plan:
- aggregate:
- get: pcf-pipelines
- task: delete-unused-products
file: pcf-pipelines/tasks/delete-unused-products/task.yml
params:
OPSMAN_USERNAME: {{opsman_admin_username}}
OPSMAN_PASSWORD: {{opsman_admin_password}}
OPSMAN_DOMAIN_OR_IP_ADDRESS: {{opsman_domain_or_ip_address}}

0 comments on commit c29b244

Please sign in to comment.