Created
April 7, 2021 14:28
-
-
Save parthaa/dee0b1ba9fa1ea87e5c5c69171ba3aed to your computer and use it in GitHub Desktop.
This file contains 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 | |
shopt -s expand_aliases | |
set -e | |
set -x | |
IMPORT_ORG="import-$RANDOM" | |
PRODUCT="prod" | |
REPO1="katello" | |
REPO2="misc" | |
REPO3="candlepin" | |
REPO4="file" | |
CONTENT_VIEW="view" | |
# create import export orgs | |
hammer organization create --name=$IMPORT_ORG | |
#create the products in both import and export orgs | |
hammer product create --name=$PRODUCT --organization=$IMPORT_ORG | |
#create and sync repositories in export org | |
#create repositories in import org | |
hammer repository create --content-type=yum --product=$PRODUCT --name=$REPO1 --organization=$IMPORT_ORG | |
hammer repository create --content-type=yum --product=$PRODUCT --name=$REPO2 --organization=$IMPORT_ORG | |
hammer repository create --content-type=yum --product=$PRODUCT --name=$REPO3 --organization=$IMPORT_ORG | |
hammer repository create --content-type=file --product=$PRODUCT --name=$REPO4 --organization=$IMPORT_ORG | |
# create content view in IMPORT_ORG | |
hammer content-view create --name=$CONTENT_VIEW --organization=$IMPORT_ORG --import-only | |
#hammer content-view add-repository --name=$CONTENT_VIEW --repository=$REPO3 --product=$PRODUCT --organization=$IMPORT_ORG | |
#hammer content-view add-repository --name=$CONTENT_VIEW --repository=$REPO2 --product=$PRODUCT --organization=$IMPORT_ORG | |
hammer content-view list --organization=$IMPORT_ORG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment