-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support for condition
#13
Comments
Hey @sunkan, thanks for your interest!
That is correct.
This is to ensure that pipelines don't choke on them, yes. It also shows we're aware such a feature exists.
Sure, both ;) It was just so far this was never requested. And I personally had no hard requirement for it. Can you please share your concrete use-case (e.g. exemplary use with a (reduced) Also please let me know which version control system you're using for that project (e.g. git probably) and the version of it. My educated guess is that the information will be from the VCS (currently unimplemented) to identify whether or not the condition is met. So also please let me know what is preferable for executing local (.e.g. changes between two revisions) and if you have requirements to also run this remote in CI somewhere (apart from Bitbucket itself) so that this is visible upfront and the implementation can be made as reduced as possible (the more concrete the requirements are the better). |
Thanks for updating the issue and the additional clarification @sunkan. This already answers a couple of question that came to my mind, very helpful. A steps.condition entry will be added to the TODO in the read-me in the next release (0.0.60). This feature requires a couple of preparing steps in my eyes, all I'd like to get into pipelines:
The existing pattern/path matching is likely fitting and if not I'd assume it require only little changes/additions. The conditional check would run before executing the step, on the host. Do you make use of the |
The last two releases were driven by changes while looking into supporting Parsing the condition has been roughly done and more sooner than later we can push another release so that Now I have to think about the git integration and what the best behaviour is running So if you don't mind to share your thoughts, that would be great. Given to execute pipelines "as-is", what would you consider to happen? Should the git integration detect which kind of pipeline is to be run? If so what would be your expectations? Earlier I was thinking about to have this influenced by For development/testing I'm also considering to just take the last commit plus maybe staged file paths (and perhaps also non-staged modified and/or untracked files that are not ignored) to ease testing. This may be put behind a command-line flag so that I can file releases for user-tests until the feature stabilizes (questions can be often better answered by just executing and getting a feeling what is useful and what can be improved I can imagine). This should allow to see conditions already in action as it would create the list of paths to check the condition against. Also the git integration must not be that advanced as the information from git vcs is to generate a list of pathnames only, which is needed to run the conditions against. Additionally similar to
(sorry for this wall of text) |
Short update, in 0.0.65 conditions are now read from file and annotated as The release is not adding any other functionality though. |
Hi
What I can see the library don't support condition and changesets
I saw that you have a test yaml file with the structure test/data/yml/condition.yml but it don't seem to be used for anything else than to verify that its a valid pipeline config
So is this something that would be possible to implement or would you be open to a pull-request?
Yes we use git. And we only use it in BitBucket
How the detection work in BitBucket:
branches
sections they looks in the last commit and sees if any files matches theincludePaths
and if so run the step. This should be fairly simple to implementpull-requests
section it will look in all commits for changes that matchesincludePaths
. This might be harder but maybe we could require an option with a destionation branch and do the check against that diff?Usage example:
The text was updated successfully, but these errors were encountered: