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

Update upload stage RPMs to new host #420

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ Below is a listing of access used.
* Belong to the [Foreman GitHub release-engineering team](https://github.com/orgs/theforeman/teams/release-engineering)
* [Foreman infrastructure access](https://theforeman.github.io/foreman-infra/#access) including [secrets](https://theforeman.github.io/foreman-infra/secrets/)
* [Jenkins access](https://theforeman.github.io/foreman-infra/jenkins/#access)
* [web01 stagingyum access](https://github.com/theforeman/foreman-infra/blob/master/puppet/modules/web/manifests/vhost/stagingyum.pp#L9)
* [stagingrpm access](https://github.com/theforeman/foreman-infra/blob/master/puppet/modules/web/manifests/vhost/stagingrpm.pp#L9)
* [theforeman Fedora group member](https://copr.fedorainfracloud.org/groups/g/theforeman/coprs/) which can be viewed [through Fedora Account System](https://accounts.fedoraproject.org/?next=/group/theforeman/%3F)

#### Katello release owner
19 changes: 19 additions & 0 deletions publish_release_rpms
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -e

. settings

USER='rpmrepo'
HOST='repo-rpm01.osuosl.theforeman.org'

OVERWRITE=true
MERGE=false

for os in $OSES; do
if [[ "$PROJECT" == "pulpcore" || "$PROJECT" == "candlepin" ]];then
REPO_PATH="$PROJECT/$VERSION/$os"
else
REPO_PATH="foreman/$FOREMAN_VERSION/$PROJECT/$os"
fi

ssh "$USER@$HOST" "$REPO_PATH" "$REPO_PATH" "$OVERWRITE" "$MERGE"

Check notice

Code scanning / shellcheck

Note that, unescaped, this expands on the client side. Note

Note that, unescaped, this expands on the client side.
done
10 changes: 7 additions & 3 deletions upload_stage_rpms
Original file line number Diff line number Diff line change
@@ -2,7 +2,11 @@

. settings

USER='yumrepostage'
HOST='web01.osuosl.theforeman.org'
USER='rpmrepostage'
HOST='repo-rpm01.osuosl.theforeman.org'

rsync --checksum --times --perms --recursive --links --verbose --partial --one-file-system --delete-after "tmp/$PROJECT/$VERSION/" "$USER@$HOST:rsync_cache/$PROJECT/$VERSION/"
if [[ "$PROJECT" == "pulpcore" || "$PROJECT" == "candlepin" ]];then
rsync --checksum --times --perms --recursive --links --verbose --partial --one-file-system --delete-after "tmp/$PROJECT/$VERSION/" "$USER@$HOST:rsync_cache/$PROJECT/$VERSION/"
else
rsync --checksum --times --perms --recursive --links --verbose --partial --one-file-system --delete-after "tmp/$PROJECT/$VERSION/" "$USER@$HOST:rsync_cache/foreman/$FOREMAN_VERSION/$PROJECT/"
fi