def setUp(self): self.host = "test-cd-host-" + commons.gen_random_num() self.envName = "test-cd-env-" + commons.gen_random_num() self.env_canary = commons.create_env(self.envName, CANARY) self.env_prod = commons.create_env(self.envName, PROD) self.commit = commons.gen_random_num(32) self.build = commons.publish_build(self.envName, commit=self.commit)
def setUp(self): commons.create_env(envName, stageName) environs_helper.update_env_capacity(commons.REQUEST, envName, stageName, data=[group]) environs_helper.update_env_basic_config(commons.REQUEST, envName, stageName, {"maxParallel": 5}) environs_helper.update_env_script_config(commons.REQUEST, envName, stageName, {"s-c-n": "s-c-v"}) environs_helper.update_env_agent_config(commons.REQUEST, envName, stageName, {"a-c-n": "a-c-v"}) self.build = commons.publish_build("ping-test", "master", commit=commit) self.deploy = deploys_helper.deploy(commons.REQUEST, envName, stageName, self.build['id'])
def main(): for x in xrange(2): name = "sample-service-%d" % x stage = "canary" commons.create_env(name, stage) hosts = ["sample-host1", "sample-host2"] environs_helper.update_env_capacity(commons.REQUEST, name, stage, capacity_type="HOST", data=hosts) stage = "prod" commons.create_env(name, stage) groups = ["sample-group1", "sample-group2"] environs_helper.update_env_capacity(commons.REQUEST, name, stage, data=groups)
def setUp(self): self.envName = "ping-test-env-" + commons.gen_random_num() self.commit = commons.gen_random_num(32) self.host = "ping-test-host-" + commons.gen_random_num() self.group = "ping-test-group-" + commons.gen_random_num() self.groups = [self.group] self.env = commons.create_env(self.envName, stageName) environs_helper.update_env_capacity(commons.REQUEST, self.envName, stageName, data=self.groups) environs_helper.update_env_basic_config(commons.REQUEST, self.envName, stageName, {"maxParallel": 5}) environs_helper.update_env_script_config(commons.REQUEST, self.envName, stageName, {"s-c-n": "s-c-v"}) environs_helper.update_env_agent_config(commons.REQUEST, self.envName, stageName, {"a-c-n": "a-c-v"}) self.build = commons.publish_build("ping-test", "master", commit=self.commit) self.deploy = deploys_helper.deploy(commons.REQUEST, self.envName, stageName, self.build['id'])