{"action":"created","issue":{"url":"https://api.github.com/repos/envygeeks/docker-template/issues/25","repository_url":"https://api.github.com/repos/envygeeks/docker-template","labels_url":"https://api.github.com/repos/envygeeks/docker-template/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/envygeeks/docker-template/issues/25/comments","events_url":"https://api.github.com/repos/envygeeks/docker-template/issues/25/events","html_url":"https://github.com/envygeeks/docker-template/pull/25","id":169171279,"number":25,"title":"Fix noclean cache","user":{"login":"rflbianco","id":1336616,"avatar_url":"https://avatars.githubusercontent.com/u/1336616?v=3","gravatar_id":"","url":"https://api.github.com/users/rflbianco","html_url":"https://github.com/rflbianco","followers_url":"https://api.github.com/users/rflbianco/followers","following_url":"https://api.github.com/users/rflbianco/following{/other_user}","gists_url":"https://api.github.com/users/rflbianco/gists{/gist_id}","starred_url":"https://api.github.com/users/rflbianco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rflbianco/subscriptions","organizations_url":"https://api.github.com/users/rflbianco/orgs","repos_url":"https://api.github.com/users/rflbianco/repos","events_url":"https://api.github.com/users/rflbianco/events{/privacy}","received_events_url":"https://api.github.com/users/rflbianco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-03T16:10:52Z","updated_at":"2016-08-03T21:42:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/envygeeks/docker-template/pulls/25","html_url":"https://github.com/envygeeks/docker-template/pull/25","diff_url":"https://github.com/envygeeks/docker-template/pull/25.diff","patch_url":"https://github.com/envygeeks/docker-template/pull/25.patch"},"body":"This is a rewrite of the pull request #22 that had to be reverted.\r\n\r\nIt is meant to fix the same problem: the application cleans up the cache, even when `--no-cache` is passed or `clean: false` into `Opts.yml`.\r\n\r\nDifferently from the previous pull request, it does not change the default behaviour. At least, is meant to not do it. I have tested in several scenarios. I can't say about the other scenarios you use it in. I hope you can check them and that it works. Any problem, please report so I can fix ASAP.\r\n\r\nI've implemented, as you noticed before, and will see again, a short-circuit to skip cache clean up. The first line of the `Cache.cleanup()` returns immediately, cleaning no cache, when both `Repo.meta[\"clean\"]` and `Repo.meta[\"clean\"]` are `false`. This is to be the case only when:\r\n- `docker-template build/cache --no-clean`\r\n- Opts.yml contains `clean: false`\r\n\r\nThe `docker-template build/cache --clean | --no-clean` prevails over `Opts.yml`.  Also, the default behaviour, implemented in `Meta.DEFAULTS` is respected when neither the options `--clean | --no-clean` is passed or `cache: true | false` in `Opts.yml` exists. This means:\r\n\r\n| opts.yml { clean } | docker-template build/cache options |  cleanup       |\r\n|--------------------|-------------------------------------|----------------|\r\n| `false`            | **none**                            | **no clean**   |\r\n| `false`            | `--clean`                           | **clean**      |\r\n| `false`            | `--no-clean`                        | **no clean**   |\r\n| `true`             |  **none**                           | **clean**      |\r\n| `true`             | `--clean`                           | **clean**      |\r\n| `true`             | `--no-clean`                        | **no clean**   |\r\n| **nil**            |  **none**                           | `Meta.DEFAULTS.clean` |\r\n| **nil**            | `--clean`                           | **clean**      |\r\n| **nil**            | `--no-clean`                        | **no clean**   |\r\n"},"comment":{"url":"https://api.github.com/repos/envygeeks/docker-template/issues/comments/237383767","html_url":"https://github.com/envygeeks/docker-template/pull/25#issuecomment-237383767","issue_url":"https://api.github.com/repos/envygeeks/docker-template/issues/25","id":237383767,"user":{"login":"rflbianco","id":1336616,"avatar_url":"https://avatars.githubusercontent.com/u/1336616?v=3","gravatar_id":"","url":"https://api.github.com/users/rflbianco","html_url":"https://github.com/rflbianco","followers_url":"https://api.github.com/users/rflbianco/followers","following_url":"https://api.github.com/users/rflbianco/following{/other_user}","gists_url":"https://api.github.com/users/rflbianco/gists{/gist_id}","starred_url":"https://api.github.com/users/rflbianco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rflbianco/subscriptions","organizations_url":"https://api.github.com/users/rflbianco/orgs","repos_url":"https://api.github.com/users/rflbianco/repos","events_url":"https://api.github.com/users/rflbianco/events{/privacy}","received_events_url":"https://api.github.com/users/rflbianco/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T21:42:10Z","updated_at":"2016-08-03T21:42:10Z","body":"About the default, I believe it is up to you. I changed that behaviour before because I had misunderstood your CLI API. Either default are OK.\r\n\r\nWith `--no-clean` and `clean: false` working properly, I do understand that it is less critical the default value. However, thinking about the established user base, reverting may be better. Nevertheless, you are better qualified to judge about that matter."}}
{"actor":{"display_login":"rflbianco"}}