Add glab to release-cli
Summary
Add the glab
executable in the release-cli
image so that all new release-cli:latest
image fetch will include glab
.
Proposal
In the release-cli CI, fetch binaries from https://gitlab.com/gitlab-org/cli/-/releases and add them to the Docker image.
Designs
- Show closed items
Blocks
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Furkan Ayhan added gitlab-org#15437 as parent epic
added gitlab-org#15437 as parent epic
added Category:Release Orchestration GitLab Release CLI golang labels
- Furkan Ayhan mentioned in epic gitlab-org#15437
mentioned in epic gitlab-org#15437
- Furkan Ayhan changed the description
Compare with previous version changed the description
- 🤖 GitLab Bot 🤖 added devopsdeploy groupenvironments sectioncd labels
added devopsdeploy groupenvironments sectioncd labels
- Furkan Ayhan removed groupenvironments label
removed groupenvironments label
- 🤖 GitLab Bot 🤖 added groupenvironments label
added groupenvironments label
- Furkan Ayhan removed Category:Release Orchestration label
removed Category:Release Orchestration label
- Furkan Ayhan removed groupenvironments label
removed groupenvironments label
- 🤖 GitLab Bot 🤖 added groupenvironments label
added groupenvironments label
- Furkan Ayhan removed devopsdeploy label
removed devopsdeploy label
- 🤖 GitLab Bot 🤖 added devopsdeploy label
added devopsdeploy label
- Furkan Ayhan removed golang label
removed golang label
- Furkan Ayhan removed groupenvironments label
removed groupenvironments label
- Furkan Ayhan removed devopsdeploy label
removed devopsdeploy label
- 🤖 GitLab Bot 🤖 added groupenvironments label
added groupenvironments label
- 🤖 GitLab Bot 🤖 added devopsdeploy label
added devopsdeploy label
- Furkan Ayhan removed groupenvironments label
removed groupenvironments label
- 🤖 GitLab Bot 🤖 added groupenvironments label
added groupenvironments label
- Furkan Ayhan removed sectioncd label
removed sectioncd label
- 🤖 GitLab Bot 🤖 added sectioncd label
added sectioncd label
- Furkan Ayhan added grouppipeline authoring label and removed groupenvironments label
added grouppipeline authoring label and removed groupenvironments label
- Furkan Ayhan removed devopsdeploy label
removed devopsdeploy label
- 🤖 GitLab Bot 🤖 added devopsverify label
added devopsverify label
- Furkan Ayhan removed sectioncd label
removed sectioncd label
- 🤖 GitLab Bot 🤖 added sectionci label
added sectionci label
- Furkan Ayhan assigned to @furkanayhan
assigned to @furkanayhan
- Furkan Ayhan changed milestone to %17.6
changed milestone to %17.6
- Furkan Ayhan set weight to 2
set weight to 2
- Furkan Ayhan mentioned in issue cli#7450
mentioned in issue cli#7450
- Maintainer
@furkanayhan - please see the following guidance and update this issue.1 Error Please add typebug typefeature, typemaintenance and optionally a subtype label to this issue. If you do not feel the purpose of this issue matches one of the types, you may apply the typeignore label to exclude it from type tracking metrics and future prompts.
This message was generated automatically. You're welcome to improve it.
- Furkan Ayhan added typemaintenance label
added typemaintenance label
- Furkan Ayhan changed the description
Compare with previous version changed the description
- Author Developer
@jaime @vshushlin
As a part of release-cli to glab migration (&15437), in this issue, I'll add theglab
executable into therelease-cli
image.To do this, I have this in mind;
--- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -55,3 +55,13 @@ binaries windows/386 windows/amd64: extends: .binaries needs: - test-windows + +fetch-glab: + stage: build + rules: + - if: '$CI_MERGE_REQUEST_IID' + - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' + - if: '$CI_COMMIT_TAG' + script: + - [FETCH glab EXECUTABLE FROM https://gitlab.com/gitlab-org/cli/-/releases/v1.47.0/] + - COPY glab EXECUTABLE TO /bin/ --- a/.gitlab/ci/publish.yml +++ b/.gitlab/ci/publish.yml @@ -8,8 +8,7 @@ - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile $DESTINATION --cache-dir .docker-cache needs: - - job: docker-build - artifacts: true + - [docker-build, fetch-glab] docker-push-mr: extends: .docker-push --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,5 @@ RUN make build FROM alpine:3.18 COPY --from=builder /release-cli/bin/release-cli /usr/local/bin/release-cli +COPY --from=builder /release-cli/bin/glab /usr/local/bin/glab COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
Do you think we could do it like this?
Do we need to consider the other "binaries"?
Collapse replies - Maintainer
@timofurrer can you take over this?
1 - Maintainer
@furkanayhan that looks solid. One potential issue I'm seeing is that
release-cli
is built for some additional platforms that the CLI is not (yet) built for.- Release CLI platforms: https://gitlab.com/gitlab-org/release-cli/-/blob/master/.gitlab/ci/release.yml
- GitLab CLI platforms: https://gitlab.com/gitlab-org/cli/-/blob/main/.goreleaser.yml#L14
The missing platforms are:
- all freebsd
- linux/ppc64le
All those "should" be supported by goreleaser and probably can be added to the CLI if necessary.
- Author Developer
@timofurrer I am not familiar with the concept so much so this question may be silly but do we need to do that since we add this binary into the Docker image?
- Maintainer
@furkanayhan true that
Is therelease-cli
outside of the docker runners supported at all? Like what if users have a shell runner and installrelease-cli
and use therelease
keyword in CI ? I'm just wondering if we start migrating fromrelease-cli
toglab
then users on freebsd would need to be supported, too.Edited by Timo Furrer - Author Developer
@timofurrer I see your point. Yes, people may do this. However, we will not change the script we use to release for now. It's part of the 4th step of the epic plan.
For the CI Catalog, we will require users to have either the recent version of
release-cli
orglab
in their machines if they want to release a catalog resource. 1 - Maintainer
@furkanayhan okay, let's not make this dependent on it. I think it's nonetheless worthy to already go forward with chore(release): release for freebsd and ppc64le (cli!1726 - merged).
1 - Author Developer
Actually, I guess I found a better way;
--- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,10 @@ WORKDIR /release-cli RUN make build +FROM registry.gitlab.com/gitlab-org/cli:v1.47.0 AS glab-source + FROM alpine:3.18 COPY --from=builder /release-cli/bin/release-cli /usr/local/bin/release-cli +COPY --from=glab-source /usr/bin/glab /usr/local/bin/glab COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
- Maintainer
You may also just install it from
apk
- I've left a comment in the MR. 1
- Timo Furrer mentioned in commit cli@83d74d0f
mentioned in commit cli@83d74d0f
- Timo Furrer mentioned in merge request cli!1726 (merged)
mentioned in merge request cli!1726 (merged)
- Timo Furrer mentioned in commit cli@e5deb3ca
mentioned in commit cli@e5deb3ca
- Gary Holtz mentioned in commit cli@2f17d1f2
mentioned in commit cli@2f17d1f2
- Gary Holtz closed with merge request cli!1726 (merged)
closed with merge request cli!1726 (merged)
- Furkan Ayhan reopened
reopened
- Furkan Ayhan marked this issue as blocking gitlab#442785 (closed)
marked this issue as blocking gitlab#442785 (closed)
- Furkan Ayhan mentioned in commit a3425b63
mentioned in commit a3425b63
- Furkan Ayhan mentioned in merge request !185 (merged)
mentioned in merge request !185 (merged)
- Author Developer
Collapse replies - Maintainer
@furkanayhan FYI we'll need to cut a release for
glab
to be available inlatest
. For now you can use theedge
tag to test.docker run -ti registry.gitlab.com/gitlab-org/release-cli:edge sh Unable to find image 'registry.gitlab.com/gitlab-org/release-cli:edge' locally edge: Pulling from gitlab-org/release-cli 1cc3d825d8b2: Pull complete 49705bf876b4: Pull complete 9cda3ae99d93: Pull complete 0d557c9dbcbe: Pull complete Digest: sha256:0d6d8767f9678838aa389343f05125339a0d39554be27104552660756b407526 Status: Downloaded newer image for registry.gitlab.com/gitlab-org/release-cli:edge WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested / # which glab /usr/bin/glab / # glab version Current glab version: 1.48.0 (2024-10-17)
- Author Developer
Great! Thanks! I created #195 (closed) for release.
- Furkan Ayhan added workflowin review label
added workflowin review label
- Furkan Ayhan removed the relation with gitlab#442785 (closed)
removed the relation with gitlab#442785 (closed)
- Furkan Ayhan marked this issue as blocking #195 (closed)
marked this issue as blocking #195 (closed)
- Furkan Ayhan added workflowcomplete label and removed workflowin review label
added workflowcomplete label and removed workflowin review label
- Furkan Ayhan closed
closed
- Furkan Ayhan mentioned in issue gitlab#442785 (closed)
mentioned in issue gitlab#442785 (closed)
- Furkan Ayhan mentioned in merge request !192 (merged)
mentioned in merge request !192 (merged)