Skip to content
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

set envirornment variable as PRODUCTION if the stage type is DEFAULT #1380

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy-agent/deployd/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def update_variables(self, deploy_status):
if deploy_status.report.stageName:
self._environ['STAGE_NAME'] = deploy_status.report.stageName
if deploy_status.report.stageType:
self._environ['COMPUTE_ENV_TYPE'] = deploy_status.report.stageType
self._environ['COMPUTE_ENV_TYPE'] = "PRODUCTION" if deploy_status.report.stageType == "DEFAULT" else deploy_status.report.stageType
if deploy_status.first_deploy:
self._environ['FIRST_DEPLOY'] = str(deploy_status.first_deploy)
if deploy_status.is_docker:
Expand Down
2 changes: 1 addition & 1 deletion deploy-agent/tests/unit/deploy/common/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_get_target(self):
self.assertEqual(os.environ['DEPLOY_ID'], '123')
self.assertEqual(os.environ['ENV_NAME'], 'pinboard')
self.assertEqual(os.environ['STAGE_NAME'], 'beta')
self.assertEqual(os.environ['COMPUTE_ENV_TYPE'], 'DEFAULT')
self.assertEqual(os.environ['COMPUTE_ENV_TYPE'], 'PRODUCTION')
self.assertEqual(self.config.get_target(), '/tmp/pinboard')

def test_init(self):
Expand Down
Loading