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

Provide a CI bot that will post how to pull PR Docker Image #392

Closed
tomkerkhove opened this issue Mar 12, 2019 · 1 comment
Closed

Provide a CI bot that will post how to pull PR Docker Image #392

tomkerkhove opened this issue Mar 12, 2019 · 1 comment
Assignees
Labels
management All issues related to management of the project

Comments

@tomkerkhove
Copy link
Owner

tomkerkhove commented Mar 12, 2019

As part of #389 we will push all CI Docker images to tomkerkhove/promitor-agent-scraper-ci:PR{PR Number}.

This will allow reviewers, contributor and others to pull in the changed Docker image.

We should provide a CI bot that will post a message to every PR with instructions where the image is located and how to pull it.

This can be done by using Docker Hub webhooks & the GitHub REST API.

Everything in terms of this CI bot should end up in deploy/automation/ci.

@tomkerkhove tomkerkhove added the management All issues related to management of the project label Mar 12, 2019
@tomkerkhove
Copy link
Owner Author

First thought was to use a Logic App that gets triggered by the Docker Hub Webhook which gives following payload:

{
  "push_data": {
    "pushed_at": 1552391917,
    "images": [],
    "tag": "PR123",
    "pusher": "tomkerkhove"
  },
  "callback_url": "https://registry.hub.docker.com/u/tomkerkhove/promitor-scraper-ci/hook/2gcc3ie1e10gd44didedge4e150dc3h5j/",
  "repository": {
    "status": "Active",
    "description": "CI builds for Azure Monitor scraper for Prometheus",
    "is_trusted": false,
    "full_description": "",
    "repo_url": "https://hub.docker.com/r/tomkerkhove/promitor-scraper-ci",
    "owner": "tomkerkhove",
    "is_official": false,
    "is_private": false,
    "name": "promitor-scraper-ci",
    "namespace": "tomkerkhove",
    "star_count": 0,
    "comment_count": 0,
    "date_created": 1552383743,
    "repo_name": "tomkerkhove/promitor-scraper-ci"
  }
}

Based on push_data.tag we can identify the ID of the PR and post a new comment to it via GitHub REST API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
management All issues related to management of the project
Projects
None yet
Development

No branches or pull requests

1 participant