Automated build never builds!

Hi,

I tried to create an automated build linking to a Github repository:
https://github.com/CecileSun/lisesun_caffe_sklearn_opencv
by clicking the ‘create’ button on this page:
[https://hub.docker.com/add/automated-build/github/form/CecileSun/lisesun_caffe_sklearn_opencv/?namespace=lisesun]
This gave me a ‘successfully created’ notification.
Then, nothing happened! I waited for more than 1 hour, but the build log and Dockerfile are always empty:


Can you tell me what I am doing wrong?

For more information, my docker image is large (~8.5GB), does this matter?

1 Like

I’m seeing exactly the same error. Is this a known bug?

I’ve just made a small change to the readme in the github repo master branch, pushed that, and it’s doing something now.

Maybe the first time automated stuff on create isn’t working as it says is should.

Thank you very much for your reply!

Can you tell me what change you made in readme to make it work?

I don’t know if it’s a known bug, I googled everywhere but like nobody has even talked about this…

1 Like

Hi Lisesun

No problem about replying.

I only added one character to my README.md file, so that my local git repo would be ahead of master on github. Then committed the change locally, and git pushed the repo up to github.

That seemed to trigger the build.

2 Likes

@vanderkerkoff
@lisesun

I am having the same type of problems with automated builds. Please see my thread: Automated build not picking up changes in github repo

@vanderkerkoff - In your build settings, are you using the branch or tag type? I am using tags and it is still not working for me.

@lisesun did you try to manually trigger the build?

Hi @jkilbride

I’m not really sure what you mean.

In my build settings for the automated build on hub.docker I’ve got one trigger setup. That trigger, as far as I understand it, basically associates the master branch of my github repo, to the latest tag of my hub.docker repo.

I think that means if I push to my github master branch(or merge a pull request in, haven’t tried that yet), the autobuild setup will update my the hub.docker latest tag code.

Someone please put me right if I’ve got that totally wrong.

Did you try manually triggering the build like Fernando suggested?

When I was setting this up I had to OK a new ssh key being added to my github repo, the one used by hub.docker. I’m the admin on our github organisation, so I would expect to get that message and ok it.

If your not the admin of your github area, maybe that could be the issue?

@vanderkerkoff - Ok, you must be using the “Branch” Type in your Build Settings. I believe that is the default. If you look at the “Build Settings” tab in your Docker Hub repo, the first column of the first box where you can enter information has a dropdown field. In that field, you can select either “Branch” or “Tag”. This controls what will trigger the automated build. The “Branch” type will pickup any changes made to an entire branch. The “Tag” type is supposed to look for newly created / updated tags. I am also using a single master branch in my GitHub repo, like you, but I use tags to control my version releases. (For more info / examples, click the “Show more” link in the first paragraph under “Build Settings”)

As I stated in my other thread (listed above), I tested a different repo using the “Branch” type and it seemed to work fine. The problem seems to be with using the “Tag” type. Lately, when I create / update new tags in my GitHub repo, Docker Hub no longer notices those changes and never kicks off an automated build.

I’m really surprised no one else has noticed this. I can’t be the only one using the “Tag” type on Docker Hub. I didn’t change anything in my repo settings. It just stopped working…

@jkilbride ah yes, I can see that option now

just followed the automated builds tutorial at https://docs.docker.com/engine/tutorials/dockerrepos/#/automated-builds . It is not auto-triggering a build when the repo is being created. I am having to use manual trigger from Build Settings to start the build every time.

I also followed @vanderkerkoff 's method of making a small change (i added a new RUN command in the dockerfile) and committed and pushed the change to github. Even that is not triggering a new build. I am having to trigger build manually all the time.

P.s. using branch type build with default settings - master / latest

I notice this too. The default setup for automated builds do not trigger a build when a commit is pushed to the master branch.

Same thing happening now, except I can’t even create an automated build.

I go to https://hub.docker.com/add/automated-build/github/form/tf2manu994/docker-ruby-node/?namespace=github and fill out the namespace and the short description and everything and the button changes to ‘Creating…’, but nothing happens.

I looked in the JS console and this happened

client.js:960 POST https://hub.docker.com/v2/repositories/github/docker-ruby-node/autobuild/ 403 (FORBIDDEN)

When I visit that URL, the contents are

{"detail": "Object not found"}

I have tried on a fresh browser as well, no dice.

3 Likes

I encounter a similar issue during the Create Automated Build step. The browser error console shows:

https://hub.docker.com/v2/repositories/github//autobuild/

Failed to load resource: the server responded with a status of 403 (FORBIDDEN)

Any hints?

@fortran01 / @tf2manu994 - I had the same issue, I found the solution in this comment: https://github.com/docker/hub-feedback/issues/135#issuecomment-304860188

The url parameters that DockerHub set for me were wrong. Just like the url @tf2manu994 posted in his comment, the namespace is set to “github” by default, but it should actually be your username on DockerHub.

I had a similar issue, ie clicking on the “Create” button would have the button displaying “Creating…” for a second and then revert to “Create” without doing anything else. Thanks to the “Inspect / Network” feature of the browser, the JavaScript console showed an error message like “VCS: the repository cannot have more than 50 characters”. That was it: my GitHub repository, including the organization/user name, had more than 50 characters. Just renaming the GitHub repository, so that the organization/user name plus repository name had less than 50 characters, resolved the issue.

You saved my day! I had a similar problem and the error was only shown in the “Inspect / Network” feature of my browser. IMHO the docker hub should display this error message somewhere.

My problem was that I initialized a new GitHub repo which has a new default branch named “main” instead of “master”. The error message I got was “Could not find branch master”

1 Like

This worked for me .