Skip to content

Commit

Permalink
Update CC and observer versions (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: mykhailo_hunko <[email protected]>
  • Loading branch information
hunkom and mykhailo_hunko authored Nov 3, 2020
1 parent 7cb70e4 commit e62e8c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion galloper/api/ui_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from galloper.database.models.project import Project
from galloper.database.models.statistic import Statistic
from galloper.utils.api_utils import build_req_parser, str2bool
from galloper.constants import CURRENT_RELEASE


class UITestsApiPerformance(Resource):
Expand Down Expand Up @@ -68,7 +69,7 @@ def post(self, project_id: int):
project = Project.get_or_404(project_id)

browser = args["browser"]
runner = "getcarrier/observer:latest"
runner = f"getcarrier/observer:{CURRENT_RELEASE}"
job_type = "observer"

if args.get("git"):
Expand Down
8 changes: 4 additions & 4 deletions galloper/database/models/performance_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from galloper.database.db_manager import Base
from galloper.database.abstract_base import AbstractBaseMixin
from galloper.dal.vault import unsecret
from galloper.constants import JOB_CONTAINER_MAPPING
from galloper.constants import JOB_CONTAINER_MAPPING, CURRENT_RELEASE


class PerformanceTests(AbstractBaseMixin, Base):
Expand Down Expand Up @@ -193,9 +193,9 @@ def configure_execution_json(self, output='cc', test_type=None, params=None, env
return execution_json
else:
return "docker run -e project_id=%s -e galloper_url=%s -e token=%s" \
" getcarrier/control_tower:latest --test_id=%s" \
" getcarrier/control_tower:%s --test_id=%s" \
"" % (self.project_id, unsecret("{{secret.galloper_url}}", project_id=self.project_id),
unsecret("{{secret.auth_token}}", project_id=self.project_id), self.test_uid)
unsecret("{{secret.auth_token}}", project_id=self.project_id), CURRENT_RELEASE, self.test_uid)

def to_json(self, exclude_fields: tuple = ()) -> dict:
test_param = super().to_json()
Expand Down Expand Up @@ -299,5 +299,5 @@ def configure_execution_json(self, output='cc', browser=None, test_type=None, pa
return f'docker run -t --rm -e project_id={self.project_id} ' \
f'-e galloper_url={unsecret("{{secret.galloper_url}}", project_id=self.project_id)} ' \
f"-e token=\"{unsecret('{{secret.auth_token}}', project_id=self.project_id)}\" " \
f'getcarrier/control_tower:latest ' \
f'getcarrier/control_tower:{CURRENT_RELEASE} ' \
f'--test_id {self.test_uid}'
4 changes: 2 additions & 2 deletions galloper/database/models/security_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def configure_execution_json(self, output="cc", execution=False, thresholds={}):
f"-e project_id={self.project_id} " \
f"-e galloper_url={unsecret('{{secret.galloper_url}}', project_id=self.project_id)} " \
f"-e token=\"{unsecret('{{secret.auth_token}}', project_id=self.project_id)}\" " \
f"getcarrier/control_tower:latest " \
f"getcarrier/control_tower:{CURRENT_RELEASE} " \
f"-tid {self.test_uid}"
if output == "cc":
execution_json = {
Expand Down Expand Up @@ -460,7 +460,7 @@ def configure_execution_json(self, output="cc", execution=False, thresholds={}):
f"-e project_id={self.project_id} " \
f"-e galloper_url={unsecret('{{secret.galloper_url}}', project_id=self.project_id)} " \
f"-e token=\"{unsecret('{{secret.auth_token}}', project_id=self.project_id)}\" " \
f"getcarrier/control_tower:latest " \
f"getcarrier/control_tower:{CURRENT_RELEASE} " \
f"-tid {self.test_uid}"
if output == "cc":
execution_json = {
Expand Down

0 comments on commit e62e8c0

Please sign in to comment.