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

turn build-image.sh into a high-level tool #10

Open
errordeveloper opened this issue May 26, 2020 · 1 comment
Open

turn build-image.sh into a high-level tool #10

errordeveloper opened this issue May 26, 2020 · 1 comment

Comments

@errordeveloper
Copy link
Contributor

errordeveloper commented May 26, 2020

Use-cases:

There are many ways of building a Docker image, it would be beneficial to Cilium project to provide consistent and reliable method for building image on release as well as for testing, this method should cater for multi-platform builds as well.

Building an image involves a series of base images, it's desirable to reference the by digest for maximum reproducibility. Digests are hard to manage manually, furthermore - digests are simply not human friendly. It would be very helpful to have a human friendly source for mapping digests to sources in git and general information like the build date and description of key facts about images (e.g. software versions).

Requirements:

  • make it usable in Cilium repo
  • ensure it serves a human-friendly layer on top of automatic git-based tags and image digests
  • make sure it easy to use and very simple to maintain
@errordeveloper
Copy link
Contributor Author

errordeveloper commented May 26, 2020

Present workflow:

  • Update images/compilers with relevant changes
  • Merge changes via PR, wait for new image to be built
  • Run make update-compilers-image and open another PR
  • Merge and wait for new images to be built
  • Run ./get-image-digest.sh for each new image, and use output to update Dockerfiles in Cilium

Future workflow:

  • Update images/compilers with relevant changes
  • Merge changes via PR, wait for new image to be built
  • Updates to all dependent images (within this repo) get triggered automatically, manifests stored in manifest.yaml (in master branch of this repo)
  • When build tool is used in Cilium or other repos it loads manifest.yaml from this repo
  • Build tool handles updates to any dependency images, PR is required to update master and release branches

The manifest.yaml may look like this:

images:
- name: docker.io/cilium/image-compilers
  digest: sha256:2f71fc0c9bdbb9a430ccb8cd86cb1fecc63acff464fc253fe3cd3748488e0e65
  info:
    buildDate: "Tue 26 May 2020 23:47:17 BST"
    source:
      repo: https://github.com/cilium/packaging
      commit: 61d38f67f10928e2a281048aa8f276b51c3c54ff
      dir: https://github.com/cilium/packaging/tree/61d38f67f10928e2a281048aa8f276b51c3c54ff/images/compilers
      dirHash: 818f48aa3eada1d23018f02f3c43a169c51eea1a
    keyPackages:
    - gcc-aarch64-linux-gnu 9.3.0-10ubuntu1
    - gcc 9.3.0-10ubuntu2

errordeveloper added a commit to cilium/cilium that referenced this issue Jun 10, 2020
This is a temporary measure, these script should be consumed either as a submodule,
or a portable tool (see cilium/image-tools#10).

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
errordeveloper added a commit to cilium/cilium that referenced this issue Jun 15, 2020
This is a temporary measure, these scripts should be consumed either as a submodule,
or a portable tool (see cilium/image-tools#10).

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
This was referenced Jun 22, 2020
errordeveloper added a commit to cilium/cilium that referenced this issue Jun 24, 2020
This is a temporary measure, these scripts should be consumed either as a submodule,
or a portable tool (see cilium/image-tools#10).

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
errordeveloper added a commit to cilium/cilium that referenced this issue Jun 30, 2020
This is a temporary measure, these scripts should be consumed either as a submodule,
or a portable tool (see cilium/image-tools#10).

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
errordeveloper added a commit to cilium/cilium that referenced this issue Jul 2, 2020
This is a temporary measure, these scripts should be consumed either as a submodule,
or a portable tool (see cilium/image-tools#10).

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
errordeveloper added a commit to cilium/cilium that referenced this issue Jul 3, 2020
This is a temporary measure, these scripts should be consumed either as a submodule,
or a portable tool (see cilium/image-tools#10).

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
aanm pushed a commit to cilium/cilium that referenced this issue Jul 3, 2020
This is a temporary measure, these scripts should be consumed either as a submodule,
or a portable tool (see cilium/image-tools#10).

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
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

1 participant