-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
add support of multiple values in host label #3899
add support of multiple values in host label #3899
Conversation
Nice! |
Actually, what about implementing a better support with |
Please fix tests and add docs. |
test / e2e is failing for other reasos. |
I don't feel like that is necessary. The feature in PR covers all my requirements at the moment. |
fa6c4cb
to
46f2a23
Compare
@antonmedv I have updated docs and tests. |
- example of usage: host('prod.example.org') ->set('hostname', 'example.cloud.google.com'); ->setLabel( 'state' => 'prod' 'role' => ['build','web','redis'] ]); host('prod-db.example.org') ->set('hostname', 'example.cloud.google.com'); ->setLabel( 'state' => 'prod' 'role' => ['db'] ]); host('qa.example.org') ->set('hostname', 'example.cloud.google.com'); ->setLabel( 'state' => 'qa' 'role' => ['build','web','redis','db'] ]); host('dev.example.org') ->set('hostname', 'example.cloud.google.com'); ->setLabel( 'state' => 'qa' 'role' => ['build','web','redis','db'] ]); ... desc('Clear pagespeed'); task('pagespeed:clear', function () { run("rm -rf {{deploy_path}}/{{pagespeed_path}}* || true"); })->select('stage=prod|qa & role=web'); // assuming pagespeed is installed only on prod and qa envs
a9b6ae4
to
5959fa4
Compare
Allow usage of
(c1 OR c2) AND (c3 or c4)
condition to select() queryThe existing solution does not allow OR conditions in the scope of single label value in the select query.
The following example is only possible:
In other words, only the following conditions could be defined in the query:
Example:
But in most cases, we need the following query:
Example:
The PR is adding that support.
Example of usage:
Define hosts
Define tasks
Bug fix #…?
New feature?
BC breaks?
Tests added?
Docs added?