Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FC-41962] jenkins: always resolve tags to rev of the commit that got tagged #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 3, 2024

  1. jenkins: always resolve tags to rev of the commit that got tagged

    FC-41962
    Closes #200
    
    Some tags have a their own revision which is not the revision of the
    commit that got tagged. This happens e.g. for tags with messages or
    signatures.
    
    Previously, we tried to resolve the latter (that's what the `^{}`-syntax
    is for) and if this "fails" (i.e. stdout is empty, but the exit-code is
    zero), we made a fallback to `git ls-remote url tag`.
    
    This however had the unintended side-effect that an annotated tag was
    resolved to the tag's revision (fallback) if the first call failed due
    to a transient error like a DNS outage. In some cases this broke
    subsequent deployment steps if the S3 URL for frontend artifacts
    contains the commit revision (and not the tag's revision).
    
    This patch explicitly checks for errors in `git ls-remote` (if something
    isn't found, we get zero as exit-code and no stdout) and fail hard.
    Also, the `ls-remote` without the `^{}` is done first. This avoids a
    second `ls-remote` call for refs that aren't tags.
    Ma27 committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    2e530f8 View commit details
    Browse the repository at this point in the history