Skip to content
This repository was archived by the owner on Jul 21, 2021. It is now read-only.
This repository was archived by the owner on Jul 21, 2021. It is now read-only.

Always build latest Docker image during CI builds #141

@ChiefGokhlayehBosch

Description

@ChiefGokhlayehBosch

I can't stand having to manually build docker images and fiddeling with credentials to push them to the hub.

Common practise is to build the Dockerfile for each job. Using tricks like
docker pull <some_image> && docker build ... --cache-from <some_image>, building can be sped up significantly, leading to a low penalty for building the image every time.

I propose the following naming scheme for Docker images on Docker Hub:

Name Examples Purpose
latest - Always reflects latest master. A rolling tag getting updated with every push/merge to master. The latest and greatest.
YY.MM 20.02, 20.08, 21.04 Stable release following every regular Kiso release (monthly, semi-annual, whatever)
stable points to 21.04 Always points to the latest YY.MM tag.
build_X build_281 Unique build number (equivalent to Jenkins build number). These may be used only temporary during a build. They are used as cache between build steps, if local caching is not feasible. Docker Hub might not be the fastest registry for this purpose and their use should therefore be limited/avoided. Their average expected lifetime is 5-15 minutes.

The procedure would run as the first build stage in the Jenkins Pipeline. Execution would occur on a Docker-out-of-Docker (dood) container on Eclipse's Kubernetes infrastructure. Build the image using ... --cache-from kiso-build-env:latest for performance, instantiate a container with it and if build is happening on master, tag it latest and push it to the hub.

Subsequent steps shall then be executed inside the freshly instantiated container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions