From 355db20f75729aaa4d420cfe5136f945f25ee50a Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Mon, 25 Mar 2024 17:47:57 -0700 Subject: [PATCH] Changed sed to jq + Renamed docker image in image_push 1. Sed to jq change to make it consistent to what is being used in internal repos. 2. Renamed image pushed to docker hub. --- .github/workflows/image_build_push.yml | 4 ++-- viz_scripts/docker/start_notebook.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index f020887..857d3f9 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -41,11 +41,11 @@ jobs: # Runs a set of commands using the runners shell - name: build docker image run: | - docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}_dashboard:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} ./frontend + docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} ./frontend docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} ./viz_scripts docker images - name: push docker image run: | - docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}_dashboard:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} + docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}_notebook:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} diff --git a/viz_scripts/docker/start_notebook.sh b/viz_scripts/docker/start_notebook.sh index 33ba7ee..e2d0dd9 100755 --- a/viz_scripts/docker/start_notebook.sh +++ b/viz_scripts/docker/start_notebook.sh @@ -5,9 +5,9 @@ echo "DB host = "${DB_HOST} if [ -z ${DB_HOST} ] ; then local_host=`hostname -i` - sed "s-localhost-${local_host}_" conf/storage/db.conf.sample > conf/storage/db.conf + jq --arg db_host "$local_host" '.timeseries.url = $db_host' conf/storage/db.conf.sample > conf/storage/db.conf else - sed "s-localhost-${DB_HOST}-" conf/storage/db.conf.sample > conf/storage/db.conf + jq --arg db_host "$DB_HOST" '.timeseries.url = $db_host' conf/storage/db.conf.sample > conf/storage/db.conf fi ### configure the saved-notebooks directory for persistent notebooks