Page MenuHomePhabricator

Build and push Docker containers on merge
Closed, ResolvedPublic

Description

Take the next step of wiring up pipelinelib by configuring zuul to fire a build job for our demo container when a patchset is merged to the repo.

Event Timeline

bd808 renamed this task from Build and push Docker containers for git tags to Build and push Docker containers on merge.Jul 22 2021, 9:30 PM
bd808 claimed this task.
bd808 triaged this task as High priority.
bd808 updated the task description. (Show Details)
bd808 added subscribers: jeena, dduvall.

I had a short call with @jeena and @dduvall today to get some help getting oriented on this. That discussion led to the edit changing from talking about tags to patchset merge as the trigger event. They also shared a number of links to existing docs which should be useful in preparing my patches:

The kask project is using tag pushes as a trigger as well, but the general workflow today is to allow a new image to be pushed into the repo with each gerrit merge and then control which particular image is used in a given cluster by pinning the container tag in the project's helm3 configuration.

After our call, I wrote up a new section in the PipelineLib user guide for Zuul integration of pipelines that publish/promote images. Hopefully that helps as well.

Change 707878 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] build: Add publish pipeline

https://gerrit.wikimedia.org/r/707878

Change 707879 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[integration/config@master] toolhub: Add publish pipeline config

https://gerrit.wikimedia.org/r/707879

Change 707878 merged by jenkins-bot:

[wikimedia/toolhub@main] build: Add publish pipeline

https://gerrit.wikimedia.org/r/707878

Change 707879 merged by jenkins-bot:

[integration/config@master] toolhub: Add publish pipeline config

https://gerrit.wikimedia.org/r/707879

Change 708387 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] build: Tag CI built production images as \"latest\"

https://gerrit.wikimedia.org/r/708387

Change 708387 merged by jenkins-bot:

[wikimedia/toolhub@main] build: Tag CI built production images as \"latest\"

https://gerrit.wikimedia.org/r/708387

Not only are we pushing on merge, but the demo server is now running images pulled from the internal docker repository!