Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions bin/release_branch
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ opts = Optimist.options do
opt :branch, "The new branch name.", :type => :string, :required => true
opt :next_branch, "The next branch name.", :type => :string, :required => true
opt :source_branch, "The source branch from which to create the new branch.", :default => "master"
opt :organization, "The organization name", :default => "ManageIQ"
opt :repo_prefix, "The prefix for repositories", :default => "manageiq"

MultiRepo::CLI.common_options(self, :repo_set_default => nil)
end
Expand All @@ -30,7 +32,7 @@ class ReleaseBranch

# 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("#{opts[:organization]}/#{opts[:repo_prefix]}")
core_repo.git.fetch
core_repo.git.hard_checkout(source_branch, "origin/#{source_branch}")

Expand Down Expand Up @@ -67,7 +69,7 @@ class ReleaseBranch
# symlinks from the other repos are correct. However, just do a regular
# checkout and not a hard/clean checkout, as we need to keep the commits
# to push later.
repo.git.client.checkout(source_branch) if repo.name == "ManageIQ/manageiq"
repo.git.client.checkout(source_branch) if repo.name == "#{opts[:organization]}/#{opts[:repo_prefix]}"
end

def pretty_log(target_branch, count)
Expand Down Expand Up @@ -99,11 +101,11 @@ class ReleaseBranch
private

def symlink_spec_manageiq
return if repo.name == "ManageIQ/manageiq"
return if repo.name == "#{opts[:organization]}/#{opts[:repo_prefix]}"
return unless Pathname.new("spec").directory?

FileUtils.rm_f("spec/manageiq")
FileUtils.ln_s("../../manageiq", "spec/manageiq")
FileUtils.ln_s("../../#{opts[:repo_prefix]}", "spec/manageiq")
end

def apply_common_branch_changes
Expand Down
12 changes: 7 additions & 5 deletions bin/release_tag
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ require "fileutils"
require "stringio"

opts = Optimist.options do
opt :tag, "The new tag name.", :type => :string, :required => true
opt :branch, "The branch to tag from.", :type => :string
opt :skip, "The repo(s) to skip.", :type => :strings
opt :tag, "The new tag name.", :type => :string, :required => true
opt :branch, "The branch to tag from.", :type => :string
opt :skip, "The repo(s) to skip.", :type => :strings
opt :organization, "The organization name", :default => "ManageIQ"
opt :repo_prefix, "The prefix for repositories", :default => "manageiq"

MultiRepo::CLI.common_options(self, :repo_set_default => nil)
end
Expand Down Expand Up @@ -58,7 +60,7 @@ class ReleaseTag
Bundler.with_clean_env do
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"))


system!("bundle check || bundle update")
system!({"RELEASE_VERSION" => tag}, "bundle exec rake release")
Expand All @@ -83,7 +85,7 @@ post_review = StringIO.new
# Move manageiq repo to the end of the list. The rake release script on manageiq
# 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 != "#{opts[:organization]}/#{opts[:repo_prefix]}" }.flatten

# However, the other plugins require that manageiq is at the right checkout in
# order to run their rake release scripts
Expand Down
47 changes: 47 additions & 0 deletions config/repos.xaasio-cmp.yml
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

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
core: &core
xaasio-cmp/xaasio-cmp:
xaasio-cmp/xaasio-api:
xaasio-cmp/xaasio-automation_engine:
xaasio-cmp/xaasio-consumption:
xaasio-cmp/xaasio-content:
xaasio-cmp/xaasio-decorators:
xaasio-cmp/xaasio-gems-pending:
xaasio-cmp/xaasio-schema:
xaasio-cmp/xaasio-ui-classic:
xaasio-cmp/xaasio-ui-service:
providers: &providers
xaasio-cmp/xaasio-providers-amazon:
xaasio-cmp/xaasio-providers-ansible_tower:
xaasio-cmp/xaasio-providers-autosde:
xaasio-cmp/xaasio-providers-awx:
xaasio-cmp/xaasio-providers-azure:
xaasio-cmp/xaasio-providers-azure_stack:
xaasio-cmp/xaasio-providers-cisco_intersight:
xaasio-cmp/xaasio-providers-embedded_terraform:
xaasio-cmp/xaasio-providers-foreman:
xaasio-cmp/xaasio-providers-google:
xaasio-cmp/xaasio-providers-ibm_cic:
xaasio-cmp/xaasio-providers-ibm_cloud:
xaasio-cmp/xaasio-providers-ibm_power_hmc:
xaasio-cmp/xaasio-providers-ibm_power_vc:
xaasio-cmp/xaasio-providers-ibm_terraform:
xaasio-cmp/xaasio-providers-kubernetes:
xaasio-cmp/xaasio-providers-kubevirt:
xaasio-cmp/xaasio-providers-lenovo:
xaasio-cmp/xaasio-providers-nsxt:
xaasio-cmp/xaasio-providers-nuage:
xaasio-cmp/xaasio-providers-nutanix:
xaasio-cmp/xaasio-providers-openshift:
xaasio-cmp/xaasio-providers-openstack:
xaasio-cmp/xaasio-providers-oracle_cloud:
xaasio-cmp/xaasio-providers-ovirt:
xaasio-cmp/xaasio-providers-red_hat_virtualization:
xaasio-cmp/xaasio-providers-redfish:
xaasio-cmp/xaasio-providers-terraform_enterprise:
xaasio-cmp/xaasio-providers-vmware:
xaasio-cmp/xaasio-providers-workflows:
all:
<<:
- *core
- *providers
85 changes: 85 additions & 0 deletions config/settings.xassio-cmp.yml
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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
:git_mirror:
:branch_mirror_defaults: {}
:branch_mirror_overrides:
# container repos don't follow branch naming conventions, so don't mirror master to a release branch
# and also include any container-specific branches directly
container-httpd:
master:
container-memcached:
master:
container-postgresql:
master:
10-el8:
# The following repos don't have release branches, so don't mirror master to a release branch
manageiq-release:
master:
# The following repos have been removed as a plugin starting with najdorf, so don't mirror master to a najdorf+ release branch
manageiq-graphql:
master:
manageiq-v2v:
master:
:productization_name: xaasio-cmp
:remotes:
:upstream: [email protected]:ManageIQ
:downstream: https://gitlab.xaasio.com/xaasio-cmp
:repos_to_mirror:
container-httpd:
container-memcached:
container-postgresql:
xaasio-api:
xaasio-appliance-build:
xaasio-appliance:
xaasio-automation_engine:
xaasio-consumption:
xaasio-content:
xaasio-decorators:
xaasio-documentation:
xaasio-gems-pending:
# xaasio-graphql has been removed as a plugin starting with najdorf, but we still need to mirror other branches
xaasio-graphql:
xaasio-pods:
xaasio-providers-amazon:
xaasio-providers-ansible_tower:
xaasio-providers-autosde:
xaasio-providers-awx:
xaasio-providers-azure:
xaasio-providers-azure_stack:
xaasio-providers-cisco_intersight:
xaasio-providers-embedded_terraform:
xaasio-providers-foreman:
xaasio-providers-google:
xaasio-providers-ibm_cic:
xaasio-providers-ibm_cloud:
xaasio-providers-ibm_power_hmc:
xaasio-providers-ibm_power_vc:
xaasio-providers-ibm_terraform:
xaasio-providers-kubernetes:
xaasio-providers-kubevirt:
xaasio-providers-lenovo:
xaasio-providers-nsxt:
xaasio-providers-nuage:
xaasio-providers-nutanix:
xaasio-providers-openshift:
xaasio-providers-openstack:
xaasio-providers-oracle_cloud:
xaasio-providers-ovirt:
xaasio-providers-red_hat_virtualization:
xaasio-providers-redfish:
xaasio-providers-terraform_enterprise:
xaasio-providers-vmware:
xaasio-providers-workflows:
xaasio-release:
xaasio-schema:
xaasio-ui-classic:
xaasio-ui-service:
# xaasio-v2v has been removed as a plugin starting with najdorf, but we still need to mirror other branches
xaasio-v2v:
xaasio-cmp:
:working_directory: mirrors
:manageiq_rubygems:
:s3_access_key:
:s3_secret_key:
:s3_endpoint: https://s3.us-east.cloud-object-storage.appdomain.cloud
:s3_bucket: rubygems-manageiq-org
:s3_region: us-east