Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Return BoolOpAnd CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad attr Str Dict Assign NameStore Call AttributeLoad NameLoad attr Str Dict Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Raise Return NameLoad decorator_list decorator_list
N/A N/A 
Copyright (c) 2015 Red Hat, Inc
All rights reserved.

This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
 __future__ unicode_literals N/A json N/A os osbs.api OSBS osbs.conf Configuration osbs.exceptions OsbsResponseException atomic_reactor.plugin PreBuildPlugin atomic_reactor.util get_build_json is_rebuild N/A N/A workflow N/A N/A N/A N/A N/A N/A CheckAndSetRebuildPlugin key N/A workflow prebuild_results N/A N/A workflow prebuild_results N/A N/A CheckAndSetRebuildPlugin key N/A CheckAndSetRebuildPlugin N/A PreBuildPlugin N/A N/A 
    Determine whether this is an automated rebuild

    This plugin checks for a specific label in the OSv3 Build
    metadata. If it exists and has the value specified in the
    configuration, this build is a rebuild. The module-level function
    'is_rebuild()' can be used by other plugins to determine this.

    After checking for the label, it sets the label in the
    metadata, allowing future automated rebuilds to be detected as
    rebuilds.

    Example configuration:

    {
      "name": "check_and_set_rebuild",
      "args": {
        "label_key": "rebuild",
        "label_value": "true",
        "url": "https://localhost:8443/"
      }
    }

     N/A key check_and_set_rebuild N/A is_allowed_to_fail False __init__ N/A N/A self tasker workflow label_key label_value url verify_ssl use_auth N/A True True N/A N/A 
        constructor

        :param tasker: DockerTasker instance
        :param workflow: DockerBuildWorkflow instance
        :param label_key: str, key of label used to indicate first build
        :param label_value: str, value of label used to indicate first build
        :param url: str, URL to OSv3 instance
        :param verify_ssl: bool, verify SSL certificate?
        :param use_auth: bool, initiate authentication with OSv3?
         N/A N/A N/A N/A super CheckAndSetRebuildPlugin self __init__ tasker workflow N/A N/A self label_key label_key N/A N/A self label_value label_value N/A N/A self url url N/A N/A self verify_ssl verify_ssl N/A N/A self use_auth use_auth N/A run N/A N/A self N/A N/A N/A 
        run the plugin
         N/A metadata N/A N/A N/A get_build_json get metadata N/A N/A labels N/A N/A metadata get labels N/A N/A buildconfig N/A labels N/A buildconfig N/A is_rebuild N/A N/A N/A labels get N/A self label_key N/A self label_value N/A N/A N/A N/A self log info This is a rebuild? %s is_rebuild N/A N/A is_rebuild N/A N/A osbs_conf N/A Configuration conf_file None openshift_uri N/A self url openshift_url N/A self url use_auth N/A self use_auth verify_ssl N/A self verify_ssl namespace N/A N/A metadata get namespace None N/A osbs N/A OSBS osbs_conf osbs_conf N/A labels N/A N/A self label_key N/A self label_value N/A N/A N/A N/A N/A osbs set_labels_on_build_config buildconfig labels N/A N/A N/A OsbsResponseException N/A ex N/A N/A N/A N/A ex status_code 409 N/A N/A N/A N/A N/A self log debug got status %d, retrying N/A ex status_code N/A N/A N/A osbs set_labels_on_build_config buildconfig labels N/A N/A N/A is_rebuild N/A N/A