diff --git a/devel-up b/devel-up index 6a4683d42..a97f310f0 100755 --- a/devel-up +++ b/devel-up @@ -145,9 +145,22 @@ def params_from_git_refspec(refspec, param_prefix): def parse_git_refspec(refspec): if '@' not in refspec: - return (refspec, 'master') + return (refspec, get_default_branch(refspec)) return tuple(refspec.split('@')) +def get_default_branch(repo): + output = subprocess.check_output(['git', 'ls-remote', '--symref', + repo, 'HEAD'], + encoding='utf-8') + for line in output.splitlines(): + if line.startswith('ref: '): + ref, symref = line[len('ref: '):].split() + if symref != "HEAD": + continue + assert ref.startswith("refs/heads/") + return ref[len("refs/heads/"):] + + if __name__ == "__main__": sys.exit(main()) diff --git a/manifests/pipeline.yaml b/manifests/pipeline.yaml index 530102cb8..b888173fd 100644 --- a/manifests/pipeline.yaml +++ b/manifests/pipeline.yaml @@ -29,7 +29,7 @@ parameters: value: https://github.com/coreos/fedora-coreos-config - description: Git branch/tag reference for FCOS config name: PIPELINE_FCOS_CONFIG_REF - value: master + value: testing-devel - description: Size of the PVC to create name: PVC_SIZE value: 100Gi