Skip to content

Instantly share code, notes, and snippets.

@stevekuznetsov
Created June 15, 2018 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevekuznetsov/8ef685e75cde2080c7653c8fdad7db1f to your computer and use it in GitHub Desktop.
Save stevekuznetsov/8ef685e75cde2080c7653c8fdad7db1f to your computer and use it in GitHub Desktop.
branch filtering
#!/usr/bin/env python
import yaml
import sys
prow_config_file = sys.argv[1]
prow_config = {}
with open(prow_config_file) as prow_config_data:
prow_config = yaml.load(prow_config_data)
repos = [
'openshift/cluster-capacity',
'openshift/coredns',
'openshift/descheduler',
'openshift/image-registry',
'openshift/kubernetes-autoscaler',
'openshift/kubernetes-metrics-server',
'openshift/openshift-ansible',
'openshift/origin',
'openshift/origin-aggregated-logging',
'openshift/origin-metrics',
'openshift/origin-web-console',
'openshift/origin-web-console-server',
'openshift/service-catalog'
]
for repo in repos:
for job_type in ['presubmits', 'postsubmits']:
for job in prow_config[job_type].get(repo, []):
if job['agent'] == 'jenkins' and ('branches' in job and 'master' in job['branches']):
print job['name']
$ /tmp/filter.py /home/skuznets/releasego/src/github.com/openshift/release/cluster/ci/config/prow/config.yaml
test_branch_image_registry_extended
test_branch_image_registry_integration
test_branch_image_registry_unit
test_pull_request_openshift_ansible_logging
test_pull_request_openshift_ansible_extended_conformance_gce
test_pull_request_openshift_ansible_extended_conformance_gce_ha
test_pull_request_openshift_ansible_install_upgrade_gce
test_pull_request_openshift_ansible_extended_conformance_install
test_pull_request_openshift_ansible_extended_conformance_install_system_containers
test_branch_openshift_ansible_extended_conformance_gce
test_branch_openshift_ansible_logging
test_branch_openshift_ansible_logging_json_file
test_branch_origin_extended_conformance_install_containerized
test_branch_origin_extended_conformance_install_in_tree
test_branch_origin_extended_conformance_install_system_containers
test_branch_origin_extended_conformance_install_update_containerized
test_branch_origin_extended_conformance_install_update_system_containers
test_pull_request_origin_extended_conformance_install
test_pull_request_origin_extended_conformance_gce
test_pull_request_origin_service_catalog
test_pull_request_origin_extended_conformance_azure
ami_build_origin_int_rhel_build
push_origin_release
test_branch_origin_check
test_branch_origin_cmd
test_branch_origin_cross
test_branch_origin_end_to_end
test_branch_origin_extended_conformance_gce
test_branch_origin_extended_conformance_install
test_branch_origin_extended_networking
test_branch_origin_integration
test_branch_origin_verify
test_branch_origin_extended_conformance_crio_rpm
test_branch_origin_service_catalog
test_branch_origin_extended_conformance_azure
test_pull_request_origin_aggregated_logging_journald
test_pull_request_origin_aggregated_logging_json_file
push_origin_aggregated_logging_release
push_origin_metrics_release
test_branch_origin_web_console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment