Skip to content

Commit

Permalink
Task A-8: Prefix branch name + Task A-7: Removed certificates from ex…
Browse files Browse the repository at this point in the history
…ternal

Task A-8: Prefixing branch name to the docker tag along with the date.
In the internal script we will not need to maintain the different branch lists as the images will be completely tagged in the external workflows themselves.
We can simply use the tags without modifications then.

For now, not prefixing the tag to the artifact since we will be removing the artifact anyways.
And current internal script works with artifacts.
Once I update the internal script, will come back and remove artifacts.
Also removing prefixed branch name from frontend image artifact in case of workflow dispatch event since it uses the existing frontend image tag generated during push event which already has prefixed branch name

In Dockerfile, removing hardcoded branch name, since in this change, we are already included the branch name in image tag.

----------

Task A-7: Certifcates added to internal Dockerfiles.

Refer to issue comment for details:
Task A-7: e-mission/e-mission-docs#1082 (comment)

The certificates are relevant to our internal AWS configuration and not needed externally.
They can be present externally too without having any major effect.
But removing them helps keeping the base image clean.
Additionally, anyone working with the code can customize with their own certificates if needed or adopt an approach which doesn't even need certificates in the first place.
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Sep 21, 2024
1 parent 1446a3a commit 2c7460e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ env:
jobs:
build:
runs-on: ubuntu-latest

env:
DOCKER_TAG_FROM_WORKFLOW_DISPATCH: ${{ github.event.inputs.docker_image_tag }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -73,13 +70,13 @@ jobs:
- name: Update .env file
run: |
echo "PUBLIC_DASH_NOTEBOOK_IMAGE_TAG=${{ steps.date.outputs.date }}" > .env
echo "PUBLIC_DASH_NOTEBOOK_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.date.outputs.date }}" > .env
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "Workflow_dispatch: Reuse existing frontend image tag"
echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${{ steps.set-tags.outputs.PUBLIC_DASH_FRONTEND_IMAGE_TAG }}" >> .env
else
echo "Push event: Update frontend image tag"
echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${{ steps.date.outputs.date }}" >> .env
echo "PUBLIC_DASH_FRONTEND_IMAGE_TAG=${GITHUB_REF##*/}_${{ steps.date.outputs.date }}" >> .env
fi
echo "SERVER_IMAGE_TAG=${{ steps.get-server-tag.outputs.SERVER_IMAGE_TAG }}" >> .env
Expand All @@ -100,7 +97,7 @@ jobs:
if [ "${{ github.event_name }}" == "push" ]; then
echo ${{ steps.date.outputs.date }} > frontend_tag_file.txt
else
echo ${{ steps.set-tags.outputs.PUBLIC_DASH_FRONTEND_IMAGE_TAG }} > frontend_tag_file.txt
echo ${{ steps.set-tags.outputs.PUBLIC_DASH_FRONTEND_IMAGE_TAG }} | cut -d'_' -f2 > frontend_tag_file.txt
fi
echo ${{ steps.date.outputs.date }} > notebook_tag_file.txt
echo "Created tag text files"
Expand Down
4 changes: 1 addition & 3 deletions viz_scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# python 3
ARG SERVER_IMAGE_TAG
FROM shankari/e-mission-server:master_${SERVER_IMAGE_TAG}

ADD https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem /etc/ssl/certs/
FROM shankari/e-mission-server:${SERVER_IMAGE_TAG}

VOLUME /plots

Expand Down

0 comments on commit 2c7460e

Please sign in to comment.