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

As a user, I can mirror Galaxy roles to a local repo #3

Merged
merged 1 commit into from Mar 8, 2018

Conversation

daviddavis
Copy link
Contributor

@daviddavis
Copy link
Contributor Author

Test steps:

export I=$RANDOM

http POST :8000/api/v3/repositories/ name=tester$I

export REPO_HREF=$(http :8000/api/v3/repositories/ | jq -r ".results[] | select(.name == \"tester$I\") | ._href")

http POST :8000/api/v3/importers/ansible/ name=testimporter$I download_policy='immediate' sync_mode='mirror' feed_url='https://galaxy.ansible.com/api/v1/roles/?namespace=ansible'

export IMPORTER_HREF=$(http :8000/api/v3/importers/ansible/ | jq -r ".results[] | select(.name == \"testimporter$I\") | ._href")

http POST ${IMPORTER_HREF}sync/ repository=$REPO_HREF

http ${REPO_HREF}versions/1/content/

Copy link
Member

@bmbouter bmbouter left a comment

Choose a reason for hiding this comment

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

Using this code I was able to sync 11 ansible roles from galaxy! I also did a read-through and it looks all reasonable and correct. Thanks for submitting such a great PR!

@daviddavis daviddavis merged commit b4461a8 into pulp:master Mar 8, 2018
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.

None yet

2 participants