def run(self): recipe = Recipe.builder().ingredients( YmlReader(self.args["recipe"]).read()).image( self.args["image_name"]).build() env = EnvironmentParser(self.args["target"]).name() WriteToLogCommandRegularDeploy( self.mongo_connector, recipe, env, DeployProcess(self.args, self.connector, recipe)).run()
def run(self): recipes = ProtectedRollbackProxy(self.mongo_connector, self.from_env).get_all_recipes() for recipe in recipes: r = Recipe.builder().ingredients(recipe).build() WriteToLogCommandRegularDeploy( self.mongo_connector, r, self.to_env, DeployProcess(self.args, self.connector, r)).run()
def run(self): logger.info("going to rollback target = %s, service_name = %s" % (self.target, self.service_name)) env = EnvironmentParser(self.args["target"]).name() mongo_repository = ProtectedRollbackProxy(self.mongo_connector, env, self.service_name) recipe = Recipe.builder().ingredients( mongo_repository.get_previous_recipe()).build() WriteToLogCommandRollback( self.mongo_connector, env, self.service_name, DeployProcess(self.args, self.connector, recipe)).run()