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

supported more actions #363

Merged
merged 6 commits into from
Jun 25, 2019
Merged

supported more actions #363

merged 6 commits into from
Jun 25, 2019

Conversation

lbarcziova
Copy link
Member

@lbarcziova lbarcziova commented Jun 5, 2019

Fixes #268

packit/schema.py Outdated
@@ -52,7 +52,8 @@
"actions": {
"type": "object",
"properties": {
a: {"type": "string"} for a in ActionName.get_possible_values()
a: {"type": "array", "items": {"type": "string"}}
Copy link
Member

@TomasTomecek TomasTomecek Jun 6, 2019

Choose a reason for hiding this comment

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

This means that we would no longer support action as a string, only as a list of strings, which means that we would break compatibility which would be really frustrating for our users.

Please make it work that the old way, providing a string for an action, would still be acceptable.

Example:

diff --git a/.packit.yaml b/.packit.yaml
index 4bde3dd..db587a7 100644
--- a/.packit.yaml
+++ b/.packit.yaml
@@ -32,3 +32,7 @@ jobs:
     - fedora-29-x86_64
     - fedora-rawhide-x86_64
     - fedora-30-x86_64
+actions:
+  post-upstream-clone: "ls -lha"
+  pre-sync:
+  - "ls -lha"
Failed validating 'type' in schema['properties']['actions']['properties']['post-upstream-clone']:
    {'items': {'type': 'string'}, 'type': 'array'}

On instance['actions']['post-upstream-clone']:
    'ls -lha'..
ERROR    Cannot parse package config: Provided configuration is not valid: 'ls -lha' is not of type 'array'

Failed validating 'type' in schema['properties']['actions']['properties']['post-upstream-clone']:
    {'items': {'type': 'string'}, 'type': 'array'}

@TomasTomecek
Copy link
Member

Franta would tell this needs a rebase, you're 35 commits behind master ;)

@jpopelka
Copy link
Member

The rpm-build failure can be ignored. It fails only in rawhide due to nothing provides python3.7dist(libpagure) < 0.20 needed by python3-ogr-0.3.1-1.fc31.noarch (probably the python-ogr-0.4.0-1.fc31 has not yet been pushed to repo).

Copy link
Member

@jpopelka jpopelka left a comment

Choose a reason for hiding this comment

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

Looks OK 👍

packit/base_git.py Outdated Show resolved Hide resolved
tests/unit/test_cli_utils.py Outdated Show resolved Hide resolved
Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

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

I just realized we miss one significant thing here: documentation. Could you please document in docs/actions.md this feature? Thank you! I believe this PR is good to merge then.

@packit-as-a-service
Copy link

Congratulations! The build has finished successfully. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/packit-service-packit-363
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@phracek
Copy link
Contributor

phracek commented Jun 25, 2019

Can we please merge it?

@TomasTomecek
Copy link
Member

there is still one comment to be addressed and the last commit would deserve a better name :P

@packit-as-a-service
Copy link

Congratulations! The build has finished successfully. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/packit-service-packit-363
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link
Member

@jpopelka jpopelka left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

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

Cheers!

@TomasTomecek TomasTomecek merged commit cebe5fb into packit:master Jun 25, 2019
Venefilyn pushed a commit to Venefilyn/packit that referenced this pull request Oct 24, 2024
Remove an outdated notice

Signed-off-by: Hunor Csomortáni [email protected]

Reviewed-by: Jiri Popelka <None>
Reviewed-by: None <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

packit actions should support more actions.
4 participants