Skip to content

Instantly share code, notes, and snippets.

@jturel
Last active January 23, 2026 16:52
Show Gist options
  • Select an option

  • Save jturel/76e94c4e2cbe39130f8e49b320cff40d to your computer and use it in GitHub Desktop.

Select an option

Save jturel/76e94c4e2cbe39130f8e49b320cff40d to your computer and use it in GitHub Desktop.
partha-cv-autopublish-ten-async
#!/bin/bash
shopt -s expand_aliases
set -e
set -x
COMPONENT_COUNT=3
ORG="org-$RANDOM"
PRODUCT="test_product"
hammer organization create --name=$ORG
hammer product create --organization=$ORG --name=$PRODUCT
hammer repository create --organization="${ORG}" --product="${PRODUCT}" --name=yum --content-type=yum --url="https://partha.fedorapeople.org/test-repos/pteradactly-with-dino-errata/"
hammer content-view create --organization=$ORG --composite --auto-publish=yes --name=joy-composite1
hammer content-view create --organization=$ORG --composite --auto-publish=yes --name=joy-composite2
hammer content-view create --organization=$ORG --composite --auto-publish=yes --name=joy-composite3
x=1
while [ $x -lt $((COMPONENT_COUNT+1)) ]
do
hammer content-view create --organization=$ORG --name="joy${x}"
hammer content-view add-repository --organization=$ORG --repository=yum --product=$PRODUCT --name="joy${x}"
hammer content-view component add --organization=$ORG --latest --component-content-view="joy${x}" --composite-content-view=joy-composite1
hammer content-view component add --organization=$ORG --latest --component-content-view="joy${x}" --composite-content-view=joy-composite2
hammer content-view component add --organization=$ORG --latest --component-content-view="joy${x}" --composite-content-view=joy-composite3
((x++))
done
# Publish all components at the same time
x=1
while [ $x -lt $((COMPONENT_COUNT+1)) ]
do
hammer content-view publish --organization=$ORG --name="joy${x}" --async &
((x++))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment