{"action":"created","issue":{"url":"https://api.github.com/repos/buildkite/agent/issues/798","repository_url":"https://api.github.com/repos/buildkite/agent","labels_url":"https://api.github.com/repos/buildkite/agent/issues/798/labels{/name}","comments_url":"https://api.github.com/repos/buildkite/agent/issues/798/comments","events_url":"https://api.github.com/repos/buildkite/agent/issues/798/events","html_url":"https://github.com/buildkite/agent/pull/798","id":342109059,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMDg5NzM0","number":798,"title":"Support --command-only and --checkout-only in bootstrap","user":{"login":"lox","id":15758,"node_id":"MDQ6VXNlcjE1NzU4","avatar_url":"https://avatars1.githubusercontent.com/u/15758?v=4","gravatar_id":"","url":"https://api.github.com/users/lox","html_url":"https://github.com/lox","followers_url":"https://api.github.com/users/lox/followers","following_url":"https://api.github.com/users/lox/following{/other_user}","gists_url":"https://api.github.com/users/lox/gists{/gist_id}","starred_url":"https://api.github.com/users/lox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lox/subscriptions","organizations_url":"https://api.github.com/users/lox/orgs","repos_url":"https://api.github.com/users/lox/repos","events_url":"https://api.github.com/users/lox/events{/privacy}","received_events_url":"https://api.github.com/users/lox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-17T22:17:15Z","updated_at":"2018-07-18T01:30:20Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/buildkite/agent/pulls/798","html_url":"https://github.com/buildkite/agent/pull/798","diff_url":"https://github.com/buildkite/agent/pull/798.diff","patch_url":"https://github.com/buildkite/agent/pull/798.patch"},"body":"This allows for only running the command or checkout phase of the bootstrap. This allows for things like https://github.com/wolfeidau/buildkite-serverless-agent to run checkout and command phases independently.\r\n\r\nThe neat thing about this split is that generally you need to expose ssh key material to the checkout phase, where as you don't want to expose it to the command phase. Suspect this will end up being useful for Public Build isolation in several ways. \r\n\r\n```bash\r\n$ buildkite-agent bootstrap \\\r\n  --job \"llamas\" \\\r\n  --repository \"$PWD\" \\\r\n  --commit \"HEAD\" \\\r\n  --branch \"master\" \\\r\n  --agent \"my-agent\" \\\r\n  --organization \"buildkite\" \\\r\n  --pipeline \"agent\" \\\r\n  --pipeline-provider git \\\r\n  --build-path /usr/local/var/buildkite-agent/builds \\\r\n  --command-only \r\n  --command \"echo hello world\"\r\n\r\n~~~ Running commands\r\n$ echo hello world\r\nhello world\r\n```"},"comment":{"url":"https://api.github.com/repos/buildkite/agent/issues/comments/405779768","html_url":"https://github.com/buildkite/agent/pull/798#issuecomment-405779768","issue_url":"https://api.github.com/repos/buildkite/agent/issues/798","id":405779768,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTc3OTc2OA==","user":{"login":"keithpitt","id":25882,"node_id":"MDQ6VXNlcjI1ODgy","avatar_url":"https://avatars2.githubusercontent.com/u/25882?v=4","gravatar_id":"","url":"https://api.github.com/users/keithpitt","html_url":"https://github.com/keithpitt","followers_url":"https://api.github.com/users/keithpitt/followers","following_url":"https://api.github.com/users/keithpitt/following{/other_user}","gists_url":"https://api.github.com/users/keithpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/keithpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithpitt/subscriptions","organizations_url":"https://api.github.com/users/keithpitt/orgs","repos_url":"https://api.github.com/users/keithpitt/repos","events_url":"https://api.github.com/users/keithpitt/events{/privacy}","received_events_url":"https://api.github.com/users/keithpitt/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T01:30:20Z","updated_at":"2018-07-18T01:30:20Z","author_association":"MEMBER","body":"@lox I dig it! I'm wondering about the API, instead of `--checkout-only` or `--command-only`, what if it was just `--phase=checkout`, `--phase=command`?\r\n\r\nThat way you can avoid confusion between `buildkite-agnet bootstrap --checkout-only --command-only` being used at the same time?\r\n\r\nIf you also allow `--phase=plugin` that'd allow machines to actually pre-install plugins I think? Which could also be a cool side-effect?"}}
{"actor":{"display_login":"keithpitt"}}