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

Rename stage type env var #1349

Merged
merged 2 commits into from
Nov 27, 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
10 changes: 5 additions & 5 deletions deploy-agent/deployd/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down 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_STAGE_TYPE'] = deploy_status.report.stageType
self._environ['COMPUTE_ENV_TYPE'] = deploy_status.report.stageType
osoriano marked this conversation as resolved.
Show resolved Hide resolved
if deploy_status.first_deploy:
self._environ['FIRST_DEPLOY'] = str(deploy_status.first_deploy)
if deploy_status.is_docker:
Expand Down Expand Up @@ -246,7 +246,7 @@ def get_puppet_exit_code_file_path(self):

def get_daemon_sleep_time(self):
return self.get_intvar("daemon_sleep_time", 30)

def get_init_sleep_time(self):
return self.get_intvar("init_sleep_time", 50)

Expand All @@ -269,7 +269,7 @@ def get_facter_name_key(self):

def get_facter_group_key(self):
return self.get_var('agent_group_key', None)

def get_verify_https_certificate(self):
return self.get_var('verify_https_certificate', 'False')

Expand Down
6 changes: 3 additions & 3 deletions deploy-agent/tests/unit/deploy/common/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down 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_STAGE_TYPE'], 'DEFAULT')
self.assertEqual(os.environ['COMPUTE_ENV_TYPE'], 'DEFAULT')
self.assertEqual(self.config.get_target(), '/tmp/pinboard')


Expand Down
4 changes: 2 additions & 2 deletions deploy-sentinel/teletraan/POST_RESTART
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ echo Running POST_RESTART script.
# Environment Variable defined in DeployBoard Script Config
echo $PORT

# Built in Environment Variables
# Built in Environment Variables
echo $ENV_NAME
echo $STAGE_NAME
echo $COMPUTE_STAGE_TYPE
echo $COMPUTE_ENV_TYPE
echo $DEPLOY_ID
echo $DEPLOY_STEP
echo $OPCODE
Expand Down
Loading