Commit c6acd3e4 authored by Victor Nikulshin's avatar Victor Nikulshin
Browse files

Merge branch 'feature/docker.clean' into '2.x'


Removes container and images for a fresh workspace

See merge request !24
parents f8fee175 19d47c0d
Pipeline #1342 passed with stages
in 51 seconds
......@@ -9,11 +9,11 @@ health-check:
- fab --version
- fab -f . --list-format=nested --list
- docker-images
- docker-generic
image: ntdt/sonar-scanner:2.7
stage: quality
- cd $CI_PROJECT_DIR && /opt/sonar-scanner/bin/sonar-scanner$SONAR_HOST -Dsonar.login=$SONAR_TOKEN
- docker-images
- docker-generic
......@@ -16,6 +16,7 @@ This project adheres to[Semantic Versioning].
* Add a Patternlab command to build the static style guide: `fab`.
* Add a Git command to verify repositories states and warn user if changes might be lost.
* Add a docker.clean command to clean docker's workspace (removes container and image).
== 2.0.0 - 2016/05/09
......@@ -2,6 +2,7 @@ from __future__ import unicode_literals
from fabric.api import task, roles, env, local, run, lcd
from fabric.colors import red, green
from fabric.contrib.console import confirm
import helpers as h
......@@ -220,6 +221,21 @@ def image_remove():
print(red('Docker image {}/drupal was not found'.format(env.project_name)))
def clean():
Clean docker workspace (removes container & images)
if (confirm(
red('This will stop, remove container and delete docker image ' +
'related to this project. Do you want to continue?'),
def update_host():
Supports Markdown
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