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

create robots? #39

Open
andrewrothstein opened this issue Oct 7, 2018 · 7 comments
Open

create robots? #39

andrewrothstein opened this issue Oct 7, 2018 · 7 comments

Comments

@andrewrothstein
Copy link

is there a functionality to create robots? happy to try to add it if ur game. is there a better/different way?

@koudaiii
Copy link
Owner

Thank you for issue. Not yet 😢I’ll try this 🤔

@030
Copy link
Contributor

030 commented Jun 6, 2019

@andrewrothstein What kind of actions should the robots perform?

@andrewrothstein
Copy link
Author

my goal was to manage robots from the cli. when I create a new repository on quay.io, I need to create the corresponding robot and extract its credentials for installation into my CI (travis). I wanted to get away from pointing and clicking through the quay.io web front end.

@030
Copy link
Contributor

030 commented Sep 19, 2019

@andrewrothstein I prefer this as well. Currently we have to create a lot of robot account manually and assigning the right permissions is even more tedious.

@030
Copy link
Contributor

030 commented Sep 26, 2019

@andrewrothstein I assume that you would like to create a robot account and assign permissions as well? Otherwise the robot account cannot access any repositories.

@030
Copy link
Contributor

030 commented Sep 26, 2019

@andrewrothstein Regarding the output. If a robot account has been created, what output do you expect from the tool, e.g. docker login -u="user" -p="token" so it could be issued on a machine?

@030
Copy link
Contributor

030 commented Sep 26, 2019

Create robot

curl -s -H "Authorization: Bearer ${QUAY_APP_TOKEN}" \
--header "Content-Type:application/json" -X PUT \
-d "{\"description\":\"Robot account created by bot\"}" \
"https://quay.io/api/v1/organization/some-org/robots/some-user"

Add permission

curl -s -H "Authorization: Bearer ${QUAY_APP_TOKEN}" \
--header "Content-Type:application/json" -X PUT \
-d "{\"role\":\"read\"}" \
"https://quay.io/api/v1/repository/some-org/some-repo/permissions/user/some-org+some-user"

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

3 participants