Instrumental | 4ad4763 | 2018-07-13 15:49:26 -0500 | [diff] [blame] | 1 | #!/bin/bash |
Instrumental | 7a1817b | 2018-11-05 11:11:15 -0600 | [diff] [blame] | 2 | ######### |
| 3 | # ============LICENSE_START==================================================== |
| 4 | # org.onap.aaf |
| 5 | # =========================================================================== |
| 6 | # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. |
| 7 | # =========================================================================== |
| 8 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | # you may not use this file except in compliance with the License. |
| 10 | # You may obtain a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, software |
| 15 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | # See the License for the specific language governing permissions and |
| 18 | # limitations under the License. |
| 19 | # ============LICENSE_END==================================================== |
| 20 | # |
Instrumental | 12f7f46 | 2018-04-23 15:43:47 -0500 | [diff] [blame] | 21 | # Pull in Variables from d.props |
| 22 | . ./d.props |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 23 | DOCKER=${DOCKER:=docker} |
Instrumental | df9e827 | 2018-04-05 20:52:32 -0500 | [diff] [blame] | 24 | |
| 25 | if [ "$1" == "" ]; then |
Instrumental | 3505a52 | 2019-01-31 14:49:24 -0600 | [diff] [blame] | 26 | AAF_COMPONENTS="$(cat components) config core agent " |
Instrumental | df9e827 | 2018-04-05 20:52:32 -0500 | [diff] [blame] | 27 | else |
Instrumental | e44d2f7 | 2018-08-16 17:22:45 -0500 | [diff] [blame] | 28 | AAF_COMPONENTS="$@" |
Instrumental | df9e827 | 2018-04-05 20:52:32 -0500 | [diff] [blame] | 29 | fi |
| 30 | |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 31 | echo "Y" | $DOCKER container prune |
Instrumental | df9e827 | 2018-04-05 20:52:32 -0500 | [diff] [blame] | 32 | for AAF_COMPONENT in ${AAF_COMPONENTS}; do |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 33 | $DOCKER image rm $ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION} |
Instrumental | 235dd9a | 2018-10-03 21:36:44 -0500 | [diff] [blame] | 34 | if [ ! "$PREFIX" = "" ]; then |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 35 | $DOCKER image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION} |
| 36 | $DOCKER image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:latest |
Instrumental | e44d2f7 | 2018-08-16 17:22:45 -0500 | [diff] [blame] | 37 | fi |
Instrumental | df9e827 | 2018-04-05 20:52:32 -0500 | [diff] [blame] | 38 | done |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 39 | echo "Y" | $DOCKER image prune |