Commit d7a82f71 authored by David Blyth's avatar David Blyth

Gitlab CI: added docker build cleanup job

parent e7233d12
Pipeline #26 passed with stages
in 1 second
before_script:
- docker info
- docker info
stages:
- build
- build_cleanup
build_test:
script:
- docker build -t argonneeic/base:$CI_COMMIT_REF_NAME --build-arg BUILD_THREADS=20 .
only:
- branches
stage: build
script:
- docker build -t argonneeic/base:$CI_COMMIT_REF_NAME --build-arg BUILD_THREADS=20 .
except:
- master
build_latest:
script:
- docker build -t argonneeic/base --build-arg BUILD_THREADS=20 .
only:
- master
stage: build
script:
- docker build -t argonneeic/base --build-arg BUILD_THREADS=20 .
only:
- master
cleanup_docker:
stage: build_cleanup
script:
- docker rm $(docker ps -qa --no-trunc --filter "status=exited")
when: on_failure
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment