5.13. 複数製品への同期プランの割り当て
以下の手順を使用して、最低でも 1 度同期され、1 つ以上リポジトリーが含まれる組織の製品に、同期プランを割り当てます。
手順
選択した製品に同期プランを割り当てるには、次の手順を実行します。
次の Bash スクリプトを実行します。
ORG="Your_Organization" SYNC_PLAN="daily_sync_at_3_a.m" for i in $(hammer --no-headers --csv product list --organization $ORG --per-page 999 | grep -vi not_synced | awk -F, {'{ if ($5!=0) print $1}'}) do hammer sync-plan create --name $SYNC_PLAN --interval daily --sync-date "2018-06-20 03:00:00" --enabled true --organization $ORG hammer product set-sync-plan --sync-plan $SYNC_PLAN --organization $ORG --id $i done
スクリプトの実行後、同期プランを割り当てた製品を表示します。
# hammer product list --organization $ORG --sync-plan $SYNC_PLAN