Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion devel-up
Original file line number Diff line number Diff line change
Expand 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())
2 changes: 1 addition & 1 deletion manifests/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down