def MakeGcrTags()

in generate_cloudbuild.py [0:0]


def MakeGcrTags(label_without_tag,
                label_with_tag,
                maybe_hypen,
                include_old_name=True,
                include_rebrand_name=True):
    t = []
    for gcr_prefix, gcr_suffix in GCR_PREFIXES:
        if include_old_name:
            t.append(
                '\'{gcrprefix}/{gcrio_project}/{gcrio_suffix}/{old_name}:{label}\''
                .format(gcrprefix=gcr_prefix,
                        gcrio_project=GCRIO_PROJECT,
                        gcrio_suffix=gcr_suffix,
                        old_name=OLD_NAME,
                        label=label_without_tag))
            if not IS_HOTFIX:
                t.append(
                    '\'{gcr_prefix}/{gcrio_project}/{gcrio_suffix}/{old_name}:$TAG_NAME{maybe_hypen}{label}\''
                    .format(gcr_prefix=gcr_prefix,
                            gcrio_project=GCRIO_PROJECT,
                            old_name=OLD_NAME,
                            gcrio_suffix=gcr_suffix,
                            maybe_hypen=maybe_hypen,
                            label=label_with_tag))
            t.append(
                '\'{gcr_prefix}/{gcrio_project}/{gcrio_suffix}/{old_name}:$TAG_NAME{maybe_hypen}{label}-$_DATE\''
                .format(gcr_prefix=gcr_prefix,
                        gcrio_project=GCRIO_PROJECT,
                        old_name=OLD_NAME,
                        gcrio_suffix=gcr_suffix,
                        maybe_hypen=maybe_hypen,
                        label=label_with_tag))
        if include_rebrand_name:
            t.append(
                '\'{gcrprefix}/{gcrio_project}/{gcrio_suffix}/{rebrand_name}:{label}\''
                .format(gcrprefix=gcr_prefix,
                        gcrio_project=GCRIO_PROJECT,
                        gcrio_suffix=gcr_suffix,
                        rebrand_name=REBRAND_NAME,
                        label=label_without_tag))
            if not IS_HOTFIX:
                t.append(
                    '\'{gcr_prefix}/{gcrio_project}/{gcrio_suffix}/{rebrand_name}:$TAG_NAME{maybe_hypen}{label}\''
                    .format(gcr_prefix=gcr_prefix,
                            gcrio_project=GCRIO_PROJECT,
                            rebrand_name=REBRAND_NAME,
                            gcrio_suffix=gcr_suffix,
                            maybe_hypen=maybe_hypen,
                            label=label_with_tag))
            t.append(
                '\'{gcr_prefix}/{gcrio_project}/{gcrio_suffix}/{rebrand_name}:$TAG_NAME{maybe_hypen}{label}-$_DATE\''
                .format(gcr_prefix=gcr_prefix,
                        gcrio_project=GCRIO_PROJECT,
                        rebrand_name=REBRAND_NAME,
                        gcrio_suffix=gcr_suffix,
                        maybe_hypen=maybe_hypen,
                        label=label_with_tag))
    return t