kubeflow / code-intelligence

ML-Powered Developer Tools, using Kubeflow
https://medium.com/kubeflow/reducing-maintainer-toil-on-kubeflow-with-github-actions-and-machine-learning-f8568374daa1?source=friends_link&sk=ac77444f00c230e7d787edbfb0081918
MIT License
55 stars 21 forks source link

Put Docker image for the GitHub triage action in the kubeflow docker hub registry #66

Open jlewi opened 5 years ago

jlewi commented 5 years ago

The GitHub action for Kubeflow triage is currently using the image hamelsmu/kubeflow-triage

https://github.com/kubeflow/code-intelligence/blob/9fceba0c7141ab8e02b0f049ee696194cdf24eb4/.github/workflows/build_image.yaml#L15

https://github.com/kubeflow/code-intelligence/blob/9fceba0c7141ab8e02b0f049ee696194cdf24eb4/Issue_Triage/action/action.yml#L20

We should instead push the image to Docker in the kubeflow organization and then update the image to use that.

Note GitHub actions doesn't currently support GCR.

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label kind/feature to this issue, with a confidence of 0.83. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

jlewi commented 5 years ago

We have the kubeflow github organization https://hub.docker.com/orgs/kubeflow

We have the kubeflowrobot account for automating pushes to kubeflow

I created a personal access token for this account. This is currently stored in google's internal secret management system; Google team can access it.

I replaced the DOCKER_USERNAME and DOCKER_PASSWORD secrets on kubeflow/code-intelligence with kubeflowrobot and the associated access token.

jlewi commented 5 years ago

When the action triggered we got a permission error trying to push to DockerHub https://github.com/kubeflow/code-intelligence/commit/ea1e5995d7e9bc8e6326c1adf9c5149af2294ced/checks?check_suite_id=329459221

jlewi commented 5 years ago

I'm going to try reproducing it locally; by logging in as the kubeflow robot to docker and building the image.

I got the same error.

jlewi commented 5 years ago

It looks like I had to do a couple things

  1. In Docker hub I had to create the repository kubeflow/kubeflow-triage
  2. I had to add the developer team with read/write permissions on that repository

I was then able to successfully run docker push using the kubeflowrobot account

jlewi commented 5 years ago

https://hub.docker.com/repository/docker/kubeflow/kubeflow-triage