Skip to content

Conversation

@stevekuznetsov
Copy link
Contributor

@stevekuznetsov stevekuznetsov commented Sep 26, 2018

First commit generate with:

#!/usr/bin/env python

import sys
import yaml

print sys.argv[1]


data = {}
edited = False
with open(sys.argv[1]) as f:
    data = yaml.load(f)
    for job_type in data:
        if job_type == "periodics":
            continue

        for repo in data[job_type]:
            for job in data[job_type][repo]:
                if job["agent"] != "kubernetes":
                    continue

                if job["spec"]["containers"][0]["command"][0] != "ci-operator":
                    continue

                found = False
                if "args" in job["spec"]["containers"][0]:
                    for arg in job["spec"]["containers"][0]["args"]:
                        if arg == "--give-pr-author-access-to-namespace=true":
                            found = True
                    if not found:
                        job["spec"]["containers"][0]["args"] = ["--give-pr-author-access-to-namespace=true"] + job["spec"]["containers"][0]["args"]
                        edited = True

                else:
                    for arg in job["spec"]["containers"][0]["command"][1:]:
                        if arg == "--give-pr-author-access-to-namespace=true":
                            found = True
                    if not found:
                        job["spec"]["containers"][0]["command"] = [job["spec"]["containers"][0]["command"][0]] + ["--give-pr-author-access-to-namespace=true"] + job["spec"]["containers"][0]["command"][1:]
                        edited = True

if edited:
    with open(sys.argv[1], 'w') as f:
        f.write(yaml.dump(data))

@stevekuznetsov stevekuznetsov added the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2018
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. sig/azure Categorizes item related to Azure jobs labels Sep 26, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stevekuznetsov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2018
@openshift-merge-robot openshift-merge-robot merged commit b3332f9 into openshift:master Sep 26, 2018
@openshift-ci-robot
Copy link
Contributor

@stevekuznetsov: Updated the job-config configmap using the following files:

  • key containers-libpod-master-presubmits.yaml using file ci-operator/jobs/containers/libpod/containers-libpod-master-presubmits.yaml
  • key openshift-cluster-monitoring-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-master-postsubmits.yaml
  • key openshift-origin-release-3.10-presubmits.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-release-3.10-presubmits.yaml
  • key openshift-console-master-postsubmits.yaml using file ci-operator/jobs/openshift/console/openshift-console-master-postsubmits.yaml
  • key openshift-kubernetes-metrics-server-master-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-master-postsubmits.yaml
  • key openshift-cluster-monitoring-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-master-presubmits.yaml
  • key openshift-cluster-openshift-controller-manager-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-openshift-controller-manager-operator/openshift-cluster-openshift-controller-manager-operator-master-presubmits.yaml
  • key openshift-machine-config-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-master-postsubmits.yaml
  • key openshift-origin-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-release-3.11-postsubmits.yaml
  • key operator-framework-operator-lifecycle-manager-master-postsubmits.yaml using file ci-operator/jobs/operator-framework/operator-lifecycle-manager/operator-framework-operator-lifecycle-manager-master-postsubmits.yaml
  • key openshift-cluster-api-provider-libvirt-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-api-provider-libvirt/openshift-cluster-api-provider-libvirt-master-postsubmits.yaml
  • key openshift-cluster-capacity-release-3.10-presubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-release-3.10-presubmits.yaml
  • key openshift-image-registry-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-release-3.11-postsubmits.yaml
  • key openshift-origin-web-console-server-master-presubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-master-presubmits.yaml
  • key openshift-telemeter-master-postsubmits.yaml using file ci-operator/jobs/openshift/telemeter/openshift-telemeter-master-postsubmits.yaml
  • key openshift-telemeter-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/telemeter/openshift-telemeter-release-3.11-postsubmits.yaml
  • key openshift-cluster-capacity-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-master-presubmits.yaml
  • key openshift-console-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/console-operator/openshift-console-operator-master-presubmits.yaml
  • key openshift-console-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/console/openshift-console-release-3.11-postsubmits.yaml
  • key openshift-coredns-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/coredns/openshift-coredns-release-3.11-postsubmits.yaml
  • key openshift-elasticsearch-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/elasticsearch-operator/openshift-elasticsearch-operator-master-postsubmits.yaml
  • key openshift-elasticsearch-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/elasticsearch-operator/openshift-elasticsearch-operator-master-presubmits.yaml
  • key openshift-image-registry-release-3.10-presubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-release-3.10-presubmits.yaml
  • key openshift-openshift-network-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/openshift-network-operator/openshift-openshift-network-operator-master-postsubmits.yaml
  • key openshift-cluster-dns-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-dns-operator/openshift-cluster-dns-operator-master-postsubmits.yaml
  • key openshift-cluster-kube-scheduler-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-kube-scheduler-operator/openshift-cluster-kube-scheduler-operator-master-presubmits.yaml
  • key openshift-telemeter-master-presubmits.yaml using file ci-operator/jobs/openshift/telemeter/openshift-telemeter-master-presubmits.yaml
  • key openshift-telemeter-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/telemeter/openshift-telemeter-release-3.11-presubmits.yaml
  • key openshift-prometheus-operator-openshift-master-postsubmits.yaml using file ci-operator/jobs/openshift/prometheus-operator/openshift-prometheus-operator-openshift-master-postsubmits.yaml
  • key openshift-release-controller-master-postsubmits.yaml using file ci-operator/jobs/openshift/release-controller/openshift-release-controller-master-postsubmits.yaml
  • key openshift-imagebuilder-master-presubmits.yaml using file ci-operator/jobs/openshift/imagebuilder/openshift-imagebuilder-master-presubmits.yaml
  • key openshift-kube-state-metrics-openshift-master-postsubmits.yaml using file ci-operator/jobs/openshift/kube-state-metrics/openshift-kube-state-metrics-openshift-master-postsubmits.yaml
  • key openshift-machine-config-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-master-presubmits.yaml
  • key openshift-origin-metrics-master-postsubmits.yaml using file ci-operator/jobs/openshift/origin-metrics/openshift-origin-metrics-master-postsubmits.yaml
  • key openshift-origin-web-console-server-master-postsubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-master-postsubmits.yaml
  • key openshift-service-catalog-master-presubmits.yaml using file ci-operator/jobs/openshift/service-catalog/openshift-service-catalog-master-presubmits.yaml
  • key openshift-cluster-openshift-apiserver-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-openshift-apiserver-operator/openshift-cluster-openshift-apiserver-operator-master-postsubmits.yaml
  • key openshift-console-master-presubmits.yaml using file ci-operator/jobs/openshift/console/openshift-console-master-presubmits.yaml
  • key openshift-descheduler-master-postsubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-master-postsubmits.yaml
  • key openshift-openshift-ansible-master-postsubmits.yaml using file ci-operator/jobs/openshift/openshift-ansible/openshift-openshift-ansible-master-postsubmits.yaml
  • key openshift-openshift-ansible-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/openshift-ansible/openshift-openshift-ansible-release-3.11-presubmits.yaml
  • key openshift-cluster-capacity-release-3.10-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-release-3.10-postsubmits.yaml
  • key openshift-cluster-version-operator-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/cluster-version-operator/openshift-cluster-version-operator-release-3.11-presubmits.yaml
  • key openshift-descheduler-release-3.10-postsubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-release-3.10-postsubmits.yaml
  • key openshift-kubernetes-autoscaler-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-release-3.11-postsubmits.yaml
  • key openshift-ci-operator-prowgen-master-presubmits.yaml using file ci-operator/jobs/openshift/ci-operator-prowgen/openshift-ci-operator-prowgen-master-presubmits.yaml
  • key openshift-console-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/console-operator/openshift-console-operator-master-postsubmits.yaml
  • key openshift-origin-web-console-server-release-3.10-postsubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-release-3.10-postsubmits.yaml
  • key openshift-cluster-kube-scheduler-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-kube-scheduler-operator/openshift-cluster-kube-scheduler-operator-master-postsubmits.yaml
  • key openshift-kubernetes-autoscaler-release-3.10-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-release-3.10-presubmits.yaml
  • key openshift-ci-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/ci-operator/openshift-ci-operator-master-presubmits.yaml
  • key openshift-descheduler-master-presubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-master-presubmits.yaml
  • key openshift-image-registry-release-3.10-postsubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-release-3.10-postsubmits.yaml
  • key openshift-kubernetes-metrics-server-release-3.10-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-release-3.10-presubmits.yaml
  • key openshift-service-ca-operator-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/service-ca-operator/openshift-service-ca-operator-release-3.11-presubmits.yaml
  • key openshift-cluster-api-provider-aws-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-master-postsubmits.yaml
  • key openshift-cluster-openshift-apiserver-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-openshift-apiserver-operator/openshift-cluster-openshift-apiserver-operator-master-presubmits.yaml
  • key openshift-cluster-kube-apiserver-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-kube-apiserver-operator/openshift-cluster-kube-apiserver-operator-master-postsubmits.yaml
  • key openshift-kubernetes-metrics-server-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-release-3.11-presubmits.yaml
  • key openshift-cluster-image-registry-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-image-registry-operator/openshift-cluster-image-registry-operator-master-presubmits.yaml
  • key openshift-coredns-master-postsubmits.yaml using file ci-operator/jobs/openshift/coredns/openshift-coredns-master-postsubmits.yaml
  • key openshift-image-registry-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-release-3.11-presubmits.yaml
  • key openshift-kube-rbac-proxy-openshift-master-postsubmits.yaml using file ci-operator/jobs/openshift/kube-rbac-proxy/openshift-kube-rbac-proxy-openshift-master-postsubmits.yaml
  • key openshift-origin-metrics-master-presubmits.yaml using file ci-operator/jobs/openshift/origin-metrics/openshift-origin-metrics-master-presubmits.yaml
  • key openshift-service-ca-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/service-ca-operator/openshift-service-ca-operator-master-postsubmits.yaml
  • key openshift-api-master-presubmits.yaml using file ci-operator/jobs/openshift/api/openshift-api-master-presubmits.yaml
  • key openshift-ci-operator-prowgen-master-postsubmits.yaml using file ci-operator/jobs/openshift/ci-operator-prowgen/openshift-ci-operator-prowgen-master-postsubmits.yaml
  • key openshift-service-serving-cert-signer-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/service-serving-cert-signer/openshift-service-serving-cert-signer-release-3.11-presubmits.yaml
  • key openshift-service-catalog-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/service-catalog/openshift-service-catalog-release-3.11-postsubmits.yaml
  • key openshift-service-serving-cert-signer-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/service-serving-cert-signer/openshift-service-serving-cert-signer-release-3.11-postsubmits.yaml
  • key openshift-cluster-ingress-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-ingress-operator/openshift-cluster-ingress-operator-master-presubmits.yaml
  • key openshift-cluster-version-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-version-operator/openshift-cluster-version-operator-master-postsubmits.yaml
  • key openshift-openshift-ansible-release-3.10-postsubmits.yaml using file ci-operator/jobs/openshift/openshift-ansible/openshift-openshift-ansible-release-3.10-postsubmits.yaml
  • key openshift-origin-aggregated-logging-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/origin-aggregated-logging/openshift-origin-aggregated-logging-release-3.11-postsubmits.yaml
  • key openshift-origin-web-console-server-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-release-3.11-postsubmits.yaml
  • key openshift-service-ca-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/service-ca-operator/openshift-service-ca-operator-master-presubmits.yaml
  • key openshift-builder-master-postsubmits.yaml using file ci-operator/jobs/openshift/builder/openshift-builder-master-postsubmits.yaml
  • key openshift-cluster-capacity-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-master-postsubmits.yaml
  • key openshift-hive-master-postsubmits.yaml using file ci-operator/jobs/openshift/hive/openshift-hive-master-postsubmits.yaml
  • key openshift-openshift-ansible-master-presubmits.yaml using file ci-operator/jobs/openshift/openshift-ansible/openshift-openshift-ansible-master-presubmits.yaml
  • key openshift-cluster-capacity-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-release-3.11-postsubmits.yaml
  • key openshift-cluster-logging-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-logging-operator/openshift-cluster-logging-operator-master-presubmits.yaml
  • key openshift-installer-master-postsubmits.yaml using file ci-operator/jobs/openshift/installer/openshift-installer-master-postsubmits.yaml
  • key openshift-kubernetes-autoscaler-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-release-3.11-presubmits.yaml
  • key openshift-descheduler-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-release-3.11-presubmits.yaml
  • key openshift-image-registry-master-postsubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-master-postsubmits.yaml
  • key openshift-installer-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/installer/openshift-installer-release-3.11-postsubmits.yaml
  • key openshift-machine-config-operator-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-release-3.11-presubmits.yaml
  • key openshift-service-catalog-master-postsubmits.yaml using file ci-operator/jobs/openshift/service-catalog/openshift-service-catalog-master-postsubmits.yaml
  • key openshift-cluster-api-provider-libvirt-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-api-provider-libvirt/openshift-cluster-api-provider-libvirt-master-presubmits.yaml
  • key openshift-coredns-master-presubmits.yaml using file ci-operator/jobs/openshift/coredns/openshift-coredns-master-presubmits.yaml
  • key openshift-origin-aggregated-logging-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/origin-aggregated-logging/openshift-origin-aggregated-logging-release-3.11-presubmits.yaml
  • key openshift-cluster-kube-apiserver-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-kube-apiserver-operator/openshift-cluster-kube-apiserver-operator-master-presubmits.yaml
  • key openshift-openshift-network-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/openshift-network-operator/openshift-openshift-network-operator-master-presubmits.yaml
  • key openshift-cluster-samples-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-samples-operator/openshift-cluster-samples-operator-master-postsubmits.yaml
  • key openshift-coredns-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/coredns/openshift-coredns-release-3.11-presubmits.yaml
  • key openshift-descheduler-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-release-3.11-postsubmits.yaml
  • key openshift-image-registry-master-presubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-master-presubmits.yaml
  • key openshift-cluster-openshift-controller-manager-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-openshift-controller-manager-operator/openshift-cluster-openshift-controller-manager-operator-master-postsubmits.yaml
  • key openshift-cluster-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-operator/openshift-cluster-operator-master-presubmits.yaml
  • key openshift-cluster-logging-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-logging-operator/openshift-cluster-logging-operator-master-postsubmits.yaml
  • key openshift-kubernetes-autoscaler-master-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-master-postsubmits.yaml
  • key operator-framework-operator-lifecycle-manager-release-3.11-presubmits.yaml using file ci-operator/jobs/operator-framework/operator-lifecycle-manager/operator-framework-operator-lifecycle-manager-release-3.11-presubmits.yaml
  • key tnozicka-openshift-acme-master-postsubmits.yaml using file ci-operator/jobs/tnozicka/openshift-acme/tnozicka-openshift-acme-master-postsubmits.yaml
  • key openshift-ci-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/ci-operator/openshift-ci-operator-master-postsubmits.yaml
  • key openshift-cluster-kube-controller-manager-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-kube-controller-manager-operator/openshift-cluster-kube-controller-manager-operator-master-postsubmits.yaml
  • key openshift-cluster-version-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-version-operator/openshift-cluster-version-operator-master-presubmits.yaml
  • key openshift-kubernetes-metrics-server-master-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-master-presubmits.yaml
  • key openshift-service-catalog-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/service-catalog/openshift-service-catalog-release-3.11-presubmits.yaml
  • key openshift-azure-misc-master-postsubmits.yaml using file ci-operator/jobs/openshift/azure-misc/openshift-azure-misc-master-postsubmits.yaml
  • key openshift-cluster-kube-controller-manager-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-kube-controller-manager-operator/openshift-cluster-kube-controller-manager-operator-master-presubmits.yaml
  • key openshift-installer-master-presubmits.yaml using file ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml
  • key openshift-kubernetes-metrics-server-release-3.10-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-release-3.10-postsubmits.yaml
  • key openshift-openshift-azure-master-postsubmits.yaml using file ci-operator/jobs/openshift/openshift-azure/openshift-openshift-azure-master-postsubmits.yaml
  • key openshift-origin-aggregated-logging-master-presubmits.yaml using file ci-operator/jobs/openshift/origin-aggregated-logging/openshift-origin-aggregated-logging-master-presubmits.yaml
  • key tnozicka-openshift-acme-master-presubmits.yaml using file ci-operator/jobs/tnozicka/openshift-acme/tnozicka-openshift-acme-master-presubmits.yaml
  • key openshift-cluster-api-provider-aws-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-master-presubmits.yaml
  • key openshift-cluster-samples-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-samples-operator/openshift-cluster-samples-operator-master-presubmits.yaml
  • key openshift-console-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/console/openshift-console-release-3.11-presubmits.yaml
  • key openshift-origin-aggregated-logging-master-postsubmits.yaml using file ci-operator/jobs/openshift/origin-aggregated-logging/openshift-origin-aggregated-logging-master-postsubmits.yaml
  • key containers-libpod-master-postsubmits.yaml using file ci-operator/jobs/containers/libpod/containers-libpod-master-postsubmits.yaml
  • key openshift-builder-master-presubmits.yaml using file ci-operator/jobs/openshift/builder/openshift-builder-master-presubmits.yaml
  • key openshift-configmap-reload-openshift-master-postsubmits.yaml using file ci-operator/jobs/openshift/configmap-reload/openshift-configmap-reload-openshift-master-postsubmits.yaml
  • key openshift-openshift-ansible-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/openshift-ansible/openshift-openshift-ansible-release-3.11-postsubmits.yaml
  • key openshift-service-ca-operator-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/service-ca-operator/openshift-service-ca-operator-release-3.11-postsubmits.yaml
  • key operator-framework-operator-lifecycle-manager-release-3.11-postsubmits.yaml using file ci-operator/jobs/operator-framework/operator-lifecycle-manager/operator-framework-operator-lifecycle-manager-release-3.11-postsubmits.yaml
  • key openshift-cluster-monitoring-operator-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-release-3.11-postsubmits.yaml
  • key openshift-cluster-version-operator-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-version-operator/openshift-cluster-version-operator-release-3.11-postsubmits.yaml
  • key openshift-machine-api-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-master-postsubmits.yaml
  • key openshift-origin-master-postsubmits.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-master-postsubmits.yaml
  • key openshift-release-controller-master-presubmits.yaml using file ci-operator/jobs/openshift/release-controller/openshift-release-controller-master-presubmits.yaml
  • key operator-framework-operator-lifecycle-manager-master-presubmits.yaml using file ci-operator/jobs/operator-framework/operator-lifecycle-manager/operator-framework-operator-lifecycle-manager-master-presubmits.yaml
  • key openshift-cluster-ingress-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-ingress-operator/openshift-cluster-ingress-operator-master-postsubmits.yaml
  • key openshift-descheduler-release-3.10-presubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-release-3.10-presubmits.yaml
  • key openshift-origin-metrics-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/origin-metrics/openshift-origin-metrics-release-3.11-postsubmits.yaml
  • key openshift-origin-master-presubmits.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-master-presubmits.yaml
  • key openshift-service-serving-cert-signer-master-presubmits.yaml using file ci-operator/jobs/openshift/service-serving-cert-signer/openshift-service-serving-cert-signer-master-presubmits.yaml
  • key openshift-cluster-capacity-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-release-3.11-presubmits.yaml
  • key openshift-cluster-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-operator/openshift-cluster-operator-master-postsubmits.yaml
  • key openshift-kubernetes-metrics-server-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-release-3.11-postsubmits.yaml
  • key openshift-hive-master-presubmits.yaml using file ci-operator/jobs/openshift/hive/openshift-hive-master-presubmits.yaml
  • key openshift-kubernetes-autoscaler-master-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-master-presubmits.yaml
  • key openshift-machine-config-operator-release-3.11-postsubmits.yaml using file ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-release-3.11-postsubmits.yaml
  • key openshift-origin-metrics-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/origin-metrics/openshift-origin-metrics-release-3.11-presubmits.yaml
  • key openshift-origin-web-console-server-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-release-3.11-presubmits.yaml
  • key openshift-service-serving-cert-signer-master-postsubmits.yaml using file ci-operator/jobs/openshift/service-serving-cert-signer/openshift-service-serving-cert-signer-master-postsubmits.yaml
  • key openshift-cluster-dns-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/cluster-dns-operator/openshift-cluster-dns-operator-master-presubmits.yaml
  • key openshift-cluster-image-registry-operator-master-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-image-registry-operator/openshift-cluster-image-registry-operator-master-postsubmits.yaml
  • key openshift-origin-web-console-server-release-3.10-presubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-release-3.10-presubmits.yaml
  • key openshift-origin-release-3.11-presubmits.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-release-3.11-presubmits.yaml
  • key openshift-kubernetes-autoscaler-release-3.10-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-release-3.10-postsubmits.yaml
  • key openshift-machine-api-operator-master-presubmits.yaml using file ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-master-presubmits.yaml
Details

In response to this:

First commit generate with:

#!/usr/bin/env python

import sys
import yaml

print sys.argv[1]


data = {}
edited = False
with open(sys.argv[1]) as f:
   data = yaml.load(f)
   for job_type in data:
       if job_type == "periodics":
           continue

       for repo in data[job_type]:
           for job in data[job_type][repo]:
               if job["agent"] != "kubernetes":
                   continue

               if job["spec"]["containers"][0]["command"][0] != "ci-operator":
                   continue

               found = False
               if "args" in job["spec"]["containers"][0]:
                   for arg in job["spec"]["containers"][0]["args"]:
                       if arg == "--give-pr-author-access-to-namespace=true":
                           found = True
                   if not found:
                       job["spec"]["containers"][0]["args"] = ["--give-pr-author-access-to-namespace=true"] + job["spec"]["containers"][0]["args"]
                       edited = True

               else:
                   for arg in job["spec"]["containers"][0]["command"][1:]:
                       if arg == "--give-pr-author-access-to-namespace=true":
                           found = True
                   if not found:
                       job["spec"]["containers"][0]["command"] = [job["spec"]["containers"][0]["command"][0]] + ["--give-pr-author-access-to-namespace=true"] + job["spec"]["containers"][0]["command"][1:]
                       edited = True

if edited:
   with open(sys.argv[1], 'w') as f:
       f.write(yaml.dump(data))

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. sig/azure Categorizes item related to Azure jobs size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants