|
|
@ -34,10 +34,8 @@ steps: |
|
|
|
settings: |
|
|
|
tar: ops-api-${DRONE_BUILD_NUMBER}.tar |
|
|
|
commands: |
|
|
|
- docker pull ${IMAGE} |
|
|
|
- docker save ${IMAGE} >ops-api-${DRONE_BUILD_NUMBER}.tar |
|
|
|
- dpr |
|
|
|
- suffix=$(echo "${IMAGE}" | awk -F '/' '{split($NF, a, ":"); print a[2]}') |
|
|
|
- echo suffix |
|
|
|
- docker images | grep "ops-api" | grep ${suffix} | awk '{print $3}' | xargs docker rmi |
|
|
|
when: |
|
|
|
target: [ "hi","prod" ] |
|
|
|