Skip to content

Commit

Permalink
Fix deploy create vs update and change cloud run job to clinvar-ingest
Browse files Browse the repository at this point in the history
  • Loading branch information
toneillbroad committed Apr 2, 2024
1 parent 610152a commit dbeeb30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions misc/bin/deploy-job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ gcloud builds submit \

################################################################
# Deploy job

gcloud run jobs update $instance_name \
if gcloud run jobs list --region us-central1 | awk '{print $2}' | grep "^$instance_name$" ; then
echo "Cloud Run Job $instance_name already exists - updating it"
command="update"
else
echo "Cloud Run Job $instance_name doesn't exist - creating it"
command="create"
fi
gcloud run jobs $command $instance_name \
--cpu=1 \
--image=$image \
--max-retries=0 \
Expand Down
2 changes: 1 addition & 1 deletion src/watcher/cloudrunjob.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

(def DEFAULT_GCP_PROJECT_ID "clingen-dev")
(def DEFAULT_GCP_LOCATION "us-central1")
(def DEFAULT_GCP_JOB_NAME "clinvar-ingest-main")
(def DEFAULT_GCP_JOB_NAME "clinvar-ingest")

;; TODO s/b a macro?
(defn gcp-project-id []
Expand Down

0 comments on commit dbeeb30

Please sign in to comment.