Skip to content

Commit 74c18a3

Browse files
committed
fix: command syntax
1 parent 6ee8f75 commit 74c18a3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/gh_db_migration_wait.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
bash cicd-deployment-scripts/gh/db_migration_wait.sh \
2929
-e "dev" \
3030
-w "K8: Test" \
31-
-i ${{ github.run_id }}
31+
-i "${{ github.run_id }}"

gh/db_migration_wait.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22
set -e
33

44
ENVIRONMENT_NAME="dev"
5-
K8_TEST_WORKFLOW_NAME="K8: Test"
5+
WAIT_WORKFLOW_NAME="K8: Test"
66
CURRENT_WORKFLOW_DATABASE_ID=""
77

88
while getopts e:w:i: flag
99
do
1010
case "${flag}" in
1111
e) ENVIRONMENT_NAME=${OPTARG};;
12-
w) K8_TEST_WORKFLOW_NAME=${OPTARG};;
12+
w) WAIT_WORKFLOW_NAME=${OPTARG};;
1313
i) CURRENT_WORKFLOW_DATABASE_ID=${OPTARG};;
1414
esac
1515
done
1616

1717

1818
RUNNING_DB_UPGRADE_WORKFLOW=""
1919
RUNNING_DB_UPGRADE_WORKFLOW_ID=$(gh run list \
20-
--json conclusion,databaseId,headBranch,status,workflowName \
21-
--jq '.[] | select(.workflowName=="'$K8_TEST_WORKFLOW_NAME'" and .status!="completed" and .headBranch!="'$ENVIRONMENT_NAME'" and .databaseId!="'$CURRENT_WORKFLOW_DATABASE_ID'") | .databaseId' \
22-
--repo code-kern-ai/refinery-gateway)
20+
--json conclusion,databaseId,headBranch,status,workflowName \
21+
--jq ".[] | select(.workflowName==\"$WAIT_WORKFLOW_NAME\" and .status!=\"completed\" and .headBranch!=\"$ENVIRONMENT_NAME\" and .databaseId!=\"$CURRENT_WORKFLOW_DATABASE_ID\") | .databaseId" \
22+
--repo code-kern-ai/refinery-gateway)
2323

2424
# while [ -z $RUNNING_DB_UPGRADE_WORKFLOW ]; do
2525
# RUNNING_DB_UPGRADE_WORKFLOW=$(gh run list \
2626
# --json conclusion,databaseId,headBranch,status,workflowName \
27-
# --jq '.[] | select(.workflowName=="'$K8_TEST_WORKFLOW_NAME'" and .status!="completed" and .headBranch!="'$ENVIRONMENT_NAME'" and .databaseId!="'$CURRENT_WORKFLOW_DATABASE_ID'")' \
27+
# --jq '.[] | select(.workflowName=="'$WAIT_WORKFLOW_NAME'" and .status!="completed" and .headBranch!="'$ENVIRONMENT_NAME'" and .databaseId!="'$CURRENT_WORKFLOW_DATABASE_ID'")' \
2828
# --repo code-kern-ai/refinery-gateway)
2929
# echo "Waiting for running db upgrade workflow to complete ..."
3030
# if [ -z $RUNNING_DB_UPGRADE_WORKFLOW ]; then

0 commit comments

Comments
 (0)