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

Staging cleanup #448

Merged
merged 2 commits into from
May 3, 2024
Merged
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
25 changes: 5 additions & 20 deletions theforeman.org/pipelines/lib/release.groovy
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
void push_foreman_rpms(repo_type, version, distro) {
version = version == 'develop' ? 'nightly' : version
push_rpms("foreman-${repo_type}-${version}", repo_type, version, distro)
}

void push_rpms(repo_src, repo_dest, version, distro, keep_old_files = false, staging = false) {
push_rpms_direct("${repo_src}/${distro}", "${repo_dest}/${version}/${distro}", !keep_old_files, keep_old_files, staging)
void push_rpms(repo_src, repo_dest, version, distro, keep_old_files = false) {
push_rpms_direct("${repo_src}/${distro}", "${repo_dest}/${version}/${distro}", !keep_old_files, keep_old_files)
}

void push_rpms_direct(repo_source, repo_dest, overwrite = true, merge = false, staging = false) {
void push_rpms_direct(repo_source, repo_dest, overwrite = true, merge = false) {
sshagent(['repo-sync']) {
sh "ssh [email protected] ${repo_source} ${repo_dest} ${overwrite} ${merge} ${staging}"
sh "ssh [email protected] ${repo_source} ${repo_dest} ${overwrite} ${merge}"
}
}

Expand All @@ -19,16 +14,6 @@ void push_debs_direct(os, repo) {
}
}

void push_pulpcore_rpms(version, distro) {
push_rpms("pulpcore-${version}", "pulpcore", version, distro, true)
}

void push_katello_rpms(version, distro) {
keep_old = version != 'nightly'
push_rpms_direct("katello-${version}/katello/${distro}", "katello/${version}/katello/${distro}", !keep_old, keep_old)
push_rpms_direct("katello-${version}/candlepin/${distro}", "katello/${version}/candlepin/${distro}", !keep_old, keep_old)
}

void push_staging_rpms(repo_src, repo_dest, version, distro, keep_old_files = false) {
if (repo_dest == 'foreman') {
destination = "releases/${version}/${distro}"
Expand All @@ -38,7 +23,7 @@ void push_staging_rpms(repo_src, repo_dest, version, distro, keep_old_files = fa
destination = "${repo_dest}/${version}/${distro}"
}

push_rpms_direct("${repo_src}/${distro}", destination, !keep_old_files, keep_old_files, true)
push_rpms_direct("${repo_src}/${distro}", destination, !keep_old_files, keep_old_files)
}

void push_foreman_staging_rpms(repo_type, version, distro) {
Expand Down