30df0a8 optimize checkouts

Authored and Committed by mikeb 4 years ago
    optimize checkouts
    
    Only checkout exactly the code we need to run the tests. This should help work around
    errors and timeouts (early EOF/index-pack failed) from Pagure. Jenkins seems to require
    a minimum of depth=2 or it fails when walking the revision history.
    
    Using a shallow clone is safe for PRs because we're always building from the head of
    the PR branch (OpenShift doesn't have a way to specify a non-head commit on a PR branch).
    
    When building from the master branch we use depth=10 to avoid a race condition in case
    multiple commits have been pushed in quick succession. The integration test job is
    launched using the exact revision of the code that was used to build the images, to
    ensure the results are valid.