Skip to content
  • Peter Hutterer's avatar
    ci-fairy: add a wait-for-pipeline command · 08d0abcd
    Peter Hutterer authored
    
    
    Sometimes, running a CI pipeline is a game of whack-a-mole with the various
    configurations and different build targets. Let's add a ci-fairy command that
    can be run after pushing to wait for the current pipeline(s) to finish.
    
    Usage: ci-fairy wait-for-pipeline
    
    There are a few optional arguments, but most of the time it should find the
    information itself. It picks HEAD from cwd by default, figures out the repo
    etc. and then monitors the running pipeline.
    
    Note that the repo lookup is *not* using the git config because we cannot know
    which repository is the intended one. We cannot use the current branch's
    upstream either because there's a reasonable chance it's origin/master.
    
    So we just assume that the pipeline after pushing runs in the user fork,
    defined by $GITLAB_USER_ID (or as fallback $USER). Where this isn't
    sufficient, specify --project.
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    08d0abcd