Skip to content

[TS-173] Intermittent Errors when Retrieving VersionΒ #80

@qmg-jhayden

Description

@qmg-jhayden

Hi

We're seeing intermittent errors, without a helpful error message, around the step where it retrieves the browser download url.

I have a suspicion that any error message will be getting masked when the response from curl -Ls https://api.github.com/repos/codacy/git-version/releases/latest is being piped to the jq statement.

Furthermore, the url in the else statement is returning a 404 - but that is potentially being hidden when the output is being directed to > /usr/local/bin/git-version

Run codacy/git-version@80c816f11db8dea5e3a81025f598193015b51832
  with:
    release-branch: master
    minor-identifier: minor:
    major-identifier: major:
    prefix: v
    tool-version: latest
    dev-branch: dev
    log-paths: ./
Run set -eo pipefail
  set -eo pipefail
  if [ "latest" = "latest" ]; then
    download_url="$(curl -Ls https://api.github.com/repos/codacy/git-version/releases/latest | jq -r .assets[0].browser_download_url)"
  else
    download_url="https://github.com/codacy/git-version/releases/download/latest/git-version"
  fi
  curl -Ls "$download_url" > /usr/local/bin/git-version
  chmod +x /usr/local/bin/git-version
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Error: Process completed with exit code [6](https://github.com/xxxxxxx#step:4:6).

Is anyone else seeing this same behaviour?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    jira-issueIssue tracked on JIRA

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions