From b6d95d604f014284104beee7c95989e9b086af1e Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Thu, 24 Aug 2023 15:06:07 -0400 Subject: [PATCH 01/32] rename services to match image names --- .github/workflows/periodic-image-build.yml | 8 ++++---- .github/workflows/trigger-build-on-changes.yml | 8 ++++---- singleuser/docker-compose.yml | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/periodic-image-build.yml b/.github/workflows/periodic-image-build.yml index 8290856..7c4c8ee 100644 --- a/.github/workflows/periodic-image-build.yml +++ b/.github/workflows/periodic-image-build.yml @@ -24,11 +24,11 @@ jobs: matrix: IMAGE_VARIANT: - base - - scientific - - r - - summa + - scientific-py3 + - scientific-r + - summa-py3 - wrfhydro - - csdms + - csdms-tools steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index 27a17e6..127c304 100644 --- a/.github/workflows/trigger-build-on-changes.yml +++ b/.github/workflows/trigger-build-on-changes.yml @@ -27,11 +27,11 @@ jobs: with: filters: | base: ${{ env.IMAGE_ROOT }}/base/** - scientific: ${{ env.IMAGE_ROOT }}/python3-scientific/** - r: ${{ env.IMAGE_ROOT }}/r/** - summa: ${{ env.IMAGE_ROOT }}/python3-summa/** + scientific-py3: ${{ env.IMAGE_ROOT }}/python3-scientific/** + scientific-r: ${{ env.IMAGE_ROOT }}/r/** + summa-py3: ${{ env.IMAGE_ROOT }}/python3-summa/** wrfhydro: ${{ env.IMAGE_ROOT }}/python3-wrfhydro/** - csdms: ${{ env.IMAGE_ROOT }}/csdms-tools/** + csdms-tools: ${{ env.IMAGE_ROOT }}/csdms-tools/** setup-build-publish-deploy: needs: detect-changes name: Setup, Build, and Publish diff --git a/singleuser/docker-compose.yml b/singleuser/docker-compose.yml index 3a11bb0..1437895 100644 --- a/singleuser/docker-compose.yml +++ b/singleuser/docker-compose.yml @@ -21,7 +21,7 @@ services: ################### # Base Python 3.7 # ################### - base-py37: + base-py3.7: env_file: - '.env' build: @@ -52,7 +52,7 @@ services: ############## # Scientific # ############## - scientific: + scientific-py3: env_file: - '.env' build: @@ -69,7 +69,7 @@ services: ################## # Scientific - R # ################## - r: + scientific-r: env_file: - '.env' build: @@ -86,7 +86,7 @@ services: ############################## # 2020 Hydrogeology Syracuse # ############################## - r-hydrogeology: + hydrogeology-r: env_file: - '.env' build: @@ -102,7 +102,7 @@ services: ###################### # 2020 WHW - Seattle # ###################### - whw: + waterhackweek: env_file: - '.env' build: @@ -170,7 +170,7 @@ services: ######### # SUMMA # ######### - summa: + summa-py3: env_file: - '.env' build: @@ -187,7 +187,7 @@ services: ############### # CSDMS TOOLS # ############### - csdms: + csdms-tools: env_file: - '.env' build: @@ -259,7 +259,7 @@ services: ################### # EDU - Gerbrand # ################### - gerbrand: + edu: env_file: - '.env' build: From 951cd34d7641a5334e68dd80013b1356440fac06 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Thu, 24 Aug 2023 16:05:53 -0400 Subject: [PATCH 02/32] tag with CUAHSI_BASE instead of BUILD_DATE --- singleuser/docker-compose.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/singleuser/docker-compose.yml b/singleuser/docker-compose.yml index 1437895..b2fb146 100644 --- a/singleuser/docker-compose.yml +++ b/singleuser/docker-compose.yml @@ -64,7 +64,7 @@ services: labels: description: | CUAHSI JupyterHub singleuser environment configured with scientific libraries. Built using cuahsi/jupyterhub-base:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-scientific-py3:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-scientific-py3:${CUAHSI_BASE} ################## # Scientific - R # @@ -81,7 +81,7 @@ services: labels: description: | CUAHSI JupyterHub singleuser environment configured with scientific libraries with the R programming language. Built using cuahsi/jupyterhub-base:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-scientific-r:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-scientific-r:${CUAHSI_BASE} ############################## # 2020 Hydrogeology Syracuse # @@ -97,7 +97,7 @@ services: labels: description: | CUAHSI JupyterHub singleuser environment configured with scientific libraries for Tao Wen's 2020 Hydrogeology course at Syracuse University. Built using cuahsi/singleuser-scientific-r:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-hydrogeology-r:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-hydrogeology-r:${CUAHSI_BASE} ###################### # 2020 WHW - Seattle # @@ -113,7 +113,7 @@ services: labels: description: | This environment is configured with scientific libraries for the 2020 Waterhackweek Cybertraining event. Built using cuahsi/singleuser-scientific-py3:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-waterhackweek:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-waterhackweek:${CUAHSI_BASE} ################################ # 2018 Near Surface Geophysics # @@ -130,7 +130,7 @@ services: labels: description: | CUAHSI JupyterHub singleuser environment configured for the 2019 Near Surface Geophysics Workshop. This image uses WINE to run R2, gmsh,and pyres. Built using cuahsi/singleuser-scientific-py3:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-geophysics:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-geophysics:${CUAHSI_BASE} #################### @@ -165,7 +165,7 @@ services: labels: description: | Environment configured for Parflow. Built using cuahsi/singleuser-base:centos7.v${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-parflow:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-parflow:${CUAHSI_BASE} ######### # SUMMA # @@ -182,7 +182,7 @@ services: labels: description: | Environment configured for SUMMA. Built using cuahsi/singleuser-base:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-summa-py3:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-summa-py3:${CUAHSI_BASE} ############### # CSDMS TOOLS # @@ -199,7 +199,7 @@ services: labels: description: | Environment configured for the Community Surface Dynamics Modeling System. Built using cuahsi/singleuser-base:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-csdms-tools:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-csdms-tools:${CUAHSI_BASE} ############# # WRF-Hydro # @@ -220,7 +220,7 @@ services: labels: description: | Environment configured for the NCAR WRF-Hydro model (nwm v2.0). Built using cuahsi/singleuser-base:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-wrfhydro:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-wrfhydro:${CUAHSI_BASE} ############# # SI-2021 # @@ -237,7 +237,7 @@ services: labels: description: | Environment configured for the 2021 SI. Built using cuahsi/singleuser-base:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-si2021:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-si2021:${CUAHSI_BASE} ############# # MODFLOW # @@ -254,7 +254,7 @@ services: labels: description: | Environment configured to run MODFLOW for the 2021 IAH conference. Built using cuahsi/singleuser-base:${CUAHSI_BASE} on ${BUILD_DATE}. - image: ${REPOSITORY}/singleuser-modflow:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-modflow:${CUAHSI_BASE} ################### # EDU - Gerbrand # @@ -268,7 +268,7 @@ services: args: # image version to use as base BASE_VERSION: ${CUAHSI_BASE} - image: ${REPOSITORY}/singleuser-edu:${BUILD_DATE} + image: ${REPOSITORY}/singleuser-edu:${CUAHSI_BASE} ######## # Test # From 6137f8a1e75e88af6d47b80fb15c7a43020593a7 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Thu, 14 Mar 2024 09:07:32 -0400 Subject: [PATCH 03/32] remove publish image from periodic image build --- .github/workflows/periodic-image-build.yml | 25 ---------------------- 1 file changed, 25 deletions(-) diff --git a/.github/workflows/periodic-image-build.yml b/.github/workflows/periodic-image-build.yml index 7c4c8ee..3a88cc5 100644 --- a/.github/workflows/periodic-image-build.yml +++ b/.github/workflows/periodic-image-build.yml @@ -2,10 +2,6 @@ name: Periodically Build and Publish to Registry env: IMAGE_ROOT: singleuser - REGISTRY_HOSTNAME: docker.io - DOCKER_USER: ${{ secrets.DOCKER_USER }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }} on: schedule: @@ -44,32 +40,11 @@ jobs: uses: xom9ikk/dotenv@v2 with: path: ${{ env.IMAGE_ROOT }} - - - name: Docker Login - run: | - echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin # Build the Docker image - name: Build run: | cd "${IMAGE_ROOT}" docker compose build ${{ matrix.IMAGE_VARIANT }} - - - name: Echo env configuration and set image tag - id: tagging - run: | - echo "JH_BASE: ${{ env.JH_BASE }}" - echo "CUAHSI_BASE: ${{ env.CUAHSI_BASE }}" - echo "BUILD_DATE: ${{ env.BUILD_DATE }}" - echo ------------ - export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:${{ env.CUAHSI_BASE }}" - export DOCKER_FULL_PATH="$DOCKER_TAG-periodic-$(date +'%Y.%m.%d')" - echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV - echo $DOCKER_FULL_PATH - docker tag $DOCKER_TAG $DOCKER_FULL_PATH - - - name: Push Docker Image - run: | - docker push $DOCKER_FULL_PATH # TODO: run tests? From 290ee8f719015a52c08f22286425af882d3e6682 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Thu, 14 Mar 2024 09:29:49 -0400 Subject: [PATCH 04/32] alter tag to include "built-on" --- .github/workflows/trigger-build-on-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index 127c304..ebe0c3a 100644 --- a/.github/workflows/trigger-build-on-changes.yml +++ b/.github/workflows/trigger-build-on-changes.yml @@ -68,7 +68,7 @@ jobs: echo "BUILD_DATE: ${{ env.BUILD_DATE }}" echo ------------ export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:${{ env.CUAHSI_BASE }}" - export DOCKER_FULL_PATH="$DOCKER_TAG-$GITHUB_SHA" + export DOCKER_FULL_PATH="$DOCKER_TAG-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH docker tag $DOCKER_TAG $DOCKER_FULL_PATH From eb29cc034fe50eacf7de1ddb7c2624229d786cba Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Thu, 14 Mar 2024 09:30:44 -0400 Subject: [PATCH 05/32] test to build --- singleuser/base/Dockerfile.base | 1 + 1 file changed, 1 insertion(+) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index cecb8d1..1e4fa20 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -84,5 +84,6 @@ ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth # remove work dir b/c we're using "data" +# test comment RUN rm -rf ~/work From 19862fc8a0e6d5fc021e7820e2d1f001423ee02d Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Thu, 14 Mar 2024 09:40:54 -0400 Subject: [PATCH 06/32] Revert "test to build" This reverts commit eb29cc034fe50eacf7de1ddb7c2624229d786cba. --- singleuser/base/Dockerfile.base | 1 - 1 file changed, 1 deletion(-) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index 1e4fa20..cecb8d1 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -84,6 +84,5 @@ ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth # remove work dir b/c we're using "data" -# test comment RUN rm -rf ~/work From 743b22740a77d787427a52160cd18d541353ae6f Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Mon, 18 Mar 2024 11:36:54 -0400 Subject: [PATCH 07/32] Create manual-build.yml --- .github/workflows/manual-build.yml | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/manual-build.yml diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml new file mode 100644 index 0000000..7c1f525 --- /dev/null +++ b/.github/workflows/manual-build.yml @@ -0,0 +1,56 @@ +name: Build and Publish to Registry on Github push + +env: + GITHUB_SHA: ${{ github.sha }} + IMAGE_ROOT: singleuser + REGISTRY_HOSTNAME: docker.io + DOCKER_USER: ${{ secrets.DOCKER_USER }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }} + +on: + workflow_dispatch: + inputs: + image: + description: 'Image Name' + required: true + default: 'base' + +jobs: + build-image: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Load .env file + uses: xom9ikk/dotenv@v2 + with: + path: ${{ env.IMAGE_ROOT }} + + - name: Docker Login + run: | + echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin + + # Build the Docker image + - name: Build + run: | + cd "${IMAGE_ROOT}" + docker compose build ${{ inputs.image }} + # - name: Echo env configuration and set image tag + # id: tagging + # run: | + # echo "JH_BASE: ${{ env.JH_BASE }}" + # echo "CUAHSI_BASE: ${{ env.CUAHSI_BASE }}" + # echo "BUILD_DATE: ${{ env.BUILD_DATE }}" + # echo ------------ + # export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:${{ env.CUAHSI_BASE }}" + # export DOCKER_FULL_PATH="$DOCKER_TAG-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" + # echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV + # echo $DOCKER_FULL_PATH + # docker tag $DOCKER_TAG $DOCKER_FULL_PATH + + # - name: Push Docker Image + # run: | + # docker push ${{ env.DOCKER_FULL_PATH }} From 119034fcf6791c81cdc37a0972e31b8b2e4c4ba6 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 11:48:36 -0400 Subject: [PATCH 08/32] Add environment variables for Docker registry authentication back in --- .github/workflows/periodic-image-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/periodic-image-build.yml b/.github/workflows/periodic-image-build.yml index 3a88cc5..44e3057 100644 --- a/.github/workflows/periodic-image-build.yml +++ b/.github/workflows/periodic-image-build.yml @@ -2,6 +2,10 @@ name: Periodically Build and Publish to Registry env: IMAGE_ROOT: singleuser + REGISTRY_HOSTNAME: docker.io + DOCKER_USER: ${{ secrets.DOCKER_USER }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }} on: schedule: From ec95bc77c04a7245b923f85fc6afda19b59e4f6c Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 12:25:02 -0400 Subject: [PATCH 09/32] add BRANCH_NAME --- .github/workflows/trigger-build-on-changes.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index ebe0c3a..e4bbfad 100644 --- a/.github/workflows/trigger-build-on-changes.yml +++ b/.github/workflows/trigger-build-on-changes.yml @@ -7,6 +7,7 @@ env: DOCKER_USER: ${{ secrets.DOCKER_USER }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }} + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} on: push: @@ -63,12 +64,15 @@ jobs: - name: Echo env configuration and set image tag id: tagging run: | + echo "IMAGE_VARIANT: ${{ matrix.IMAGE_VARIANT }}" echo "JH_BASE: ${{ env.JH_BASE }}" echo "CUAHSI_BASE: ${{ env.CUAHSI_BASE }}" echo "BUILD_DATE: ${{ env.BUILD_DATE }}" + echo "GITHUB_SHA: $GITHUB_SHA" + echo "BRANCH_NAME: $BRANCH_NAME" echo ------------ export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:${{ env.CUAHSI_BASE }}" - export DOCKER_FULL_PATH="$DOCKER_TAG-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" + export DOCKER_FULL_PATH="$DOCKER_TAG-$BRANCH_NAME-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH docker tag $DOCKER_TAG $DOCKER_FULL_PATH From 77b3e8507eb32c631949eacb7c9459d11117f8c7 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 12:30:44 -0400 Subject: [PATCH 10/32] simulate a change --- singleuser/base/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index cecb8d1..cf42819 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -83,6 +83,6 @@ RUN pip install hydroshare-on-jupyter==0.1.5 && \ ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth -# remove work dir b/c we're using "data" +# remove work dir b/c we're using "data"! RUN rm -rf ~/work From 2e6dd64038bebb7baf801177f0fb86f74d82cdcc Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 12:35:29 -0400 Subject: [PATCH 11/32] Revert "simulate a change" This reverts commit 77b3e8507eb32c631949eacb7c9459d11117f8c7. --- singleuser/base/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index cf42819..cecb8d1 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -83,6 +83,6 @@ RUN pip install hydroshare-on-jupyter==0.1.5 && \ ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth -# remove work dir b/c we're using "data"! +# remove work dir b/c we're using "data" RUN rm -rf ~/work From e910f4bfee87b19ff8f8d8ead9f58bf722302255 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 16:12:00 -0400 Subject: [PATCH 12/32] Update Docker tag format --- .github/workflows/trigger-build-on-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index e4bbfad..99c85f1 100644 --- a/.github/workflows/trigger-build-on-changes.yml +++ b/.github/workflows/trigger-build-on-changes.yml @@ -72,7 +72,7 @@ jobs: echo "BRANCH_NAME: $BRANCH_NAME" echo ------------ export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:${{ env.CUAHSI_BASE }}" - export DOCKER_FULL_PATH="$DOCKER_TAG-$BRANCH_NAME-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" + export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:$BRANCH_NAME-latest" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH docker tag $DOCKER_TAG $DOCKER_FULL_PATH From bd25e43eadf1d1c6218ac330b78bb82e4185fa33 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 16:12:04 -0400 Subject: [PATCH 13/32] test --- singleuser/base/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index cecb8d1..5ad9c49 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -79,7 +79,7 @@ RUN echo 'cd $HOME' >> .profile RUN pip install hydroshare-on-jupyter==0.1.5 && \ python -m hydroshare_on_jupyter configure -# copy hydroshare on jupyter config file +# copy hydroshare on jupyter config file! ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth From d53ee9977f6fa0a42031cca8a7775ef54b170514 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 16:27:06 -0400 Subject: [PATCH 14/32] Update Docker tag in trigger-build-on-changes.yml --- .github/workflows/trigger-build-on-changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger-build-on-changes.yml b/.github/workflows/trigger-build-on-changes.yml index 99c85f1..1fed964 100644 --- a/.github/workflows/trigger-build-on-changes.yml +++ b/.github/workflows/trigger-build-on-changes.yml @@ -72,7 +72,7 @@ jobs: echo "BRANCH_NAME: $BRANCH_NAME" echo ------------ export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:${{ env.CUAHSI_BASE }}" - export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:$BRANCH_NAME-latest" + export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}:$BRANCH_NAME-latest" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH docker tag $DOCKER_TAG $DOCKER_FULL_PATH From 45679d7a9ac82118ed8b16bbcdfca458f17946b7 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 16:32:29 -0400 Subject: [PATCH 15/32] Revert "test" This reverts commit bd25e43eadf1d1c6218ac330b78bb82e4185fa33. --- singleuser/base/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index 5ad9c49..cecb8d1 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -79,7 +79,7 @@ RUN echo 'cd $HOME' >> .profile RUN pip install hydroshare-on-jupyter==0.1.5 && \ python -m hydroshare_on_jupyter configure -# copy hydroshare on jupyter config file! +# copy hydroshare on jupyter config file ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth From 2350140ab616f4864f5133c3b8a828ca2edadb86 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 16:33:43 -0400 Subject: [PATCH 16/32] test --- singleuser/base/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index cecb8d1..5ad9c49 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -79,7 +79,7 @@ RUN echo 'cd $HOME' >> .profile RUN pip install hydroshare-on-jupyter==0.1.5 && \ python -m hydroshare_on_jupyter configure -# copy hydroshare on jupyter config file +# copy hydroshare on jupyter config file! ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth From d93e5abea4c16d1b84f956145947474f7a1d2dc0 Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Mon, 18 Mar 2024 16:41:07 -0400 Subject: [PATCH 17/32] Revert "test" This reverts commit 2350140ab616f4864f5133c3b8a828ca2edadb86. --- singleuser/base/Dockerfile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/base/Dockerfile.base b/singleuser/base/Dockerfile.base index 5ad9c49..cecb8d1 100644 --- a/singleuser/base/Dockerfile.base +++ b/singleuser/base/Dockerfile.base @@ -79,7 +79,7 @@ RUN echo 'cd $HOME' >> .profile RUN pip install hydroshare-on-jupyter==0.1.5 && \ python -m hydroshare_on_jupyter configure -# copy hydroshare on jupyter config file! +# copy hydroshare on jupyter config file ENV DATA=${HOME}/downloads \ OAUTH=${HOME}/.hs_auth From 2ade0200d89a74d529178e0133ea381e5d46658b Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Mon, 18 Mar 2024 18:04:13 -0400 Subject: [PATCH 18/32] Update manual-build.yml --- .github/workflows/manual-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 7c1f525..33d17ab 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -1,4 +1,4 @@ -name: Build and Publish to Registry on Github push +name: Manual Build from Branch env: GITHUB_SHA: ${{ github.sha }} From 4c34fe83f19412405b5afe3420e0d6cad3676254 Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Mon, 18 Mar 2024 18:18:56 -0400 Subject: [PATCH 19/32] Added branch to manual build. --- .github/workflows/manual-build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 33d17ab..0a27453 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -11,10 +11,15 @@ env: on: workflow_dispatch: inputs: + code-branch: + description: 'Code branch to build from' + required: true + default: master image: description: 'Image Name' required: true default: 'base' + jobs: build-image: @@ -23,6 +28,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + ref: ${{ inputs.code-branch }} - name: Load .env file uses: xom9ikk/dotenv@v2 @@ -36,6 +43,11 @@ jobs: # Build the Docker image - name: Build run: | + echo "Building Image for:" + echo " Branch = ${{ inputs.code-branch }} + echo " Image = ${{ inputs.image }} + echo -e "\n" + cd "${IMAGE_ROOT}" docker compose build ${{ inputs.image }} # - name: Echo env configuration and set image tag From d6d6a24fdef889232f6903c7b1f2845c7d38638a Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Mon, 18 Mar 2024 18:21:52 -0400 Subject: [PATCH 20/32] Cleaning stdout for manual build action --- .github/workflows/manual-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 0a27453..e8a9795 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -44,8 +44,8 @@ jobs: - name: Build run: | echo "Building Image for:" - echo " Branch = ${{ inputs.code-branch }} - echo " Image = ${{ inputs.image }} + echo " Branch = ${{ inputs.code-branch }}" + echo " Image = ${{ inputs.image }}" echo -e "\n" cd "${IMAGE_ROOT}" From a9f56bed5940d734bf2a0e226370d541a9c722e1 Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Mon, 18 Mar 2024 18:27:55 -0400 Subject: [PATCH 21/32] adding choices to manual build input --- .github/workflows/manual-build.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index e8a9795..ea7b7cc 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -14,12 +14,27 @@ on: code-branch: description: 'Code branch to build from' required: true - default: master + default: develop image: + type: choice description: 'Image Name' required: true default: 'base' - + options: + - base + - base-py37 + - base-centos7 + - scientific + - r + - r-hydrogeology + - whw + - geophysics + - parflow + - summa + - wrfhydro + - csdms + - modflow + - physical-hydrology jobs: build-image: From 1ac8fecf34a95dfd5b53947c276af8fad379635b Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Mon, 18 Mar 2024 20:14:21 -0400 Subject: [PATCH 22/32] added conditional push to dockerhub to manual build --- .github/workflows/manual-build.yml | 34 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index ea7b7cc..1601a37 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -35,6 +35,10 @@ on: - csdms - modflow - physical-hydrology + push-to-dockerhub: + description: boolean flag to indicate if the image should be pushed to hub.docker.com + required: true + default: 'false' jobs: build-image: @@ -56,13 +60,19 @@ jobs: echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin # Build the Docker image - - name: Build + - name: Echo Info + id: info run: | echo "Building Image for:" echo " Branch = ${{ inputs.code-branch }}" echo " Image = ${{ inputs.image }}" - echo -e "\n" - + echo ------------ + echo "JH_BASE: ${{ env.JH_BASE }}" + echo "CUAHSI_BASE: ${{ env.CUAHSI_BASE }}" + echo "BUILD_DATE: ${{ env.BUILD_DATE }}" + echo ------------ + - name: Build + run: | cd "${IMAGE_ROOT}" docker compose build ${{ inputs.image }} # - name: Echo env configuration and set image tag @@ -72,12 +82,14 @@ jobs: # echo "CUAHSI_BASE: ${{ env.CUAHSI_BASE }}" # echo "BUILD_DATE: ${{ env.BUILD_DATE }}" # echo ------------ - # export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ matrix.IMAGE_VARIANT }}:${{ env.CUAHSI_BASE }}" - # export DOCKER_FULL_PATH="$DOCKER_TAG-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" - # echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV - # echo $DOCKER_FULL_PATH - # docker tag $DOCKER_TAG $DOCKER_FULL_PATH - # - name: Push Docker Image - # run: | - # docker push ${{ env.DOCKER_FULL_PATH }} + + - name: Push Docker Image + if: ${{ inputs.push-to-dockerhub }} == 'true' + run: | + export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" + export DOCKER_FULL_PATH="$DOCKER_TAG-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" + echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV + echo $DOCKER_FULL_PATH + docker tag $DOCKER_TAG $DOCKER_FULL_PATH + docker push ${{ env.DOCKER_FULL_PATH }} From baa30d939cfb09af5d22d45fa9c9f78c30980bc5 Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 09:57:51 -0400 Subject: [PATCH 23/32] manual-build action - Fixed mislabel in docker tagging and changed push input to boolean --- .github/workflows/manual-build.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 1601a37..561e677 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -36,9 +36,10 @@ on: - modflow - physical-hydrology push-to-dockerhub: - description: boolean flag to indicate if the image should be pushed to hub.docker.com + description: Push Result to Repository + type: boolean required: true - default: 'false' + default: false jobs: build-image: @@ -75,21 +76,12 @@ jobs: run: | cd "${IMAGE_ROOT}" docker compose build ${{ inputs.image }} - # - name: Echo env configuration and set image tag - # id: tagging - # run: | - # echo "JH_BASE: ${{ env.JH_BASE }}" - # echo "CUAHSI_BASE: ${{ env.CUAHSI_BASE }}" - # echo "BUILD_DATE: ${{ env.BUILD_DATE }}" - # echo ------------ - - - name: Push Docker Image - if: ${{ inputs.push-to-dockerhub }} == 'true' + if: ${{ inputs.push-to-dockerhub }} run: | - export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" - export DOCKER_FULL_PATH="$DOCKER_TAG-$GITHUB_SHA-built_on_$(date +'%Y.%m.%d')" + export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}::${{ env.CUAHSI_BASE }}" + export DOCKER_NEW_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH - docker tag $DOCKER_TAG $DOCKER_FULL_PATH - docker push ${{ env.DOCKER_FULL_PATH }} + docker tag $DOCKER_TAG $DOCKER_NEW_TAG + docker push ${{ env.DOCKER_NEW_TAG }} From 0bab897cdcc4241b2f27b6480da18122413f173a Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 10:16:05 -0400 Subject: [PATCH 24/32] manual build action - Minor change to docker environment variables in the push step --- .github/workflows/manual-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 561e677..4305958 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -80,8 +80,8 @@ jobs: if: ${{ inputs.push-to-dockerhub }} run: | export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}::${{ env.CUAHSI_BASE }}" - export DOCKER_NEW_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" + export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH - docker tag $DOCKER_TAG $DOCKER_NEW_TAG - docker push ${{ env.DOCKER_NEW_TAG }} + docker tag $DOCKER_TAG $DOCKER_FULL_PATH + docker push ${{ env.DOCKER_FULL_PATH }} From 6c86c3613517d3cee62457d842c2ab31f26adceb Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 10:24:47 -0400 Subject: [PATCH 25/32] manual build action - typo in docker tag causing push to fail :( --- .github/workflows/manual-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 4305958..4065a23 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -79,7 +79,7 @@ jobs: - name: Push Docker Image if: ${{ inputs.push-to-dockerhub }} run: | - export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}::${{ env.CUAHSI_BASE }}" + export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ env.CUAHSI_BASE }}" export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH From 3a20cad5ac7f6d85c99b6b6b6d46ccdce94e3acf Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 10:46:12 -0400 Subject: [PATCH 26/32] manual build action - changed docker push command. fingers crossed that this works... --- .github/workflows/manual-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 4065a23..1d87b17 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -84,4 +84,4 @@ jobs: echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH docker tag $DOCKER_TAG $DOCKER_FULL_PATH - docker push ${{ env.DOCKER_FULL_PATH }} + docker push $DOCKER_FULL_PATH From 84ab173d1d728df8cc36a7ca110f99586be82d49 Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 11:45:57 -0400 Subject: [PATCH 27/32] manual build action - updated image choice list to match docker-compose file on develop --- .github/workflows/manual-build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 1d87b17..5cf8468 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -24,19 +24,19 @@ on: - base - base-py37 - base-centos7 - - scientific - - r - - r-hydrogeology - - whw + - scientific-py3 + - scientific-r + - hydrogeology-r + - waterhackweek - geophysics - parflow - - summa + - summa-py3 - wrfhydro - - csdms + - csdms-tools - modflow - - physical-hydrology + - hl-physical-hydrology push-to-dockerhub: - description: Push Result to Repository + description: Push to Repository type: boolean required: true default: false From 524368cae6ad7f0b3c1fe76cfc97cfb4f2251069 Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 12:22:54 -0400 Subject: [PATCH 28/32] manual build action - added conditional to docker push step to account for differences between CUAHSI_BASE and BUILD_DATE values --- .github/workflows/manual-build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 5cf8468..36e277b 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -79,7 +79,15 @@ jobs: - name: Push Docker Image if: ${{ inputs.push-to-dockerhub }} run: | - export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ env.CUAHSI_BASE }}" + + # set the DATE variable to BUILD_DATE + # unless we're building the 'base' image + DATE=${{ env.BUILD_DATE }} + if [ ${{ inputs.image }} == 'base ]; then + DATE= ${{ env.CUAHSI_BASE }} + fi + + export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:$DATE" export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH From 2bbe98a27f137af07b77e730546352b8b268b35e Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 12:31:31 -0400 Subject: [PATCH 29/32] manual build action: adding log message to sort out tagging issue. --- .github/workflows/manual-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 36e277b..cac6d6e 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -83,9 +83,11 @@ jobs: # set the DATE variable to BUILD_DATE # unless we're building the 'base' image DATE=${{ env.BUILD_DATE }} - if [ ${{ inputs.image }} == 'base ]; then - DATE= ${{ env.CUAHSI_BASE }} + if [ ${{ inputs.image }} == "base" ]; then + DATE=${{ env.CUAHSI_BASE }} fi + echo $DATE + echo ${{ inputs.image }} export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:$DATE" export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" From 253b1de1ebffebef93cbf9ebbc55a46a75244559 Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 13:17:34 -0400 Subject: [PATCH 30/32] manual build action - restructure the date conditional to see if this works now. --- .github/workflows/manual-build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index cac6d6e..bfd7605 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -80,18 +80,19 @@ jobs: if: ${{ inputs.push-to-dockerhub }} run: | - # set the DATE variable to BUILD_DATE + # use BUILD_DATE in the tag # unless we're building the 'base' image - DATE=${{ env.BUILD_DATE }} if [ ${{ inputs.image }} == "base" ]; then - DATE=${{ env.CUAHSI_BASE }} + export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ env.CUAHSI_BASE }}" + else + export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ env.BUILD_DATE }}" fi - echo $DATE - echo ${{ inputs.image }} - - export DOCKER_TAG="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:$DATE" + export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV echo $DOCKER_FULL_PATH + docker tag $DOCKER_TAG $DOCKER_FULL_PATH docker push $DOCKER_FULL_PATH + + From 51d81fb695a61e4bd39b279984d1b73cc76578aa Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 13:23:51 -0400 Subject: [PATCH 31/32] manual build action - added test choice to image list. This will enable faster build/testing of github actions. --- .github/workflows/manual-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index bfd7605..0edfd38 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -35,6 +35,7 @@ on: - csdms-tools - modflow - hl-physical-hydrology + - test push-to-dockerhub: description: Push to Repository type: boolean From ff102718d6080bd0d1b12346ac570022ea96d5b8 Mon Sep 17 00:00:00 2001 From: Tony Castronova Date: Tue, 19 Mar 2024 13:42:39 -0400 Subject: [PATCH 32/32] manual build action - adding debugging stdout --- .github/workflows/manual-build.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index 0edfd38..0e1dbf9 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -80,7 +80,8 @@ jobs: - name: Push Docker Image if: ${{ inputs.push-to-dockerhub }} run: | - + echo "Begin Image Tagging and Pushing" + # use BUILD_DATE in the tag # unless we're building the 'base' image if [ ${{ inputs.image }} == "base" ]; then @@ -90,10 +91,14 @@ jobs: fi export DOCKER_FULL_PATH="${REPOSITORY}/${IMAGE_ROOT}-${{ inputs.image }}:${{ inputs.code-branch }}-latest" + echo "Old Image Name/Tag = $DOCKER_TAG" + echo "New Image Name/Tag = $DOCKER_FULL_PATH" + echo "DOCKER_FULL_PATH=$DOCKER_FULL_PATH" >> $GITHUB_ENV - echo $DOCKER_FULL_PATH + docker tag $DOCKER_TAG $DOCKER_FULL_PATH docker push $DOCKER_FULL_PATH - + + echo "End Image Tagging and Pushing"