Skip to content

s2i steps default to git ref "master", but not all git repositories have a master branch #49

@jmtd

Description

@jmtd

In the absence of an explicit ref in the step "Given s2i build...", i.e., Given s2i build https://...somerepo.../ with no using branchname suffix, the S2I steps will default to try to check out a branch named master, which may not exist in the repository.

Instead I think it should use the repository's default branch name.

We hit this (side issue) by introducing a new repository for cekit/behave tests, https://github.com/jboss-container-images/openjdk-test-applications, which has the default branch name main. This is the new default, I think, for both Git and Github. (At the time of writing this, I'm about to push a master branch to that repository as a temporary mitigation).

The culprits are

def s2i_inner(context, application, path='.', env="", incremental=False, tag="master", runtime_image=""):

and
def s2i_build(context, application, path='.', env="", incremental=False, tag="master", run=True, runtime_image=""):

and possibly a few other places.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions