{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/4270","repository_url":"https://api.github.com/repos/mitchellh/packer","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/4270/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/4270/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/4270/events","html_url":"https://github.com/mitchellh/packer/issues/4270","id":194501128,"number":4270,"title":"Post-processors should be linked to builders when using the \"--only\" CLI option","user":{"login":"ttrifonov","id":1064596,"avatar_url":"https://avatars.githubusercontent.com/u/1064596?v=3","gravatar_id":"","url":"https://api.github.com/users/ttrifonov","html_url":"https://github.com/ttrifonov","followers_url":"https://api.github.com/users/ttrifonov/followers","following_url":"https://api.github.com/users/ttrifonov/following{/other_user}","gists_url":"https://api.github.com/users/ttrifonov/gists{/gist_id}","starred_url":"https://api.github.com/users/ttrifonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttrifonov/subscriptions","organizations_url":"https://api.github.com/users/ttrifonov/orgs","repos_url":"https://api.github.com/users/ttrifonov/repos","events_url":"https://api.github.com/users/ttrifonov/events{/privacy}","received_events_url":"https://api.github.com/users/ttrifonov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-09T02:51:41Z","updated_at":"2016-12-09T02:57:31Z","closed_at":"2016-12-09T02:57:31Z","body":"I am using the `--only` option to run a specific build (in my case `amazon-ebs`), but I have another builder with type `docker` and a post-processor `docker-tag` for it. Since the `--only` option doesn't run the Docker build, I can't limit the post-processor to not run and raise an error. I think post-processors should be able to be linked somehow (using a tag?) to builders, and the `--only` filter to apply to them as well.\r\n\r\n\r\n- Packer version from `packer version` - `0.12`\r\n- Host platform - Mac OS\r\n- Debug log output from `PACKER_LOG=1 packer build template.json`.\r\n\r\n```Build 'amazon-ebs' errored: 1 error(s) occurred:\r\n* Post-processor failed: Unknown artifact type: mitchellh.amazonebs\r\nCan only tag from Docker builder artifacts.\r\n```"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/265920719","html_url":"https://github.com/mitchellh/packer/issues/4270#issuecomment-265920719","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/4270","id":265920719,"user":{"login":"mwhooker","id":15618,"avatar_url":"https://avatars.githubusercontent.com/u/15618?v=3","gravatar_id":"","url":"https://api.github.com/users/mwhooker","html_url":"https://github.com/mwhooker","followers_url":"https://api.github.com/users/mwhooker/followers","following_url":"https://api.github.com/users/mwhooker/following{/other_user}","gists_url":"https://api.github.com/users/mwhooker/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhooker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhooker/subscriptions","organizations_url":"https://api.github.com/users/mwhooker/orgs","repos_url":"https://api.github.com/users/mwhooker/repos","events_url":"https://api.github.com/users/mwhooker/events{/privacy}","received_events_url":"https://api.github.com/users/mwhooker/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T02:57:31Z","updated_at":"2016-12-09T02:57:31Z","body":"I agree it could be a little more intuitive, but it should be possible with this https://www.packer.io/docs/templates/post-processors.html#run-on-specific-builds\r\n\r\nI'm not sure we can set up the `--only` flag to apply to the post-processors, too, since they may have different names than the builders."}}
{"actor":{"display_login":"mwhooker"}}