Skip to content

Commit

Permalink
Issue #117 eliminate "ENV" for app configuration in Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Sep 20, 2023
1 parent 135743e commit 2ed0896
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pythonPipeline {
docker_deploy = true
dev_hosts = 'docker-services-dev-01.vgt.vito.be'
prod_hosts = 'docker-services-prod-01.vgt.vito.be'
docker_run_options_dev = ['-e ENV=dev', '-p 8081:8080']
docker_run_options_prod = ['-e ENV=prod', '-p 8081:8080']
docker_run_options_dev = ['-e OPENEO_AGGREGATOR_CONFIG=/home/openeo/aggregator/conf/aggregator.dev.py', '-p 8081:8080']
docker_run_options_prod = ['-e OPENEO_AGGREGATOR_CONFIG=/home/openeo/aggregator/conf/aggregator.prod.py', '-p 8081:8080']
pep440 = true
notification_channel = 'openeo-devs'
extra_env_variables = [
Expand Down
2 changes: 1 addition & 1 deletion src/openeo_aggregator/about.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.10.0a1"
__version__ = "0.10.1a1"
3 changes: 3 additions & 0 deletions src/openeo_aggregator/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
_log = logging.getLogger(__name__)

OPENEO_AGGREGATOR_CONFIG = "OPENEO_AGGREGATOR_CONFIG"

# TODO: #117 eliminate this (too simple) config handle
ENVIRONMENT_INDICATOR = "ENV"

CACHE_TTL_DEFAULT = 6 * 60 * 60
Expand Down Expand Up @@ -91,6 +93,7 @@ def get_config(x: Any = None) -> AggregatorConfig:
- if it is already an `AggregatorConfig` object: return as is
- if it is a string: try to parse it as JSON (file)
"""
# TODO #117 simplify this logic: just support direct file references, iso "aggregator.$ENV.py"

if x is None:
for env_var in [OPENEO_AGGREGATOR_CONFIG, ENVIRONMENT_INDICATOR]:
Expand Down

0 comments on commit 2ed0896

Please sign in to comment.