コード例 #1
0
  def __init__(self, bindings, agent=None):
    super(BakeAndDeployTestScenario, self).__init__(bindings, agent)
    self.logger = logging.getLogger(__name__)

    bindings = self.bindings

    # We'll call out the app name because it is widely used
    # because it scopes the context of our activities.
    self.TEST_APP = bindings['TEST_APP']

    self.__short_lb_name = 'lb'
    self.__full_lb_name = '{app}-{stack}-{detail}'.format(
            app=self.TEST_APP, stack=bindings['TEST_STACK'],
            detail=self.__short_lb_name)
    self.aws_pipeline_id = None
    self.google_pipeline_id = None
    self.docker_pipeline_id = None
    self.test_google = bindings['TEST_GOOGLE']
    self.test_aws = bindings['TEST_AWS']
    self.jenkins_agent = sk.JenkinsAgent(bindings['JENKINS_URL'],
        bindings['JENKINS_AUTH_PATH'], self.agent)
    self.run_tests = True

    if not (self.test_google or self.test_aws):
      self.run_tests = False
      self.logger.warning(
          'Neither --test_google nor --test_aws were set. '
          'No tests will be run.')
コード例 #2
0
    def __init__(self, bindings, agent=None):
        super(BakeAndDeployTestScenario, self).__init__(bindings, agent)
        self.logger = logging.getLogger(__name__)

        bindings = self.bindings

        # We'll call out the app name because it is widely used
        # because it scopes the context of our activities.
        self.TEST_APP = bindings['TEST_APP']

        self.__short_lb_name = 'lb'
        self.__full_lb_name = '{app}-{stack}-{detail}'.format(
            app=self.TEST_APP,
            stack=bindings['TEST_STACK'],
            detail=self.__short_lb_name)
        self.aws_bake_pipeline_id = None
        self.aws_destroy_pipeline_id = None
        self.google_bake_pipeline_id = None
        self.google_destroy_pipeline_id = None
        self.__image_id_to_delete = None  # Id of the baked image we need to clean up after the B & D pipelines run.
        self.docker_pipeline_id = None
        self.test_google = bindings['TEST_GOOGLE']
        self.test_aws = bindings['TEST_AWS']
        # This test has been exceeding the default timeout of 13 minutes for the Jenkins agent,
        # so increase the timeout to 20 minutes.
        self.jenkins_agent = sk.JenkinsAgent(bindings['JENKINS_URL'],
                                             bindings['JENKINS_AUTH_PATH'],
                                             self.agent, None, 1200)
        self.run_tests = True

        if not (self.test_google or self.test_aws):
            self.run_tests = False
            self.logger.warning(
                'Neither --test_google nor --test_aws were set. '
                'No tests will be run.')