Skip to content

Commit

Permalink
use dcicutils to determine staging
Browse files Browse the repository at this point in the history
  • Loading branch information
willronchetti committed May 26, 2020
1 parent c5253c8 commit b05f52f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 27 deletions.
12 changes: 4 additions & 8 deletions chalicelib/checks/deployment_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
from ..run_result import CheckResult, ActionResult
from ..utils import check_function, action_function
from dcicutils.deployment_utils import EBDeployer
from dcicutils.beanstalk_utils import compute_ff_stg_env
from dcicutils.env_utils import (
FF_ENV_INDEXER, CGAP_ENV_INDEXER, is_fourfront_env, is_cgap_env,
FF_ENV_PRODUCTION_BLUE, FF_ENV_PRODUCTION_GREEN

)
from dcicutils.beanstalk_utils import compute_ff_prd_env
from dcicutils.beanstalk_utils import beanstalk_info, is_indexing_finished
Expand Down Expand Up @@ -195,16 +196,11 @@ def deploy_application_to_beanstalk(connection, **kwargs):
return check


def who_is_ff_staging():
""" Helper function that tells us who staging is. This should probably go in dcicutils. -Will """
return ({FF_ENV_PRODUCTION_BLUE, FF_ENV_PRODUCTION_GREEN} - {compute_ff_prd_env()}).pop()


@check_function()
def deploy_ff_staging(connection, **kwargs):
""" Deploys Fourfront master to whoever staging is.
Runs as part of the 'deployment_checks' schedule on data ONLY.
"""
return deploy_application_to_beanstalk(connection,
env=who_is_ff_staging(),
branch='master')
env=compute_ff_stg_env(),
branch='master')
34 changes: 17 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "foursight"
version = "0.11.2"
version = "0.11.3"
description = "Serverless Chalice Application for Monitoring"
authors = ["4DN Team <william_ronchetti@hms.harvard.edu>"]
license = "MIT"
Expand All @@ -10,7 +10,7 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.6,<3.7"
dcicutils = "^0.28.2"
dcicutils = "^0.31.1"
click = "6.7"
PyJWT = "1.5.3"
Jinja2 = "2.10.1"
Expand Down

0 comments on commit b05f52f

Please sign in to comment.