Created
June 30, 2020 15:07
-
-
Save TJM/730dea196c7fc43aec2b23ded3569793 to your computer and use it in GitHub Desktop.
Sync all repos (or a list of repos) in pulp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
if [ $# -gt 0 ]; then | |
REPOS=$* | |
else | |
REPOS=$(pulp-admin repo list | awk '/Id:/ {print $NF}') | |
fi | |
for repo in $REPOS | |
do | |
echo $repo | |
pulp-admin rpm repo sync run --repo-id $repo | |
pulp-admin rpm repo publish run --repo-id $repo | |
done | |
## Workaround | |
#pulp-admin rpm repo remove rpm --repo-id CentOS-7-x86_64-epel --str-eq='name=python-django-compressor' | |
#pulp-admin rpm repo publish run --repo-id CentOS-7-x86_64-epel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment