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

Repository links do not work/trigger #518

Closed
F21 opened this issue Dec 22, 2015 · 11 comments
Closed

Repository links do not work/trigger #518

F21 opened this issue Dec 22, 2015 · 11 comments

Comments

@F21
Copy link

F21 commented Dec 22, 2015

I have tried the following:

  1. Two different Github repositories as automated builds for 2 different docker hub repositories. 1 of the repos has the other one linked to it. Building the linked repo does not trigger builds of the other repo.
  2. 1 Github repository feeding out into 4 automated docker hub build repositories. 3 of the repositories are linked to 1 of the repositories. Building the 1 linked repository does not trigger builds of the other 3.
@bcwalrus
Copy link

Repository links currently only works on non-regex build rules, because we don't want to blindly go out and rebuild all your Github branches. (Rather, we're coming up with a better way to do that. Would like to know what you think is the right behaviour here.)

So if you have repo B linked to an upstream repo A, and repo B only has regex build rules, then those are not going to trigger. If you'd like, give me the repo names and I can go take a look. Thanks!

@F21
Copy link
Author

F21 commented Dec 22, 2015

Ah, that makes sense!

Repos in question:
https://hub.docker.com/r/f21global/hdfs-datanode/
https://hub.docker.com/r/f21global/hdfs-journalnode/
https://hub.docker.com/r/f21global/hdfs-namenode/
https://hub.docker.com/r/f21global/hadoop-base/

Which are backed by this github repo:
https://github.com/F21/hadoop

I currently have the following build settings set up

tag /.*/ 
tag /.*/ latest

This allows me to achieve my use-case like so:

  1. Only tags (releases should be built).
  2. Build a tag when it is pushed to the git repo and set its tag name to be the same as the tag from the git repo.
  3. Also, build the tag when it is pushed to the git repo and give it the tag name of latest.

The whole thing works pretty well at the moment except for:

  1. Repository links don't work as mentioned.
  2. It is wasteful that the images is rebuilt for the latest tag. There should be some way to just tag the latest successful build as "latest".

@nathan-osman
Copy link

I'm experiencing this problem as well. I've got this repository configured as follows:

So if I understand correctly, whenever changes are pushed for the ubuntu repository, mine should be rebuilt as well. However, this isn't happening. Changes were pushed to ubuntu 3 days ago, yet my repository hasn't been rebuilt since December (two months ago).

What am I doing wrong?

@tbenst
Copy link

tbenst commented Sep 12, 2016

Hey @bcwalrus, I believe the following repo conforms to your requirements but still does not trigger builds. Am I missing something or is this functionality broken?

screenshot from 2016-09-11 18-02-28

@tbenst
Copy link

tbenst commented Sep 17, 2016

Anyone from the docker team able to comment on if repository links work at all? @mghazizadeh @marcusmartins @akshayvyas

@arne-cl
Copy link

arne-cl commented Nov 27, 2016

@bcwalrus Just like tbenst, I have repos without regex build rules [1-2] that are not updated
after the linked repository [3] got rebuilt.

[1] https://hub.docker.com/r/nlpbox/python-zpar/
[2] https://hub.docker.com/r/nlpbox/heilman-sagae-2015/
[3] https://hub.docker.com/r/nlpbox/nlpbox-base/

@brad-jones
Copy link

Well this is annoying, any update to this issue docker team????

@pkennedyr
Copy link
Contributor

Thanks for the feedback. To clarify, when a repository link is added to an (automated) repository in Hub, it will automatically trigger a rebuild only if the linked repository is also included in the FROM line of your dockerfile. We'll make sure to update the UI to clarify this behavior.

collivier added a commit to collivier/functest that referenced this issue Aug 3, 2017
Automated builds work when Dockerfile is modified after checkout.
Otherwise they are not triggered [1].

[1] docker/hub-feedback#518

Change-Id: I6ba9e06f9e62011d2f1c1788f2647b1175842ef3
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
opnfv-github pushed a commit to opnfv/opnfvdocs that referenced this issue Aug 10, 2017
* Update docs/submodules/functest from branch 'master'
  - Merge "Switch to Docker post_checkout hooks"
  - Switch to Docker post_checkout hooks
    
    Automated builds work when Dockerfile is modified after checkout.
    Otherwise they are not triggered [1].
    
    [1] docker/hub-feedback#518
    
    Change-Id: I6ba9e06f9e62011d2f1c1788f2647b1175842ef3
    Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
@ayaz
Copy link

ayaz commented Dec 23, 2017

@pkennedyr Thanks. I ran into a similar issue where building of linked repo would not trigger a build of the other repo. I wasn't using regexes of any kind. The only mistake I had made was not have the FROM line match the name from the automated build. I am not sure if this is documented somewhere, I didn't find it.

@shoeper
Copy link

shoeper commented Sep 7, 2018

@pkennedyr it does not work.

I've linked https://hub.docker.com/r/shoeper/latex/~/dockerfile/ which uses FROM debian:testing to debian and debian:testing got updated two days ago but my automated build has not been updated, nor queued.

Same issue with https://hub.docker.com/r/shoeper/chkrootkit/~/dockerfile/ (only uses another tag, which has also been updated) and https://hub.docker.com/r/shoeper/git/~/dockerfile/ and https://hub.docker.com/r/shoeper/spellcheck/~/dockerfile/

All builds do not use regex.

@shoeper
Copy link

shoeper commented Nov 12, 2018

Looks much like this security issue has not been taken care of for almost three years now.

Security issue because e.g. if debian gets a security update and the image is rebuild and people rely on repository linking their image won't be updated and thus will still have the vulnerable libraries. Having a look at docker hub such a scenario is very common.

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

9 participants