Hi Trevor, As suggested, I have added a docker build push job, could you please review. I am not sure if I have to copy over the entire job template from opnfv-docker.yml.
https://gerrit.opnfv.org/gerrit/55739 Thanks Alec From: Trevor Bramwell <[email protected]> Date: Monday, April 9, 2018 at 12:35 PM To: "Alec Hothan (ahothan)" <[email protected]> Cc: "[email protected]" <[email protected]> Subject: Re: [RelEng] Docker container build triggered by tag + committers permission on DockerHub folder Hi Alec, If your project has a '{project}-docker-build-push-{stream}' job defined[1] any tags added to the project repo will trigger a docker build (regardless of tag format). So you don't need to add the 'gerrit-trigger-tag-created'[2] to your project (unless you want to do something different for tagged/merge jobs?) I believe currently builds on the master branch are tagged (in dockerhub) 'latest', while builds on the stable branch are tagged 'stable'. Is that sufficient to trigger a container build based on the tag that is just pushed and create a container with docker tag set to the same value and push it to docker hub? These docker builds will be tagged with the tag name used in git. For example, if you created a 1.0.0 tag on the nvfbench repo, then a docker build 'opnfv/nfvbench:1.0.0' should be pushed to docker-hub. Does that apply to all branches? I actually don't know, and that's an interesting question. From my understanding of git-internals, tags exist independent of branches as the hash of a git-tree, though that does mean they are intrinsicly linked to a branch. The clone happens against GERRIT_REFSPEC, which resolves to refs/heads/... for a branch and refs/tags/... for tags. You'll have to find out and let us know if a trigger-by-tag build creates jobs for both '-master' and '-fraser'. Does that apply to any tag (regardless of format/syntax)? Yep. The trigger doesn't look for any specific format beyond there being a tag created. For dockerhub, please create a helpdesk ticket ([email protected]<mailto:[email protected]>) and let me know your dockerhub username and I'd be happy to get you access. Regards, Trevor Bramwell [1] https://git.opnfv.org/releng/tree/jjb/releng/opnfv-docker.yml#n277 [2] https://git.opnfv.org/releng/tree/jjb/global/releng-macros.yml#n176 On Sat, Apr 07, 2018 at 04:42:25PM +0000, Alec Hothan (ahothan) wrote: Hi Trevor Finally found a bit of time to try the new trigger to build a container based on a tag (introduced in https://gerrit.opnfv.org/gerrit/#/c/48049) Given that I could not find any documentation on how to do that, could you check if I missed anything? The tentative diff in releng file to achieve that: https://gerrit.opnfv.org/gerrit/55149 Is that sufficient to trigger a container build based on the tag that is just pushed and create a container with docker tag set to the same value and push it to docker hub? Does that apply to all branches? Does that apply to any tag (regardless of format/syntax)? Finally, as we discussed last week at ONS, please provide permission to manage my project dockerhub folder. Thanks Alec
_______________________________________________ opnfv-tech-discuss mailing list [email protected] https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss
