Created
October 19, 2020 19:53
-
-
Save parthaa/7fbcf53b9ae0a751bb034e5e43f6abbd to your computer and use it in GitHub Desktop.
import script
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" | |
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 | |
# create content view in IMPORT_ORG | |
hammer content-view create --name=$CONTENT_VIEW --organization=$IMPORT_ORG | |
hammer content-view add-repository --name=$CONTENT_VIEW --repository=$REPO1 --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