qdrvm / kagome

Kagome - C++20 implementation of Polkadot Host
https://kagome.readthedocs.io
Apache License 2.0
158 stars 33 forks source link

Ci/docker build push #2171

Closed zerg-su closed 2 months ago

zerg-su commented 2 months ago

[//]: # ( Copyright Quadrivium LLC All Rights Reserved SPDX-License-Identifier: Apache-2.0 )

Referenced issues

Description of the Change

  1. Refactored Docker Image Build for CI: • Rewrote the Docker image build process to enhance CI efficiency and consistency.

  2. Container Save Step: • Integrated a step to save containers into our infrastructure.

  3. Tag-based Deployment: • Implemented logic to push images to the repository with a tag if the commit has one. This applies both to the Git repository and Docker registry.

  4. Docker Tag Naming for Main Branch: • For the main branch, the Docker image tag will follow the pattern -master. This needs verification to ensure correct implementation.

  5. Future Repository Management: • The tagging scheme will potentially allow filtering and cleaning old builds from the repository in the future.

  6. CI and Helm Chart Changes: • Updated the CI pipeline and Helm charts. The current version for our images is 0.0.0-rc.26.

  7. Container Name Uniqueness: • Changed container naming convention for better log filtering. The new format is {{ $appName }}-{{ $nodeChain }}-{{ .Values.image.tag }}.

  8. Removal of Tini Download Step: • Removed the Helm chart step where Tini was downloaded, as it is now included in the container image. Consequently, the new chart is incompatible with older containers. For those requiring the old setup, continue using version 0.0.0-rc.24 (where Tini is not included in the image).

  9. Security Improvement: • Made a minor enhancement in credential handling during the container build process to eliminate potential security issues.

Possible Drawbacks

• Compatibility Check: Ensure that the new Helm chart is used only with the updated containers that include Tini.

Checklist Before Opening a PR

Before you open a Pull Request (PR), please make sure you've completed the following steps and confirm by answering 'Yes' to each item:

  1. Code is formatted: Have you run your code through clang-format to ensure it adheres to the project's coding standards? [Yes]
  2. Code is documented: Have you added comments and documentation to your code according to the guidelines in the project's contributing guidelines? [Yes]
  3. Self-review: Have you reviewed your own code to ensure it is free of typos, syntax errors, logical errors, and unresolved TODOs or FIXME without linking to an issue? [Yes]
  4. Zombienet Tests: Have you ensured that the zombienet tests are passing? Zombienet is a network simulation and testing tool used in this project. It's important to ensure that these tests pass to maintain the stability and reliability of the project. [Yes]