Draft: Split Build::Info to multiple subclasses
DO NOT MERGE. THIS MR WILL BE SPLIT INTO MULTIPLE SMALL ONES WHEN IT IS READY
What does this MR do?
Over time, Build::Info
has become a dumping ground of all "information" used in building and releasing the package. This MR tries to categorize it into sub classes based on themes.
- Remove unused Info methods
- Use GitLab API interface for fetching artifacts
- Split Git related information to own class
- Move the following methods:
-
Build::Info.branch_name
=>Build::Info::Git.branch_name
-
Build::Info.current_git_tag
=>Build::Info::Git.tag_name
-
Build::Info.commit_sha
=>Build::Info::Git.commit_sha
-
Build::Info.latest_tag
=>Build::Info::Git.latest_tag
-
Build::Info.latest_stable_tag
=>Build::Info::Git.latest_stable_tag
-
- Move the following methods:
- Split Package related information to own class
- Move the following methods:
-
Build::Info.package
=>Build::Info::Package.name
-
Build::Info.edition
=>Build::Info::Package.edition
-
Build::Info.semver_version
=>Build::Info::Package.semver_version
-
Build::Info.release_version
=>Build::Info::Package.release_version
-
Build::Info.package_list
=>Build::Info::Package.file_list
-
Build::Info.name_version
=>Build::Info::Package.name_version
-
- Move the following methods:
- Split GitLab Rails related information to own class
- Move the following methods:
-
Build::Info.gitlab_version
=>Build::Info::Componets::GitLabRails.version
-
Build::Info.gitlab_version_slug
=>Build::Info::Componets::GitLabRails.version_slug
-
Build::Info.gitlab_rails_ref
=>Build::Info::Componets::GitLabRails.ref
-
Build::Info.gitlab_rails_project_path
=>Build::Info::Componets::GitLabRails.project_path
-
Build::Info.gitlab_rails_repo
=>Build::Info::Componets::GitLabRails.repo
-
- Move the following methods:
- Split Docker related information to own class
- Move the following methods:
-
Build::Info.docker_tag
=>Build::Info::Docker.tag
-
Build::Info.release_file_contents
=>Build::Info::Docker.release_file_contents
-
- Move the following methods:
- Split QA related information to own class
- Move the following method:
-
Build::Info.qa_image
=>Build::Info::QA.image
Split Deploy related information to own class
-
- Move the following methods:
-
Build::Info.deploy_env_key
=>Build::Info::Deploy.environment_key
-
Build::Info.deploy_env
=>Build::Info::Deploy.environment
-
- Move the following method:
- Move Build::Info.log_level to Build.log_level
- Split Object Storage bucket related information to own class
- Move the following methods:
-
Build::Info.release_bucket
=>Build::Info::ObjectStorage::S3.release_bucket
-
Build::Info.release_bucket_region
=>Build::Info::ObjectStorage::S3.release_bucket_region
-
Build::Info.release_bucket_s3_endpoint
=>Build::Info::ObjectStorage::S3.release_bucket_s3_endpoint
-
Build::Info.gcp_release_bucket
=>Build::Info::ObjectStorage::GCP.release_bucket
-
Build::Info.gcp_release_bucket_sa_file
=>Build::Info::ObjectStorage::GCP.release_bucket_sa_file
- Cleanup requires across library files
Related issues
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
MR title and description are up to date, accurate, and descriptive. -
MR targeting the appropriate branch. -
Latest Merge Result pipeline is green. -
When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow.
For GitLab team members
If you don't have access to this, the reviewer should trigger these jobs for you during the review process.
-
The manual Trigger:ee-package
jobs have a green pipeline running against latest commit. -
If config/software
orconfig/patches
directories are changed, make sure thebuild-package-on-all-os
job within theTrigger:ee-package
downstream pipeline succeeded. -
If you are changing anything SSL related, then the Trigger:package:fips
manual job within theTrigger:ee-package
downstream pipeline must succeed. -
If CI configuration is changed, the branch must be pushed to dev.gitlab.org
to confirm regular branch builds aren't broken.
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes. -
Documentation created/updated. -
Tests added. -
Integration tests added to GitLab QA. -
Equivalent MR/issue for the GitLab Chart opened. -
Validate potential values for new configuration settings. Formats such as integer 10
, duration10s
, URIscheme://user:passwd@host:port
may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Balasankar 'Balu' C