-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a mechanism to fail the CD when required environment variables are missing | issue#257 #274
base: develop
Are you sure you want to change the base?
Create a mechanism to fail the CD when required environment variables are missing | issue#257 #274
Conversation
environment-variables.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need this file, .env file is not enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially i tried by hardcoding the environment variables in the bash script along with "if" conditional blocks for each env var. To use while loop I stored them in a file, bash script iterates through each env var and checks if they are set.
.env file is used for local setup as per guidelines in contributing.MD file link.
So I used a different file.
We can add a .env file as well, but that will be confusing during local setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed that file , instead added one env var to store all the actual env var names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment added
Date: 13-10-2024
Developer Name: Saitharun Burra
Issue Ticket Number
Description
Added a job called
Environment-Variables-Check
to the Register and deploy Slash Commands Github Action. This jobs runs first in sequence to check whether the required environment variables have been configured or not. Fails the workflow incase any of the required environment variables are not configured.Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Attached 2 videos 1st one contains happy path test for environment variable check when all the required env var are set. This was tested in staging environment with all the required environment variables in the file configured. And the other one displays error logs when the required env var are not set. This was tested in production environment with none of the environment variables set.
Note: All the tests have been conducted in the forked repo.
Screen.Recording.2024-10-13.at.11.40.32.PM.mov
Screen.Recording.2024-10-13.at.11.41.15.PM.mov
Test Coverage
Screenshot 1
Additional Notes
design doc
https://docs.google.com/document/d/1qwCHNbsCONjSTtOkF6wqNdJ4kwkgI11gwbQ_xdPK_m0/edit?pli=1&tab=t.0