1

According to this documentation it should be possible to add a travis badge to an ansible role in galaxy:

Push the changes to your GitHub repo. This will kick-off a Travis build. When the build completes, Travis will notify Galaxy, and your role will be automatically imported into Galaxy with a Travis badge

Although the steps were followed:

  1. .travis.yml added to repo that contains the notification part
  2. access token from travis profile added to ansible galaxy
  3. role imported manually as it was not pushed automatically

the badge does not appear.

Discussion

The build itself does not show the notification. Other roles that have a travis badge do not show this notification either.

Questions

  1. What is causing the issue?
  2. Why does travis not say anything regarding the notification part?
  3. How to debug it?

1 Answer 1

1

It looks like your repository is structured correctly, and Travis builds are operating correctly. One thing to check: in Ansible Galaxy's settings, make sure you have added your Travis token to the role in Ansible Galaxy (instructions).

I'm guessing you've done this, but it never hurts to ask!

Two other suggestions:

  1. Make sure you complete the rest of the README, as that's the entry point for your role on GitHub and on Galaxy. At least describe what your role does, and consider listing an example of how to use it, some available variables, etc.
  2. If you still don't get the badge to show up, maybe there's a bug with your role (with a username like 030... maybe it's a bug in the code that grabs the role—strings that begin with numbers can be interpreted in funny ways in languages like Python!). Consider posting a bug report to the ansible-galaxy issues repository on GitHub.
2
  • I have created an issue and an issue has been created to address the documentation improvement. Regarding the token: I have copied it from travis and pasted to the ansible galaxy. Thank you for the feedback. If the numbers in the username are causing the issue, then I will accept the answer.
    – 030
    Aug 8, 2016 at 6:16
  • @030 - It looks like the rabbit hole goes deeper—it's a Travis CI issue with their webhooks sending the wrong Authorization header! See comment and Travis CI issue. Aug 9, 2016 at 22:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .