Skip to content

gitlab integrated Jfrog CLI download does not work in air-gapped environments #3245

@acmo2023

Description

@acmo2023

Describe the bug

Hello,
when using the build/gitlab/v2/.setup-jfrog-unix.yml in air-gapped mode with an artifactory remote repo (for jfrog-cli) the integration fails due a wrong generated path.

Current behavior

When you set the environment variables JF_RELEASES_REPO and JF_URL the Base URL for the cli download is generated as:
BASE_URL="${JF_URL%/}/artifactory/${JF_RELEASES_REPO%/}"

The default path (non-air-gapped) is:
BASE_URL="https://releases.jfrog.io/artifactory"

The full URL for the download is then generated as:
URL="${BASE_URL}/jfrog-cli/v2-jf/${VERSION}/jfrog-cli-${CLI_OS}-${ARCH}/jf"

where jfrog-cli is hardcoded.

Within the air-gapped setup, that results to a non existing path in an Artifactory remote repo.
E.g. if https://releases.jfrog.io/artifactory/jfrog-cli is configured as a remote repo in a local Artifactory instance with the name jfrog-cli the resulting URL will be:

URL="${JF_URL%/}/artifactory/jfrog-cli/jfrog-clii/v2-jf/${VERSION}/jfrog-cli-${CLI_OS}-${ARCH}/jf"

Reproduction steps

No response

Expected behavior

The hardcoded path component (jfrog-cli) should be removed for air-gapped setups.

JFrog CLI version

any

Operating system type and version

any

JFrog Artifactory version

No response

JFrog Xray version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions