From 237df169dda2fbee900921beeb40aeded6405ed5 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Fri, 26 Apr 2024 01:35:08 -0700 Subject: [PATCH 01/23] Artifact download test - 1 Added working code from join repo to fetch docker image tags using artifact download. --- .github/fetch_runID.py | 67 ++++++++++++++++++++++ .github/workflows/image_build_push.yml | 79 ++++++++++++++++++++++---- 2 files changed, 136 insertions(+), 10 deletions(-) create mode 100644 .github/fetch_runID.py diff --git a/.github/fetch_runID.py b/.github/fetch_runID.py new file mode 100644 index 0000000..c40005d --- /dev/null +++ b/.github/fetch_runID.py @@ -0,0 +1,67 @@ + +import json +import logging +import requests +import sys + +if __name__ == '__main__': + logging.basicConfig(level=logging.DEBUG) + + # Just checking to see if workflows are being fetched; it works!!! + # download_url = "https://api.github.com/repos/MukuFlash03/e-mission-server/actions/workflows" + # logging.debug("About to fetch workflows present in e-mission-server from %s" % download_url) + # r = requests.get(download_url) + # if r.status_code != 200: + # logging.debug(f"Unable to fetch workflows, status code: {r.status_code}") + # sys.exit(1) + # else: + # workflows_json = json.loads(r.text) + # logging.debug(f"Successfully fetched workflows") + # print(workflows_json) + + # for workflow_entry in workflows_json["workflows"]: + # print("Workflow name: %s ; id: %s " % (workflow_entry["name"], workflow_entry["id"])) + + + + ''' + Workflow "docker image" uses image_build_push.yml + From above commented out code, and checked via terminal as well, + workflow id for the "docker image" can be fetched using: + https://api.github.com/repos/MukuFlash03/e-mission-server/actions/workflows + https://api.github.com/repos/e-mission/e-mission-server/actions/workflows + + For MukuFlash03: id = 75506902 + For e-mission-server: id = 35580278 + ''' + download_url = "https://api.github.com/repos/MukuFlash03/e-mission-server/actions/workflows/75506902/runs" + # download_url = "https://api.github.com/repos/e-mission/e-mission-server/actions/workflows/35580278/runs" + logging.debug("About to fetch workflow runs present in docker image workflow present in e-mission-server from %s" % download_url) + r = requests.get(download_url) + if r.status_code != 200: + logging.debug(f"Unable to fetch workflow runs, status code: {r.status_code}") + sys.exit(1) + else: + workflow_runs_json = json.loads(r.text) + logging.debug(f"Successfully fetched workflow runs") + # print(workflow_runs_json) + + workflow_runs = workflow_runs_json["workflow_runs"] + if workflow_runs: + successful_runs = [run for run in workflow_runs \ + if run["status"] == "completed" and \ + run["conclusion"] == "success" and \ + run["head_branch"] == "tags-artifact" + ] + # print(successful_runs) + if successful_runs: + sorted_runs = successful_runs.sort(reverse=True, key=lambda x: x["updated_at"]) + sorted_runs = sorted(successful_runs, reverse=True, key=lambda x: x["updated_at"]) + # print(sorted_runs) + latest_run_id = sorted_runs[0]["id"] + # print(latest_run_id) + print(f"::set-output name=run_id::{latest_run_id}") + # else: + # print("No successful runs") + # else: + # print("No workflow runs found") diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index f31af10..a159e47 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -8,9 +8,9 @@ on: push: # Mukul: # I've added a local test branch on my system and using it for testing image push. - # So, for testing purposes, need to checkout a branch "image-push-merge" + # So, for testing purposes, need to checkout a branch "tags-artifact" # TODO: Need to change to build off master or main once it looks good. - branches: [ image-push-merge ] + branches: [ tags-artifact ] # Env variable @@ -20,11 +20,46 @@ env: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + + fetch_run_id: + runs-on: ubuntu-latest + + outputs: + run_id: ${{ steps.get_run_id.outputs.run_id }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Run Python script + id: run_script + run: | + echo "Fetching latest successful run ID from e-misison-server docker image workflow" + python .github/fetch_runID.py + + - name: Get Run ID + id: get_run_id + run: echo "run_id=${{ steps.run_script.outputs.run_id }}" >> "$GITHUB_OUTPUT" + # This workflow contains a single job called "build" build: + needs: fetch_run_id + # The type of runner that the job will run on runs-on: ubuntu-latest + env: + RUN_ID: ${{needs.fetch_run_id.outputs.run_id}} + # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -42,11 +77,35 @@ jobs: run: echo running in repo ${GITHUB_REPOSITORY#*/} branch ${GITHUB_REF##*/} on ${{ steps.date.outputs.date }} # Runs a set of commands using the runners shell - - name: build docker image - run: | - docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . - docker images - - - name: push docker image - run: | - docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} + # - name: build docker image + # run: | + # docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . + # docker images + + # - name: push docker image + # run: | + # docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} + + - name: Use Run ID from previous fetch_run_id job + run: echo Run ID from previous job ${{ needs.fetch_run_id.outputs.run_id }} + + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: docker-image-tag + github-token: ${{ secrets.GH_PAT_TAG }} + repository: MukuFlash03/e-mission-server + run-id: ${{ env.RUN_ID }} + + - name: Print artifact tag + run: cat tag_file.txt + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: docker-image-tag + path: tag_file.txt + overwrite: true + + - name: List artifact + run: ls -R From cd9682a7dbcf345bb1a90a9ce8c59f40b8fb8709 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Wed, 1 May 2024 05:29:55 -0700 Subject: [PATCH 02/23] Artifact + Matrix - 1 Combining both artifact and matrix methods since both workflow is triggered by both push event and workflow_dispatch event. Workflow dispatch event receives tag via input parameter sent via server workflow. Push event does not receive any tag and the DOCKER_IMAGE_TAG_2 would have empty value since workflow triggering event and hence input parameter would be empty. So, was facing the issue of having empty timestamp being suffixed to the docker image tag in the Dockerfiles. Hence, using the logic of fetching the latest run id and then downloading the artifact uploaded by server workflow to ensure that a non-empty value is also retrieved for the timestamp. This value is stored in DOCKER_IMAGE_TAG_1 and can be used for building docker image. Now, depending on the trigger event, the appropriate docker image tag can be used in the docker build command for the --build-arg flag. Additionally, Dockerfiles now use ARG to use the tags passed from the docker build command, hence using environment variables. Docker-compose files similarly have the args config parameter set. Developers would have to set the correct server image tags manually here for the docker-compose command to pass the value to the ARG in the Dockerfile and correctly set the image tag to point to the appropriate server image. Need to mention somewhere in the ReadME.md to refer to the server image list in Dockerhub to choose the latest image tag. While pushing the image in the GitHub actions, it'll be done manually. Todo: Change branch name to tags-combo-approach in fetch_runID.py --- .github/workflows/image_build_push.yml | 97 ++++++++++++++++++-------- Dockerfile | 3 +- docker-compose-dev.yml | 2 + docker-compose-prod-nginx.yml | 2 + docker-compose-prod.yml | 2 + docker/Dockerfile | 3 +- 6 files changed, 77 insertions(+), 32 deletions(-) diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index a159e47..b9d14fa 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -8,9 +8,15 @@ on: push: # Mukul: # I've added a local test branch on my system and using it for testing image push. - # So, for testing purposes, need to checkout a branch "tags-artifact" + # So, for testing purposes, need to checkout a branch "tags-combo-approach" # TODO: Need to change to build off master or main once it looks good. - branches: [ tags-artifact ] + branches: [ tags-combo-approach ] + + workflow_dispatch: + inputs: + docker_image_tag: + description: "Latest Docker image tags passed from e-mission-server repository on image build and push" + required: true # Env variable @@ -28,7 +34,7 @@ jobs: run_id: ${{ steps.get_run_id.outputs.run_id }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v2 @@ -50,20 +56,71 @@ jobs: id: get_run_id run: echo "run_id=${{ steps.run_script.outputs.run_id }}" >> "$GITHUB_OUTPUT" + + fetch_tag: + needs: fetch_run_id + runs-on: ubuntu-latest + + env: + RUN_ID: ${{ needs.fetch_run_id.outputs.run_id }} + + outputs: + docker_image_tag: ${{ steps.get_docker_tag.outputs.run_id }} + + steps: + - uses: actions/checkout@v4 + + - name: Use Run ID from previous fetch_run_id job + run: echo Run ID from previous job ${{ env.RUN_ID }} + + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: docker-image-tag + github-token: ${{ secrets.GH_PAT_TAG }} + repository: MukuFlash03/e-mission-server + run-id: ${{ env.RUN_ID }} + + - name: Print artifact tag + id: get_docker_tag + run: | + docker_image_tag=$(cat tag_file.txt) + echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" + + + # - name: Upload Artifact + # uses: actions/upload-artifact@v4 + # with: + # name: docker-image-tag + # path: tag_file.txt + # overwrite: true + + # - name: List artifact + # run: ls -R + # This workflow contains a single job called "build" build: - needs: fetch_run_id + needs: fetch_tag # The type of runner that the job will run on runs-on: ubuntu-latest env: - RUN_ID: ${{needs.fetch_run_id.outputs.run_id}} + DOCKER_IMAGE_TAG_1: ${{ needs.fetch_tag.outputs.docker_image_tag }} + DOCKER_IMAGE_TAG_2: ${{ github.event.inputs.docker_image_tag }} # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + + - name: Print input docker image tag + run: | + echo "Event name: ${{ github.event_name }}" + echo "Event name: ${{ github.event.action }}" + echo "Latest docker image tag (push): ${{ env.DOCKER_IMAGE_TAG_1 }}" + echo "Latest docker image tag (workflow_dispatch): ${{ env.DOCKER_IMAGE_TAG_2 }}" + - name: docker login run: | # log into docker hub account docker login -u $DOCKER_USER -p $DOCKER_PASSWORD @@ -79,33 +136,13 @@ jobs: # Runs a set of commands using the runners shell # - name: build docker image # run: | - # docker build -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . + # if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + # docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_2 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . + # else + # docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_1 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . + # fi # docker images # - name: push docker image # run: | # docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} - - - name: Use Run ID from previous fetch_run_id job - run: echo Run ID from previous job ${{ needs.fetch_run_id.outputs.run_id }} - - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: docker-image-tag - github-token: ${{ secrets.GH_PAT_TAG }} - repository: MukuFlash03/e-mission-server - run-id: ${{ env.RUN_ID }} - - - name: Print artifact tag - run: cat tag_file.txt - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: docker-image-tag - path: tag_file.txt - overwrite: true - - - name: List artifact - run: ls -R diff --git a/Dockerfile b/Dockerfile index f8b9eee..48516c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ # Please change once all PR changes are final, so it reads from shankari/e-mission-server # FROM shankari/e-mission-server:master_2024-02-10--19-38 -FROM mukuflash03/e-mission-server:image-push-merge_2024-04-16--49-36 +ARG DOCKER_IMAGE_TAG +FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 75f8df2..11c0980 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -5,6 +5,8 @@ services: build: context: . dockerfile: docker/Dockerfile + args: + DOCKER_IMAGE_TAG: '' image: e-mission/opdash:0.0.1 ports: - "8050:8050" diff --git a/docker-compose-prod-nginx.yml b/docker-compose-prod-nginx.yml index d4d6abf..684df78 100644 --- a/docker-compose-prod-nginx.yml +++ b/docker-compose-prod-nginx.yml @@ -6,6 +6,8 @@ services: build: context: . dockerfile: docker/Dockerfile + args: + DOCKER_IMAGE_TAG: '' image: e-mission/opdash:0.0.1 environment: DASH_DEBUG_MODE: "True" diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index 8b50892..c8b6754 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -5,6 +5,8 @@ services: build: context: . dockerfile: docker/Dockerfile + args: + DOCKER_IMAGE_TAG: '' image: e-mission/opdash:0.0.1 ports: - "8050:8050" diff --git a/docker/Dockerfile b/docker/Dockerfile index f8b9eee..48516c6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,7 @@ # Please change once all PR changes are final, so it reads from shankari/e-mission-server # FROM shankari/e-mission-server:master_2024-02-10--19-38 -FROM mukuflash03/e-mission-server:image-push-merge_2024-04-16--49-36 +ARG DOCKER_IMAGE_TAG +FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 From 11dd97bf32696b5b1f0fa7c95fd2a7f5a0dec85d Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Wed, 1 May 2024 06:10:24 -0700 Subject: [PATCH 03/23] Artifact + Matrix - 2 Was unable to see docker_image_tag in echo statement in logs. Added docker_image_tag print statement to see retrieved image tag. Ah! Was using run_id instead of docker_image_tag as the output value in outputs section in fetch_tag job. --- .github/workflows/image_build_push.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index b9d14fa..8676c8b 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -18,7 +18,6 @@ on: description: "Latest Docker image tags passed from e-mission-server repository on image build and push" required: true - # Env variable env: DOCKER_USER: ${{secrets.DOCKER_USER}} @@ -26,7 +25,6 @@ env: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - fetch_run_id: runs-on: ubuntu-latest @@ -56,7 +54,6 @@ jobs: id: get_run_id run: echo "run_id=${{ steps.run_script.outputs.run_id }}" >> "$GITHUB_OUTPUT" - fetch_tag: needs: fetch_run_id runs-on: ubuntu-latest @@ -65,7 +62,7 @@ jobs: RUN_ID: ${{ needs.fetch_run_id.outputs.run_id }} outputs: - docker_image_tag: ${{ steps.get_docker_tag.outputs.run_id }} + docker_image_tag: ${{ steps.get_docker_tag.outputs.docker_image_tag }} steps: - uses: actions/checkout@v4 @@ -84,10 +81,11 @@ jobs: - name: Print artifact tag id: get_docker_tag run: | + cat tag_file.txt docker_image_tag=$(cat tag_file.txt) + echo $docker_image_tag echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" - # - name: Upload Artifact # uses: actions/upload-artifact@v4 # with: @@ -112,12 +110,11 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Print input docker image tag run: | echo "Event name: ${{ github.event_name }}" - echo "Event name: ${{ github.event.action }}" echo "Latest docker image tag (push): ${{ env.DOCKER_IMAGE_TAG_1 }}" echo "Latest docker image tag (workflow_dispatch): ${{ env.DOCKER_IMAGE_TAG_2 }}" From ed3a505bf0b0dbc638a46d4f604f187477c205ab Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Wed, 1 May 2024 14:36:47 -0700 Subject: [PATCH 04/23] Artifact + Matrix - 3 Still not seeing the env vars echo-ed. Debugging by printing various log statements. --- .github/workflows/image_build_push.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index 8676c8b..ea0f593 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -84,7 +84,11 @@ jobs: cat tag_file.txt docker_image_tag=$(cat tag_file.txt) echo $docker_image_tag + # echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" + + - name: Check artifact tag in output + run: echo "${{ steps.get_docker_tag.outputs.docker_image_tag }}" # - name: Upload Artifact # uses: actions/upload-artifact@v4 @@ -115,6 +119,7 @@ jobs: - name: Print input docker image tag run: | echo "Event name: ${{ github.event_name }}" + echo "Tag: ${{ needs.fetch_tag.outputs.docker_image_tag }}" echo "Latest docker image tag (push): ${{ env.DOCKER_IMAGE_TAG_1 }}" echo "Latest docker image tag (workflow_dispatch): ${{ env.DOCKER_IMAGE_TAG_2 }}" From d66893b001309e6821b6112397e0333a179b4b68 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Wed, 1 May 2024 17:13:40 -0700 Subject: [PATCH 05/23] Artifact + Matrix - 4 Still not seeing the env vars echo-ed. Debugging by printing various log statements. --- .github/workflows/image_build_push.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index ea0f593..94dca23 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -85,7 +85,10 @@ jobs: docker_image_tag=$(cat tag_file.txt) echo $docker_image_tag # echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" + echo "Checking set-output value..." echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" + echo "Checking key=value..." + echo "docker_image_tag=$(echo $docker_image_tag)" >> $GITHUB_OUTPUT - name: Check artifact tag in output run: echo "${{ steps.get_docker_tag.outputs.docker_image_tag }}" From 39b289f28d57b3c42b59f916be29ba6a784640c7 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Wed, 1 May 2024 17:29:33 -0700 Subject: [PATCH 06/23] Artifact + Matrix - 5 Working finally! Changed the deprecated set-output command to use {key}={value} format with echo command. Also, adding commented out build and push commands to see if build, push is successful. For this commit, not changing branch = tags-artifact in fetch_runID.py Once, server code has latest working yml file, then will come back and push another commit to change branch to tags-combo-approach. --- .github/workflows/image_build_push.yml | 31 ++++++++++---------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index 94dca23..083a0d0 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -84,14 +84,7 @@ jobs: cat tag_file.txt docker_image_tag=$(cat tag_file.txt) echo $docker_image_tag - # echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" - echo "Checking set-output value..." - echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT" - echo "Checking key=value..." echo "docker_image_tag=$(echo $docker_image_tag)" >> $GITHUB_OUTPUT - - - name: Check artifact tag in output - run: echo "${{ steps.get_docker_tag.outputs.docker_image_tag }}" # - name: Upload Artifact # uses: actions/upload-artifact@v4 @@ -139,15 +132,15 @@ jobs: run: echo running in repo ${GITHUB_REPOSITORY#*/} branch ${GITHUB_REF##*/} on ${{ steps.date.outputs.date }} # Runs a set of commands using the runners shell - # - name: build docker image - # run: | - # if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then - # docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_2 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . - # else - # docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_1 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . - # fi - # docker images - - # - name: push docker image - # run: | - # docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} + - name: build docker image + run: | + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_2 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . + else + docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_1 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} . + fi + docker images + + - name: push docker image + run: | + docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} From 340d9d0474b6f567afbd3fce21c01c890b5a332b Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Wed, 1 May 2024 18:04:58 -0700 Subject: [PATCH 07/23] Artifact + Matrix - 6 Removed an extra echo statement. --- .github/workflows/image_build_push.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index 083a0d0..89134a0 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -115,7 +115,6 @@ jobs: - name: Print input docker image tag run: | echo "Event name: ${{ github.event_name }}" - echo "Tag: ${{ needs.fetch_tag.outputs.docker_image_tag }}" echo "Latest docker image tag (push): ${{ env.DOCKER_IMAGE_TAG_1 }}" echo "Latest docker image tag (workflow_dispatch): ${{ env.DOCKER_IMAGE_TAG_2 }}" From 15c9da147d879e84213124bbc6c17bba3f624f8b Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Wed, 1 May 2024 18:31:07 -0700 Subject: [PATCH 08/23] Artifact + Matrix - 7 Updating Dockerfiles to use ARG environment variable with latest timestamp that will be passed through: - `docker build --build-arg` command in Github actions in the workflow for automated pushing to Docker hub. - `args: ` config field in docker-compose which will need to be set manually by developers locally. Also, changing branch in fetch_runID and Dockerfiles to tags-combo-approach. --- .github/fetch_runID.py | 2 +- Dockerfile | 2 +- docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/fetch_runID.py b/.github/fetch_runID.py index c40005d..fee53c7 100644 --- a/.github/fetch_runID.py +++ b/.github/fetch_runID.py @@ -51,7 +51,7 @@ successful_runs = [run for run in workflow_runs \ if run["status"] == "completed" and \ run["conclusion"] == "success" and \ - run["head_branch"] == "tags-artifact" + run["head_branch"] == "tags-combo-approach" ] # print(successful_runs) if successful_runs: diff --git a/Dockerfile b/Dockerfile index 48516c6..4f344f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Please change once all PR changes are final, so it reads from shankari/e-mission-server # FROM shankari/e-mission-server:master_2024-02-10--19-38 ARG DOCKER_IMAGE_TAG -FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} +FROM mukuflash03/e-mission-server:tags-combo-approach_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 diff --git a/docker/Dockerfile b/docker/Dockerfile index 48516c6..4f344f7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ # Please change once all PR changes are final, so it reads from shankari/e-mission-server # FROM shankari/e-mission-server:master_2024-02-10--19-38 ARG DOCKER_IMAGE_TAG -FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} +FROM mukuflash03/e-mission-server:tags-combo-approach_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 From 0c78ad3af3c36771dae67fdcf15e7548a2fb78de Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Thu, 2 May 2024 04:35:18 -0700 Subject: [PATCH 09/23] Artifact + Matrix - 8 For public-dash, admin-dash where ARGS are now being used, need to add the args under build command in the docker compose files. Gives error if arg is at the same hierarchical level as build. Also, public-dash docker-compose.yml (non-dev) version changed to have build: context, dockerfile ; unlike only build: frontend. This allows adding args under build. Similar to how currently being built in docker-compose.dev.yml. Also, args to be added under notebook-server and not dashboard since viz_scripts builds off of server image and not frontend, which is a node image. --- docker-compose-dev.yml | 4 ++-- docker-compose-prod-nginx.yml | 4 ++-- docker-compose-prod.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 11c0980..f70da0d 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -5,8 +5,8 @@ services: build: context: . dockerfile: docker/Dockerfile - args: - DOCKER_IMAGE_TAG: '' + args: + DOCKER_IMAGE_TAG: '' image: e-mission/opdash:0.0.1 ports: - "8050:8050" diff --git a/docker-compose-prod-nginx.yml b/docker-compose-prod-nginx.yml index 684df78..0155331 100644 --- a/docker-compose-prod-nginx.yml +++ b/docker-compose-prod-nginx.yml @@ -6,8 +6,8 @@ services: build: context: . dockerfile: docker/Dockerfile - args: - DOCKER_IMAGE_TAG: '' + args: + DOCKER_IMAGE_TAG: '' image: e-mission/opdash:0.0.1 environment: DASH_DEBUG_MODE: "True" diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index c8b6754..705b565 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -5,8 +5,8 @@ services: build: context: . dockerfile: docker/Dockerfile - args: - DOCKER_IMAGE_TAG: '' + args: + DOCKER_IMAGE_TAG: '' image: e-mission/opdash:0.0.1 ports: - "8050:8050" From d03ce01665757a97576920db600c89c18d0b3f51 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Fri, 3 May 2024 02:47:31 -0700 Subject: [PATCH 10/23] Artifact + Matrix - 9 Adding .env file which stores only docker image timestamp for the latest dockerhub e-mission-server image already pushed. .env file overwritten in both types of trigger events - push and workflow_dispatch. Added commit and push github actions as well for pushing latest changes to the .env file made via the workflow. Lastly, docker-compose now also mentions the ENV variable name to be read from the .env file for the ARG value in the Dockerfile. No changes required in the Dockerfiles. --- .env | 1 + .github/workflows/image_build_push.yml | 18 ++++++++++++++++++ docker-compose-dev.yml | 2 +- docker-compose-prod-nginx.yml | 2 +- docker-compose-prod.yml | 2 +- 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..203f891 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +DOCKER_IMAGE_TAG=2024-05-02--16-40 \ No newline at end of file diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index 89134a0..8a2cb02 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -118,6 +118,24 @@ jobs: echo "Latest docker image tag (push): ${{ env.DOCKER_IMAGE_TAG_1 }}" echo "Latest docker image tag (workflow_dispatch): ${{ env.DOCKER_IMAGE_TAG_2 }}" + - name: Update .env file + run: | + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + echo "Workflow_dispatch: New server image built and pushed, Updating image tag in .env" + echo "DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_2" > .env + else + echo "Push event: Restoring latest server image tag in .env" + echo "DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_1" > .env + fi + + - name: Add, Commit, Push changes to .env file + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add .env + git commit -m "Updated docker image tag in .env to the latest timestamp: ${{ env.DOCKER_IMAGE_TAG_2 }}" + git push origin + - name: docker login run: | # log into docker hub account docker login -u $DOCKER_USER -p $DOCKER_PASSWORD diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index f70da0d..742c8a8 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: docker/Dockerfile args: - DOCKER_IMAGE_TAG: '' + DOCKER_IMAGE_TAG: ${DOCKER_IMAGE_TAG} image: e-mission/opdash:0.0.1 ports: - "8050:8050" diff --git a/docker-compose-prod-nginx.yml b/docker-compose-prod-nginx.yml index 0155331..5626fce 100644 --- a/docker-compose-prod-nginx.yml +++ b/docker-compose-prod-nginx.yml @@ -7,7 +7,7 @@ services: context: . dockerfile: docker/Dockerfile args: - DOCKER_IMAGE_TAG: '' + DOCKER_IMAGE_TAG: ${DOCKER_IMAGE_TAG} image: e-mission/opdash:0.0.1 environment: DASH_DEBUG_MODE: "True" diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index 705b565..05a9579 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: docker/Dockerfile args: - DOCKER_IMAGE_TAG: '' + DOCKER_IMAGE_TAG: ${DOCKER_IMAGE_TAG} image: e-mission/opdash:0.0.1 ports: - "8050:8050" From a2eca046662a431d078e8d9a507acfb2a1d9f1c3 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 09:48:29 +0000 Subject: [PATCH 11/23] Updated docker image tag in .env to the latest timestamp: --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 203f891..881e743 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DOCKER_IMAGE_TAG=2024-05-02--16-40 \ No newline at end of file +DOCKER_IMAGE_TAG=2024-05-02--16-40 From 3b8f312a748c3424573b7a006fd07efaf81e5856 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 10:18:23 +0000 Subject: [PATCH 12/23] Updated docker image tag in .env to the latest timestamp: 2024-05-03--14-37 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 881e743..03219ee 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DOCKER_IMAGE_TAG=2024-05-02--16-40 +DOCKER_IMAGE_TAG=2024-05-03--14-37 From 352c8ae3293cdc1adcecbd3053e804cf1f3f04e4 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Fri, 3 May 2024 03:36:34 -0700 Subject: [PATCH 13/23] Added TODOs in github actions workflow YAML file. Reminder for things to change as per master branch of e-mission-server once changes are finalized. --- .github/fetch_runID.py | 2 ++ .github/workflows/image_build_push.yml | 3 ++- Dockerfile | 2 +- docker/Dockerfile | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/fetch_runID.py b/.github/fetch_runID.py index fee53c7..56ddf03 100644 --- a/.github/fetch_runID.py +++ b/.github/fetch_runID.py @@ -35,6 +35,7 @@ For e-mission-server: id = 35580278 ''' download_url = "https://api.github.com/repos/MukuFlash03/e-mission-server/actions/workflows/75506902/runs" + # TODO: Comment the above line and Uncomment the below line representing the original emission repo # download_url = "https://api.github.com/repos/e-mission/e-mission-server/actions/workflows/35580278/runs" logging.debug("About to fetch workflow runs present in docker image workflow present in e-mission-server from %s" % download_url) r = requests.get(download_url) @@ -48,6 +49,7 @@ workflow_runs = workflow_runs_json["workflow_runs"] if workflow_runs: + # TODO: Change the head_branch name which identifies only e-mission-server runs triggered by this branch successful_runs = [run for run in workflow_runs \ if run["status"] == "completed" and \ run["conclusion"] == "success" and \ diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index 8a2cb02..fa584c6 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -74,6 +74,7 @@ jobs: uses: actions/download-artifact@v4 with: name: docker-image-tag + # TODO: Create a token with basic repo permissions github-token: ${{ secrets.GH_PAT_TAG }} repository: MukuFlash03/e-mission-server run-id: ${{ env.RUN_ID }} @@ -133,7 +134,7 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add .env - git commit -m "Updated docker image tag in .env to the latest timestamp: ${{ env.DOCKER_IMAGE_TAG_2 }}" + git commit -m "Updated docker image tag in .env to the latest timestamp" git push origin - name: docker login diff --git a/Dockerfile b/Dockerfile index 4f344f7..003fe0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Please change once all PR changes are final, so it reads from shankari/e-mission-server +# TODO: Please change once all PR changes are final, so it reads from shankari/e-mission-server # FROM shankari/e-mission-server:master_2024-02-10--19-38 ARG DOCKER_IMAGE_TAG FROM mukuflash03/e-mission-server:tags-combo-approach_${DOCKER_IMAGE_TAG} diff --git a/docker/Dockerfile b/docker/Dockerfile index 4f344f7..003fe0e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -# Please change once all PR changes are final, so it reads from shankari/e-mission-server +# TODO: Please change once all PR changes are final, so it reads from shankari/e-mission-server # FROM shankari/e-mission-server:master_2024-02-10--19-38 ARG DOCKER_IMAGE_TAG FROM mukuflash03/e-mission-server:tags-combo-approach_${DOCKER_IMAGE_TAG} From d98f75c8ba36a8b69c547f30e8840b6af773c7a5 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Fri, 3 May 2024 13:07:19 -0700 Subject: [PATCH 14/23] Artifact + Matrix - 10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added another TODO. evious Push event triggers run failed Error occurred in GitHub actions git add, commit, push step. If file with no changes operated upon, it leaves an error: “nothing to commit, working tree clean Error: Process completed with exit code 1.” Need to fix. —— Quick fix is to make changes to .env file only if workflow_dispatch event is the trigger. Don’t do anything for push event. So, in case anyone modifies .env file on their own by using their own timestamp during testing, and pushes it as a part of their PR, then Shankari will have to ask them to revert the changes. Else, their custom timestamp will make it to the repo code base. Found something: https://www.reddit.com/r/github/comments/ju3ipr/commit_from_github_action_only_when_changes_exist/ It should work but there’s a drawback of using “exit 0” - it will mask all errors generated during “git commit”. This is bad and we won’t be able to see the reason why something wrong happened as the workflow would be shown as successful with a green tick. Found a solution with git diff: https://github.com/simonw/til/blob/main/github-actions/commit-if-file-changed.md $ git diff --quiet || (git add README.md && git commit -m "Updated README") However, I won’t be able to log any message saying that no changes to commit, tag not modified. Hence, will possibly use just “git diff —quiet” with an if-else block. Expected results: - Push event triggers workflow. - It writes DOCKER_IMAGE_TAG_1 fetched from last successful completed run to .env file. - It sees that there is a difference in the latest committed .env file in the dashboard repo which includes older timestamp. - Hence it runs git commit part of the script to reset to latest server timestamp. --- .env | 2 +- .github/workflows/image_build_push.yml | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 03219ee..881e743 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DOCKER_IMAGE_TAG=2024-05-03--14-37 +DOCKER_IMAGE_TAG=2024-05-02--16-40 diff --git a/.github/workflows/image_build_push.yml b/.github/workflows/image_build_push.yml index fa584c6..1f4e446 100644 --- a/.github/workflows/image_build_push.yml +++ b/.github/workflows/image_build_push.yml @@ -75,6 +75,7 @@ jobs: with: name: docker-image-tag # TODO: Create a token with basic repo permissions + # TODO: Change user / organization to emission instead of MukuFlash03 github-token: ${{ secrets.GH_PAT_TAG }} repository: MukuFlash03/e-mission-server run-id: ${{ env.RUN_ID }} @@ -133,9 +134,13 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add .env - git commit -m "Updated docker image tag in .env to the latest timestamp" - git push origin + if git diff --quiet; then + echo "Latest timestamp already present in .env file, no changes to commit" + else + git add .env + git commit -m "Updated docker image tag in .env file to the latest timestamp" + git push origin + fi - name: docker login run: | # log into docker hub account From f1ea34cf34f4b5a8756b9500eb16d6b2a1a923fe Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 20:08:01 +0000 Subject: [PATCH 15/23] Updated docker image tag in .env file to the latest timestamp --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 881e743..03219ee 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DOCKER_IMAGE_TAG=2024-05-02--16-40 +DOCKER_IMAGE_TAG=2024-05-03--14-37 From 629831f6c1ef1deeca9c476051aa5ef3212cb830 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 May 2024 20:45:38 +0000 Subject: [PATCH 16/23] Updated docker image tag in .env file to the latest timestamp --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 03219ee..8a84419 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DOCKER_IMAGE_TAG=2024-05-03--14-37 +DOCKER_IMAGE_TAG=2024-05-03--42-05 From 5e0de4b5f6869b83eafc94e76b915706fdafce45 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 6 May 2024 22:04:16 +0000 Subject: [PATCH 17/23] Updated docker image tag in .env file to the latest timestamp --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 8a84419..ac9b1b4 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DOCKER_IMAGE_TAG=2024-05-03--42-05 +DOCKER_IMAGE_TAG=2024-05-06--00-31 From 791b6d964ed922bdc95cd91f32fe4c347d11cefc Mon Sep 17 00:00:00 2001 From: Natalie Schultz <90212258+nataliejschultz@users.noreply.github.com> Date: Mon, 6 May 2024 17:13:39 -0600 Subject: [PATCH 18/23] Update Dockerfile Reverting the Dockerfile tag for testing so that checks can run properly --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fe0736e..e659200 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ ARG DOCKER_IMAGE_TAG - -FROM shankari/e-mission-server:master_${DOCKER_IMAGE_TAG} +# Please change once all PR changes are final, so it reads from shankari/e-mission-server + # FROM shankari/e-mission-server:master_2024-02-10--19-38 + FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 From 4a90d2ba4b3188a0219fc54952dca2ef2da41194 Mon Sep 17 00:00:00 2001 From: Natalie Schultz <90212258+nataliejschultz@users.noreply.github.com> Date: Mon, 6 May 2024 17:14:12 -0600 Subject: [PATCH 19/23] Syntax Removing a space. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e659200..e57cadf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG DOCKER_IMAGE_TAG # Please change once all PR changes are final, so it reads from shankari/e-mission-server - # FROM shankari/e-mission-server:master_2024-02-10--19-38 - FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} +# FROM shankari/e-mission-server:master_2024-02-10--19-38 +FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 From 53dddcf52eae5a59f89a448bd60b3d5c9ab2fce7 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 6 May 2024 23:14:49 +0000 Subject: [PATCH 20/23] Updated docker image tag in .env file to the latest timestamp --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index ac9b1b4..8a84419 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -DOCKER_IMAGE_TAG=2024-05-06--00-31 +DOCKER_IMAGE_TAG=2024-05-03--42-05 From e56b1e1570adb0a4c328924d5706cef4c6d0eb47 Mon Sep 17 00:00:00 2001 From: Natalie Schultz <90212258+nataliejschultz@users.noreply.github.com> Date: Tue, 7 May 2024 09:14:36 -0600 Subject: [PATCH 21/23] Update Dockerfile again Also editing this file so that checks pass for now --- docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index fe0736e..2628e36 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,8 @@ ARG DOCKER_IMAGE_TAG -FROM shankari/e-mission-server:master_${DOCKER_IMAGE_TAG} +# Please change once all PR changes are final, so it reads from shankari/e-mission-server +# FROM shankari/e-mission-server:master_2024-02-10--19-38 +FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 From 980877f366d34cd8b36173d06871c47ab058a34e Mon Sep 17 00:00:00 2001 From: Natalie Schultz <90212258+nataliejschultz@users.noreply.github.com> Date: Tue, 7 May 2024 14:37:06 -0600 Subject: [PATCH 22/23] Finalize Dockerfiile Changing this to build from actual e-mission server in hopes of merging! --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e57cadf..fe0736e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ ARG DOCKER_IMAGE_TAG -# Please change once all PR changes are final, so it reads from shankari/e-mission-server -# FROM shankari/e-mission-server:master_2024-02-10--19-38 -FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} + +FROM shankari/e-mission-server:master_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050 From f1fd42c6330d03fc5161c834067d272d8679ba5f Mon Sep 17 00:00:00 2001 From: Natalie Schultz <90212258+nataliejschultz@users.noreply.github.com> Date: Tue, 7 May 2024 14:38:10 -0600 Subject: [PATCH 23/23] Update Dockerfile in docker folder Potentially finalizing the dockerfile in the docker repo. --- docker/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 2628e36..fe0736e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,6 @@ ARG DOCKER_IMAGE_TAG -# Please change once all PR changes are final, so it reads from shankari/e-mission-server -# FROM shankari/e-mission-server:master_2024-02-10--19-38 -FROM mukuflash03/e-mission-server:image-push-merge_${DOCKER_IMAGE_TAG} +FROM shankari/e-mission-server:master_${DOCKER_IMAGE_TAG} ENV DASH_DEBUG_MODE True ENV SERVER_PORT 8050