-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Allow suppressing of build trigger in new-app #15429
Comments
@openshift/devex |
This is in our Trello backlog |
@csrwng what if I'd be willing to send in a PR for this? Would that change the status? In my experience this is a real issue and we would make people's life easier with it. |
👍 @mhausenblas PRs are always welcome :) |
How about naming it |
@mhausenblas ideally it would work not just for buildconfigs but also for deploymentconfigs so that they don't deploy automatically, so it shouldn't have 'build' or 'config-trigger' in the name. So either @bparees thoughts? |
@csrwng as much as i'm personally biased towards my --inert suggestion, --suppress-triggers is probably more obvious as to what it does, let's go w/ that. We can always send the PR through cli-review. |
I can see a bit of ambiguity here around use of The intent as I understand it is that want to create the build configuration and deployment configuration, but simply don't run the initial build. The initial build would have to be started using The use of I would suggest a better name is needed for the option which makes it clear you are deferring the running of the initial build only. It should also be an option name which can also be added to So I would suggest |
@GrahamDumpleton what you're asking for isn't possible. If you have an imagechangetrigger, it is going to fire when then the buildconfig is created because we're doing to see that we haven't yet run a build for the current level of the imagestream in question. There is no option for "run a build whenever the imagestream is newer than the most recent build, but only if we've run at least one build" and I'm not in favor of adding such logic just to serve this use case. So suppress-triggers really does describe what we'd implement here, which is that we'd create buildconfigs that do not have imagechange and configchangetriggers. Now, that does leave open questions for:
|
For new-app we have the case where you are only creating a new deployment from an existing image. In that case, I think it would be useful to suppress the deployment config trigger as well so you have a chance to add secrets, change env vars, etc. |
I considered that and don't disagree, but mostly likely people will be in the model of "i don't want the buildconfig to run, but once it does, i do want my DC to be triggered" so if we're going to allow suppressing the DC triggers also, i think that has to be separate/explicilit. ie "supress-bc-triggers" and "suppress-dc-triggers" as separate flags. (sigh). |
@bparees agree, this request came from real world problem ... @mhausenblas and me were using OpenShift to build project --from-dir ... however, as So, back to your comment, keeping DC's normal behaviour is what we would like to have, we just want to be able to skip the first initial build. |
@bparees I well suspected that it couldn't be done such that once first build was then manually triggered everything ran as normal. The point of me going to the extent of adding my description was to show to @mhausenblas that I felt the direction things were headed wasn't what they thought they perhaps really wanted as he was describing it to me before I posted my message. Anyway, if the desire is not to use the remote repo, but what was in the current directory, the option exists to use a binary build.
This doesn't result in a deployment configuration though and it can only be created once first build has completed:
When you use So if you end up having a way to not set triggers on the build configuration only when using
I am left wondering whether the binary build shouldn't have been used in the first place if they were attempting to test with local code only. I would have reservations though of having an option on In some respects the
Where the Does |
technically it creates a buildconfig that explicitly indicates it expects binary inputs (which helps provide nice error messages if you try to start the build by hand w/o providing a binary input), but in hindsight the "binary" model for buildconfigs is maybe not the greatest design, since any buildconfig can be run as a binary build, even if it doesn't explicitly declare itself to be a binary build. and there's no particular reason that new-app could not also have a --binary option, at least i can't think of one, i think we only added it to new-build because again we were trying to limit the explosion of new-app flags and --binary was more closely associated with new-build. |
This is the use-case https://github.com/mhausenblas/reshifter/blob/master/Makefile
a) it does not need to use remote git repo, but as |
In that case you would use
Or if it copies up the files into an As noted above, you afterwards still have to do:
when build finished. |
I would also consider interesting to be able to deploy skip application deployment, so additional configuration can be added to the deploymentConfig, like probes before doing a deployment. |
I think we covered all possible use-cases and even more :D I liked the idea of Could we do something like And if I understood consensus is if flag is provided we disable ImageChange, and ConfigChange triggers. But we can give hits how to re-enable them so "copy-paste" could be done easily. |
When creating new deployment using
oc new-app
it should be possible not to trigger the build automatically.Version
oc v1.5.1+7b451fc
kubernetes v1.5.2+43a9be4
features: Basic-Auth
openshift v1.5.1+7b451fc
kubernetes v1.5.2+43a9be4
Steps To Reproduce
Current Result
Build is automatically triggered as part of the
oc
command.Expected Result
There should be a switch to postpone the first build to be trigger by manual intervention.
The text was updated successfully, but these errors were encountered: