Skip to content

Conversation

@dhamo-ror
Copy link

Hi @agrare, @Fryguy, @bdunne

As discussed created this PR, kindly review it and provide your recommendations, Thank You.

@Fryguy
Copy link
Member

Fryguy commented Oct 8, 2025

Right, so if you wanted this generically, you'd need to make this a parameter or something (ideally defaulting to the regular ManageIQ namespace)

@dhamo-ror
Copy link
Author

Our main goal in moving to a self-hosted GitLab environment is to manage and release certain custom developments and integrations that extend ManageIQ for our internal use cases.

For example, we are integrating external platforms (such as Radware APIs) to enable managing SLB and WAF resources directly from within ManageIQ UI. To support these kinds of enhancements, we maintain our own repositories in our GitLab instance and handle releases independently.

Therefore, in our setup, we intend to use our GitLab repository URLs for the release process instead of the standard ManageIQ GitHub repositories.

# Ensure we move core to the source branch so that the symlinks from the
# other repos are correct
core_repo = MultiRepo::Repo.new("ManageIQ/manageiq")
core_repo = MultiRepo::Repo.new("xaasio-cmp/xaasio-cmp")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this one of the opts in the Optimist.options block above?

Thinking:

opt :organization, "The organization name", :default => "ManageIQ"
opt :repo_prefix", "The prefix for repositories", :default => "manageiq"

then you can do

Suggested change
core_repo = MultiRepo::Repo.new("xaasio-cmp/xaasio-cmp")
core_repo = MultiRepo::Repo.new("#{opts[:organization]}/#{opts[:repo_prefix]}")

contents.gsub!(/(github\.com.+?branch=)#{source_branch}\b/, "\\1#{branch}")
contents.gsub!(/(github\.com.+?\.svg)\)/, "\\1?branch=#{branch})")
contents.gsub!(/(coveralls\.io.+?branch=)#{source_branch}\b/, "\\1#{branch}")
contents.gsub!(/(gitlab\.xaasio\.com.+?branch=)#{source_branch}\b/, "\\1#{branch}")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to proceed with this @agrare

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it's worth changing this - unless your host has something like a github actions badge, it will be meaningless anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah @Fryguy

bin/release_tag Outdated
# depends on all of the other repos running their rake release scripts first.
repos = MultiRepo::CLI.repos_for(**opts)
repos = repos.partition { |r| r.name != "ManageIQ/manageiq" }.flatten
repos = repos.partition { |r| r.name != "xaasio-cmp/xaasio-cmp" }.flatten
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need the options here.

xaasio-cmp/xaasio-providers-redfish:
xaasio-cmp/xaasio-providers-terraform_enterprise:
xaasio-cmp/xaasio-providers-vmware:
xaasio-cmp/xaasio-providers-workflows:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to modify this file. This is for the bot when we do cross-repo-tests.

However, you might need to have your own set for other purposes. What you can do there is create your own repo set file like repos.xassio-cmp.yml, and have these alternative repos in it. Then when you call release_branch or release_tag, you can pass --repo-set xassio-cmp and it will use your list instead of the default list.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that there's also an option in the set for each repo where you can specify a clone_source:

For example you could do

ManageIQ/manageiq-providers-workflows:
  clone_source: [email protected]:xaasio-cmp/xaasio-providers-workflows

multirepo would still clone into the ManageIQ/manageiq-providers-workflows directory, but it would use your clone_source as the origin.

This might not be enough for your purposes, but thought I'd mention the option.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay @Fryguy , so I wasn’t able to achieve what I needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can still mirror, you just don't override this section.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Fryguy, if I modify the multi-repo to use our internal GitLab, it will clone our repositories, right? Please correct me if I’m wrong.

Comment on lines 22 to 24
:productization_name: manageiq
:productization_name: xaasio-cmp
:remotes:
:upstream: git@github.com:ManageIQ
:upstream: https://gitlab.xaasio.com/xaasio-cmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values should not be changed. If you need to override anything from this file you can create your own override settings.xassio-cmp.yml file, which I thikn will get automatically pulled in and override anything in the base settings.yml.

:productization_name: xaasio-cmp
:remotes:
:upstream: git@github.com:ManageIQ
:upstream: https://gitlab.xaasio.com/xaasio-cmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mirror section below not be changed because this is the source of the mirroring - if you need to change the destination of the mirroring, you can add in a downstream: key here and that will be used as the destination for the mirror. productization_name will be used as the repo prefix for the mirroring.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @Fryguy ! Since I’m not fully familiar with the purpose of some of these files and configurations, I’m not confident about making the changes correctly. So only I requested a call, so in that we can discuss and do the things

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mirror section here is for the git_mirror capability, so you can mirror all the upstream repos into a downstream location, optionally providing a productization_name prefix in case the target repo names are different.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Fryguy, So I need to do the mirroring in my Gitlab instance?

I already imported all the core and provider repos there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git_mirror tool is designed to be run on a schedule and it will continually mirror from upstream to downstream.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but if I change something in a file and during mirroring there is a change in that same file there will be conflict right?

@dhamo-ror
Copy link
Author

Hi @agrare, now where should i configure, to use my GitLab repos instead of GitHub for cloning and creating release branches?

@agrare
Copy link
Member

agrare commented Oct 9, 2025

@dhamo-ror you would create a settings file that contains your gitlab and list of repos like @Fryguy mentioned above

@dhamo-ror
Copy link
Author

@agrare, I made the changes based on the comments and pushed them, but they are not showing in this PR. Could you please take a look at this commit:- dhamo-ror@a4e0567

@agrare
Copy link
Member

agrare commented Oct 9, 2025

@dhamo-ror you wouldn't want to commit your settings files, they are specific to you

@dhamo-ror
Copy link
Author

@dhamo-ror you wouldn't want to commit your settings files, they are specific to you

I'm not sure on how to do this, so requesting your review on this Adam!

@Fryguy
Copy link
Member

Fryguy commented Oct 9, 2025

you would keep an internal private repo with the override files. They can either be a branch that you keep up to date with this repository as it updates, or you could have a completely separate repo with the various configuration files.

The only things that should be in this PR are the things that can be implemented generically such that anyone could use it.

repo.chdir do
# Ensure that spec/manageiq is symlinked
FileUtils.ln_sf(repo.path.join("../manageiq").expand_path, repo.path.join("spec/manageiq"))
FileUtils.ln_sf(repo.path.join("../xaasio-cmp").expand_path, repo.path.join("spec/manageiq"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FileUtils.ln_sf(repo.path.join("../xaasio-cmp").expand_path, repo.path.join("spec/manageiq"))
FileUtils.ln_sf(repo.path.join("../#{opts[:repo_prefix]}").expand_path, repo.path.join("spec/manageiq"))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this particuilar file is the one that should be private to your org

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as well as this one.

@dhamo-ror
Copy link
Author

you would keep an internal private repo with the override files. They can either be a branch that you keep up to date with this repository as it updates, or you could have a completely separate repo with the various configuration files.

The only things that should be in this PR are the things that can be implemented generically such that anyone could use it.

Yeah @Fryguy, that’s exactly what I was trying to convey yesterday. I imported the manageiq-release repository into our GitLab instance as a separate repo and have been using that for internal release management, making changes there. Then you suggested creating a PR by adding the GitHub repo as a remote, so I created this PR accordingly. I’m seeking guidance on that internal release setup, and once that’s clarified, I’ll proceed with implementing the generic changes.
Thank you!

@Fryguy
Copy link
Member

Fryguy commented Oct 9, 2025

Sorry - I guess I wasn't clear - I was suggesting that any code change you had to make could be pushed upstream in a generic way, so you don't have to maintain those. That is, as we make changes to the code in this repo, it's hard to carry patches locally, so if you can commit them in a generic way, they should just work in the future for you. I didn't meant to imply that any data-specific changes should also go to the PR, as the data is specific to you and not the ManageIQ project.

@dhamo-ror
Copy link
Author

Sorry - I guess I wasn't clear - I was suggesting that any code change you had to make could be pushed upstream in a generic way, so you don't have to maintain those. That is, as we make changes to the code in this repo, it's hard to carry patches locally, so if you can commit them in a generic way, they should just work in the future for you. I didn't meant to imply that any data-specific changes should also go to the PR, as the data is specific to you and not the ManageIQ project.

Yes @Fryguy, So that only I asked a call and discuss the doubts instead of a PR!

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

Successfully merging this pull request may close these issues.

3 participants