File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const glabVersion = "1.93.0"
2+ const glabPackageBaseUrl = `https://gitlab.com/api/v4/projects/gitlab-org%2Fcli/packages/generic/glab/${ glabVersion } `
23
34export const renderDockerfileGlab = ( ) : string =>
45 `# Tooling: GitLab CLI (glab)
@@ -13,7 +14,7 @@ RUN set -eu; \
1314 s390x) GLAB_ARCH="s390x" ;; \
1415 *) echo "Unsupported glab architecture: $ARCH" >&2; exit 1 ;; \
1516 esac; \
16- curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v ${ glabVersion } /downloads/ glab_${ glabVersion } _linux_\\ $GLAB_ARCH.deb" -o /tmp/glab.deb; \
17+ curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 " ${ glabPackageBaseUrl } / glab_${ glabVersion } _linux_$GLAB_ARCH.deb" -o /tmp/glab.deb; \
1718 apt-get update; \
1819 apt-get install -y --no-install-recommends /tmp/glab.deb; \
1920 rm -f /tmp/glab.deb; \
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export const gitlabImageName = "docker-git-auth-gitlab:latest"
1313export const gitlabImageDir = ".docker-git/.orch/auth/gitlab/.image"
1414
1515const glabVersion = "1.93.0"
16+ const glabPackageBaseUrl = `https://gitlab.com/api/v4/projects/gitlab-org%2Fcli/packages/generic/glab/${ glabVersion } `
1617
1718export const renderGlabDockerfile = ( ) : string =>
1819 String . raw `FROM ubuntu:24.04
@@ -29,7 +30,7 @@ RUN apt-get update \
2930 s390x) GLAB_ARCH="s390x" ;; \
3031 *) echo "Unsupported glab architecture: $ARCH" >&2; exit 1 ;; \
3132 esac \
32- && curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v ${ glabVersion } /downloads/ glab_${ glabVersion } _linux_\${ GLAB_ARCH} .deb" -o /tmp/glab.deb \
33+ && curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 " ${ glabPackageBaseUrl } / glab_${ glabVersion } _linux_$ GLAB_ARCH.deb" -o /tmp/glab.deb \
3334 && apt-get install -y --no-install-recommends /tmp/glab.deb \
3435 && rm -f /tmp/glab.deb \
3536 && rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change 11const glabVersion = "1.93.0"
2+ const glabPackageBaseUrl = `https://gitlab.com/api/v4/projects/gitlab-org%2Fcli/packages/generic/glab/${ glabVersion } `
23
34export const renderDockerfileGlab = ( ) : string =>
45 `# Tooling: GitLab CLI (glab)
@@ -13,7 +14,7 @@ RUN set -eu; \
1314 s390x) GLAB_ARCH="s390x" ;; \
1415 *) echo "Unsupported glab architecture: $ARCH" >&2; exit 1 ;; \
1516 esac; \
16- curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v ${ glabVersion } /downloads/ glab_${ glabVersion } _linux_\\ $GLAB_ARCH.deb" -o /tmp/glab.deb; \
17+ curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 " ${ glabPackageBaseUrl } / glab_${ glabVersion } _linux_$GLAB_ARCH.deb" -o /tmp/glab.deb; \
1718 apt-get update; \
1819 apt-get install -y --no-install-recommends /tmp/glab.deb; \
1920 rm -f /tmp/glab.deb; \
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export const gitlabImageName = "docker-git-auth-gitlab:latest"
1313export const gitlabImageDir = ".docker-git/.orch/auth/gitlab/.image"
1414
1515const glabVersion = "1.93.0"
16+ const glabPackageBaseUrl = `https://gitlab.com/api/v4/projects/gitlab-org%2Fcli/packages/generic/glab/${ glabVersion } `
1617
1718export const renderGlabDockerfile = ( ) : string =>
1819 String . raw `FROM ubuntu:24.04
@@ -29,7 +30,7 @@ RUN apt-get update \
2930 s390x) GLAB_ARCH="s390x" ;; \
3031 *) echo "Unsupported glab architecture: $ARCH" >&2; exit 1 ;; \
3132 esac \
32- && curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v ${ glabVersion } /downloads/ glab_${ glabVersion } _linux_\${ GLAB_ARCH} .deb" -o /tmp/glab.deb \
33+ && curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 " ${ glabPackageBaseUrl } / glab_${ glabVersion } _linux_$ GLAB_ARCH.deb" -o /tmp/glab.deb \
3334 && apt-get install -y --no-install-recommends /tmp/glab.deb \
3435 && rm -f /tmp/glab.deb \
3536 && rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ describe("renderDockerfile", () => {
5959
6060 expectContainsAll ( dockerfile , [
6161 "# Tooling: GitLab CLI (glab)" ,
62+ "https://gitlab.com/api/v4/projects/gitlab-org%2Fcli/packages/generic/glab/" ,
63+ "glab_1.93.0_linux_$GLAB_ARCH.deb" ,
64+ "curl -fsSL --retry 5 --retry-all-errors --retry-delay 2" ,
6265 "glab --version" ,
6366 'ARG DOCKER_GIT_SESSION_SYNC_PACKAGE="@prover-coder-ai/docker-git-session-sync@latest"' ,
6467 'COPY .docker-git-tools/docker-git-session-sync /opt/docker-git/tools/docker-git-session-sync' ,
@@ -67,6 +70,7 @@ describe("renderDockerfile", () => {
6770 "using local session sync fallback" ,
6871 "install -m 0755 /opt/docker-git/tools/docker-git-session-sync /usr/local/bin/docker-git-session-sync"
6972 ] )
73+ expect ( dockerfile ) . not . toContain ( "glab_1.93.0_linux_\\$GLAB_ARCH.deb" )
7074 } )
7175} )
7276
You can’t perform that action at this time.
0 commit comments