{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph-container/pulls/comments/182455970","pull_request_review_id":113254264,"id":182455970,"diff_hunk":"@@ -88,26 +88,27 @@ build.all:\n \n # ==============================================================================\n # Clean targets\n-.PHONY: clean clean.nones clean.all clean.nuke\n+.PHONY: clean clean.nones clean.all\n \n clean.image.%: do.image.%\n \t@$(call set_env_vars); rm -rf $$STAGING_DIR\n \n clean: $(foreach p, $(FLAVORS), clean.image.$(HOST_ARCH),$(p))\n \n clean.nones:\n-\t@docker rmi -f $(shell docker images | egrep \"^<none> \" | awk '{print $$3}' | uniq) || true\n+\t@if docker images | egrep -q \"^<none> \"; then \\\n+\t\tdocker rmi -f $(shell docker images | egrep \"^<none> \" | awk '{print $$3}' | uniq) || true ; \\\n+\tfi\n \n clean.all: clean.nones\n \t@rm -rf staging/\n-\t# Don't mess with other registries for some semblance of a safe clean.\n-\t@docker rmi -f \\\n-\t\t$(shell docker images | egrep \"^$(TAG_REGISTRY)/daemon(-base)? \" | \\\n-\t\t  awk '{print $$3}' | uniq) || true\n-\n-clean.nuke: clean.all\n-\t@docker rmi -f \\\n-\t\t$(shell docker images | egrep \"^.*/daemon(-base)? \" | awk '{print $$3}' | uniq) || true\n+\t@# Inspect each image, and if we find 'CEPH_POINT_RELEASE' we can be pretty sure it's a\n+\t@# ceph-container image and safe to delete\n+\t@for image in $(shell docker images | grep ago | awk '{ print $$3 }'); do \\","path":"Makefile","position":30,"original_position":30,"commit_id":"aa75b262ab7518e626bd0f7e26e6f3ebb31bdc9f","original_commit_id":"aa75b262ab7518e626bd0f7e26e6f3ebb31bdc9f","user":{"login":"ErwanAliasr1","id":4539421,"avatar_url":"https://avatars3.githubusercontent.com/u/4539421?v=4","gravatar_id":"","url":"https://api.github.com/users/ErwanAliasr1","html_url":"https://github.com/ErwanAliasr1","followers_url":"https://api.github.com/users/ErwanAliasr1/followers","following_url":"https://api.github.com/users/ErwanAliasr1/following{/other_user}","gists_url":"https://api.github.com/users/ErwanAliasr1/gists{/gist_id}","starred_url":"https://api.github.com/users/ErwanAliasr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErwanAliasr1/subscriptions","organizations_url":"https://api.github.com/users/ErwanAliasr1/orgs","repos_url":"https://api.github.com/users/ErwanAliasr1/repos","events_url":"https://api.github.com/users/ErwanAliasr1/events{/privacy}","received_events_url":"https://api.github.com/users/ErwanAliasr1/received_events","type":"User","site_admin":false},"body":"Grepping ago is a bad idea since its tied to a particular locale (en). If french that would fail. Getting the 4th column is surely safer.","created_at":"2018-04-18T14:50:41Z","updated_at":"2018-04-18T14:50:41Z","html_url":"https://github.com/ceph/ceph-container/pull/1026#discussion_r182455970","pull_request_url":"https://api.github.com/repos/ceph/ceph-container/pulls/1026","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-container/pulls/comments/182455970"},"html":{"href":"https://github.com/ceph/ceph-container/pull/1026#discussion_r182455970"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph-container/pulls/1026"}},"in_reply_to_id":182426047},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph-container/pulls/1026","id":182272215,"html_url":"https://github.com/ceph/ceph-container/pull/1026","diff_url":"https://github.com/ceph/ceph-container/pull/1026.diff","patch_url":"https://github.com/ceph/ceph-container/pull/1026.patch","issue_url":"https://api.github.com/repos/ceph/ceph-container/issues/1026","number":1026,"state":"open","locked":false,"title":"make: Revise clean targets","user":{"login":"BlaineEXE","id":3989526,"avatar_url":"https://avatars3.githubusercontent.com/u/3989526?v=4","gravatar_id":"","url":"https://api.github.com/users/BlaineEXE","html_url":"https://github.com/BlaineEXE","followers_url":"https://api.github.com/users/BlaineEXE/followers","following_url":"https://api.github.com/users/BlaineEXE/following{/other_user}","gists_url":"https://api.github.com/users/BlaineEXE/gists{/gist_id}","starred_url":"https://api.github.com/users/BlaineEXE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlaineEXE/subscriptions","organizations_url":"https://api.github.com/users/BlaineEXE/orgs","repos_url":"https://api.github.com/users/BlaineEXE/repos","events_url":"https://api.github.com/users/BlaineEXE/events{/privacy}","received_events_url":"https://api.github.com/users/BlaineEXE/received_events","type":"User","site_admin":false},"body":"Since it's now possible to change the image tags to arbitrary strings,\r\nour clean operations might just do nothing. Revise the way the\r\n`clean.all` target works. Inspect each docker image's metadata and look\r\nfor the string \"CEPH_POINT_RELEASE\" anywhere in the metadata.\r\n\"CEPH_POINT_RELEASE\" is a string all of our build containers should\r\nhave, and it is unlikely that another container build will use the same\r\nstring. \"CEPH_VERSION\", is also probably unlikely, but it is certain to\r\nbe more likely than \"CEPH_POINT_RELEASE\".\r\n\r\nDrop `clean.nuke` target, as its functionality is now encompassed by\r\n`clean.all`.\r\n\r\nSigned-off-by: Blaine Gardner <blaine.gardner@suse.com>","created_at":"2018-04-17T19:36:56Z","updated_at":"2018-04-18T14:50:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5b10f4025bfd8e103f017f5fa773727d95054c0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ErwanAliasr1","id":4539421,"avatar_url":"https://avatars3.githubusercontent.com/u/4539421?v=4","gravatar_id":"","url":"https://api.github.com/users/ErwanAliasr1","html_url":"https://github.com/ErwanAliasr1","followers_url":"https://api.github.com/users/ErwanAliasr1/followers","following_url":"https://api.github.com/users/ErwanAliasr1/following{/other_user}","gists_url":"https://api.github.com/users/ErwanAliasr1/gists{/gist_id}","starred_url":"https://api.github.com/users/ErwanAliasr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErwanAliasr1/subscriptions","organizations_url":"https://api.github.com/users/ErwanAliasr1/orgs","repos_url":"https://api.github.com/users/ErwanAliasr1/repos","events_url":"https://api.github.com/users/ErwanAliasr1/events{/privacy}","received_events_url":"https://api.github.com/users/ErwanAliasr1/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph-container/pulls/1026/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph-container/pulls/1026/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph-container/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph-container/issues/1026/comments","statuses_url":"https://api.github.com/repos/ceph/ceph-container/statuses/aa75b262ab7518e626bd0f7e26e6f3ebb31bdc9f","head":{"label":"SUSE:make-revise-clean-ops","ref":"make-revise-clean-ops","sha":"aa75b262ab7518e626bd0f7e26e6f3ebb31bdc9f","user":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":116880186,"name":"ceph-container","full_name":"SUSE/ceph-container","owner":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SUSE/ceph-container","description":"Docker files and images to run Ceph in containers","fork":true,"url":"https://api.github.com/repos/SUSE/ceph-container","forks_url":"https://api.github.com/repos/SUSE/ceph-container/forks","keys_url":"https://api.github.com/repos/SUSE/ceph-container/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE/ceph-container/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE/ceph-container/teams","hooks_url":"https://api.github.com/repos/SUSE/ceph-container/hooks","issue_events_url":"https://api.github.com/repos/SUSE/ceph-container/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE/ceph-container/events","assignees_url":"https://api.github.com/repos/SUSE/ceph-container/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE/ceph-container/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE/ceph-container/tags","blobs_url":"https://api.github.com/repos/SUSE/ceph-container/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE/ceph-container/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE/ceph-container/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE/ceph-container/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE/ceph-container/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE/ceph-container/languages","stargazers_url":"https://api.github.com/repos/SUSE/ceph-container/stargazers","contributors_url":"https://api.github.com/repos/SUSE/ceph-container/contributors","subscribers_url":"https://api.github.com/repos/SUSE/ceph-container/subscribers","subscription_url":"https://api.github.com/repos/SUSE/ceph-container/subscription","commits_url":"https://api.github.com/repos/SUSE/ceph-container/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE/ceph-container/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE/ceph-container/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE/ceph-container/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE/ceph-container/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE/ceph-container/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE/ceph-container/merges","archive_url":"https://api.github.com/repos/SUSE/ceph-container/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE/ceph-container/downloads","issues_url":"https://api.github.com/repos/SUSE/ceph-container/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE/ceph-container/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE/ceph-container/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE/ceph-container/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE/ceph-container/labels{/name}","releases_url":"https://api.github.com/repos/SUSE/ceph-container/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE/ceph-container/deployments","created_at":"2018-01-09T22:55:21Z","updated_at":"2018-04-17T19:13:39Z","pushed_at":"2018-04-17T19:40:20Z","git_url":"git://github.com/SUSE/ceph-container.git","ssh_url":"git@github.com:SUSE/ceph-container.git","clone_url":"https://github.com/SUSE/ceph-container.git","svn_url":"https://github.com/SUSE/ceph-container","homepage":null,"size":7269,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"1751e969b4d2d7693ad22adc2cc9630a624585ae","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars3.githubusercontent.com/u/1015767?v=4","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":29601598,"name":"ceph-container","full_name":"ceph/ceph-container","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars3.githubusercontent.com/u/1015767?v=4","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph-container","description":"Docker files and images to run Ceph in containers","fork":false,"url":"https://api.github.com/repos/ceph/ceph-container","forks_url":"https://api.github.com/repos/ceph/ceph-container/forks","keys_url":"https://api.github.com/repos/ceph/ceph-container/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph-container/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph-container/teams","hooks_url":"https://api.github.com/repos/ceph/ceph-container/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph-container/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph-container/events","assignees_url":"https://api.github.com/repos/ceph/ceph-container/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph-container/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph-container/tags","blobs_url":"https://api.github.com/repos/ceph/ceph-container/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph-container/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph-container/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph-container/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph-container/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph-container/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph-container/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph-container/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph-container/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph-container/subscription","commits_url":"https://api.github.com/repos/ceph/ceph-container/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph-container/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph-container/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph-container/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph-container/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph-container/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph-container/merges","archive_url":"https://api.github.com/repos/ceph/ceph-container/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph-container/downloads","issues_url":"https://api.github.com/repos/ceph/ceph-container/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph-container/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph-container/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph-container/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph-container/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph-container/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph-container/deployments","created_at":"2015-01-21T17:22:51Z","updated_at":"2018-04-17T21:20:54Z","pushed_at":"2018-04-18T12:01:35Z","git_url":"git://github.com/ceph/ceph-container.git","ssh_url":"git@github.com:ceph/ceph-container.git","clone_url":"https://github.com/ceph/ceph-container.git","svn_url":"https://github.com/ceph/ceph-container","homepage":null,"size":7233,"stargazers_count":706,"watchers_count":706,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":312,"mirror_url":null,"archived":false,"open_issues_count":127,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":312,"open_issues":127,"watchers":706,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-container/pulls/1026"},"html":{"href":"https://github.com/ceph/ceph-container/pull/1026"},"issue":{"href":"https://api.github.com/repos/ceph/ceph-container/issues/1026"},"comments":{"href":"https://api.github.com/repos/ceph/ceph-container/issues/1026/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph-container/pulls/1026/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph-container/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph-container/pulls/1026/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph-container/statuses/aa75b262ab7518e626bd0f7e26e6f3ebb31bdc9f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ErwanAliasr1"}}