File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,16 +85,19 @@ ccoExecWorkflowTemplates:
8585 RES=0
8686 for INSTANCE_NAME in $(ls --hide *.txt); do
8787 if cat ${INSTANCE_NAME}/values.yaml | grep 'enableCronJob_PageViewsTracking: true' >/dev/null; then
88- echo $INSTANCE_NAME &&\
89- if INSTANCE_ID=$(kubectl -n ckan-cloud get ckancloudckaninstancename ckan-cloud-ckaninstancename-$INSTANCE_NAME -o json | jq -r '.spec["latest-instance-id"]') &&\
90- echo $INSTANCE_ID &&\
91- kubectl -n $INSTANCE_ID exec deploy/ckan -c ckan -- ckan-paster --plugin=ckan tracking -c /etc/ckan/production.ini update 2020-07-01 &&\
92- kubectl -n $INSTANCE_ID exec deploy/ckan -c ckan -- ckan-paster --plugin=ckan search-index -c /etc/ckan/production.ini rebuild
93- then
94- echo OK
88+ echo $INSTANCE_NAME
89+ INSTANCE_ID=$(kubectl -n ckan-cloud get ckancloudckaninstancename ckan-cloud-ckaninstancename-$INSTANCE_NAME -o json | jq -r '.spec["latest-instance-id"]')
90+ if [ "$INSTANCE_ID" == "" ]; then
91+ echo "Instance ID not found for $INSTANCE_NAME"
9592 else
96- echo FAILURE
97- RES=1
93+ if kubectl -n $INSTANCE_ID exec deploy/ckan -c ckan -- ckan-paster --plugin=ckan tracking -c /etc/ckan/production.ini update 2020-07-01 &&\
94+ kubectl -n $INSTANCE_ID exec deploy/ckan -c ckan -- ckan-paster --plugin=ckan search-index -c /etc/ckan/production.ini rebuild
95+ then
96+ echo OK
97+ else
98+ echo FAILURE
99+ RES=1
100+ fi
98101 fi
99102 fi
100103 done
You can’t perform that action at this time.
0 commit comments