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

Allow consumer version tags to be specified for webhooks #224

Open
bethesque opened this issue Jul 31, 2018 · 6 comments
Open

Allow consumer version tags to be specified for webhooks #224

bethesque opened this issue Jul 31, 2018 · 6 comments

Comments

@bethesque
Copy link
Member

This would only trigger a webhook if the changed pact belonged to a consumer version with the specified tag.

@anto-ac
Copy link
Contributor

anto-ac commented Aug 1, 2018

@bethesque Do you think it should like this?

{
  "consumer": {
    "name": "Bar",
    "tags": "a_tag", "another_tag"
  },
  "events": [{
    "name": "contract_content_changed"
  }],
  "request": {
   
    }
  }
}

Or, if the consumer name is not specified:

{
  "consumer": {
    "tags": "a_tag", "another_tag"
  },
  "events": [{
    "name": "contract_content_changed"
  }],
  "request": {
   
    }
  }
}

Or perhaps it should be limited to one tag?

@GiampaLab
Copy link

@bethesque This is exactly the feature I'm looking for so that I can have a webhook per feature branch triggering the corresponding provider build (on the same feature branch, if it exists) hence keeping the master build green and at the same time giving a feedback on the CI pipeline when working on a new version of the Pact.
Any idea on when this feature will be available?

@bethesque
Copy link
Member Author

I started on this, and got blocked by some issues with a dependency. It's not high on the list, so I would recommend having an intermediate build in the meantime where you can perform this logic and trigger the right downstream build.

@GiampaLab
Copy link

Thanks @bethesque, at the moment I'm triggering a provider build on the same feature branch as the consumer bypassing webhooks completely.
What I'm missing is to perform a check to trigger the build only if the pact content changed.
Tbh I was waiting to see if this could be implemented in the pact broker so that I could save some development time on our side.
I'm wondering why this doesn't have high priority since feature branching is a widely adopted git branching strategy and getting the feedback at the right time (every time a new consumer CI build is triggered either on a feature branch or master branch) from the pact tests is highly desirable.

@bethesque
Copy link
Member Author

It hasn't been a high priority because there is a work around of creating an intermediate build from which you can trigger a downstream build with the right tags. You're right that it is highly desirable to put it in the broker. I'm afraid I haven't had much time to code recently, but I will see if it can be one of the first things I pick up when I have more space.

@GiampaLab
Copy link

Thank you very much for your answer @bethesque, looking forward for this feature!

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

No branches or pull requests

4 participants