Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: set build-hook command #9194

Merged
merged 1 commit into from
Jun 8, 2016
Merged

Conversation

csrwng
Copy link
Contributor

@csrwng csrwng commented Jun 7, 2016

Allows setting a post-commit build hook on a build config.

If re-using built image entrypoint:

oc set build-hook [bc/]mybc --post-commit -- arg1 arg2

If specifying a new entrypoint:

oc set build-hook [bc/]mybc --post-commit --commnad -- command arg1 arg2

If specifying a script:

oc set build-hook [bc/]mybc --post-commit --script="command1 | command2 > output.txt && command3"

Although there's only one type of hook is currently allowed, the argument with the type of hook must be specified (--post-commit).

@csrwng
Copy link
Contributor Author

csrwng commented Jun 7, 2016

@bparees ptal

@csrwng csrwng force-pushed the set_buildhook branch 2 times, most recently from 3772625 to 01f3ddd Compare June 7, 2016 13:55
@csrwng
Copy link
Contributor Author

csrwng commented Jun 7, 2016

[test]

1 similar comment
@csrwng
Copy link
Contributor Author

csrwng commented Jun 7, 2016

[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 01f3ddd

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4548/)

cmd.Flags().StringSliceVarP(&options.Filenames, "filename", "f", options.Filenames, "Filename, directory, or URL to file to use to edit the resource.")

cmd.Flags().BoolVar(&options.PostCommit, "post-commit", options.PostCommit, "If true, set the post-commit build hook on a build config")
cmd.Flags().BoolVar(&options.Entrypoint, "command", options.Entrypoint, "If true, set the entrypoint of the hook container to the given command")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use the same syntax as for exec probes here --

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, wondering if people expect this to be the default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is fine.

@bparees
Copy link
Contributor

bparees commented Jun 7, 2016

lgtm [merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 01f3ddd

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 8, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4548/) (Image: devenv-rhel7_4330)

@openshift-bot openshift-bot merged commit 00310df into openshift:master Jun 8, 2016
@csrwng csrwng deleted the set_buildhook branch July 19, 2016 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants