Skip to content

ci: Simplify CI process on deploy-gitpod-workspace-image

What does this Merge Request do and why?

Simplifies the CI process on deploy-gitpod-workspace-image job.

  1. The job run only ./support/gitpod/docker-tag-image-as-stable shell script.
  2. ./support/gitpod/docker-tag-image-as-stable does not need git command.
  3. ./support/gitpod/docker-tag-image-as-stable does not need docker-in-docker as it does not build a container image.

diff

@@ -1,24 +1,5 @@
 deploy-gitpod-workspace-image:
-  image: docker:git
-  services:
-  - name: docker:${DOCKER_VERSION}-dind
-    command:
-    - "--experimental"
-  variables:
-    DOCKER_VERSION: 20.10.16
-    DOCKER_HOST: tcp://docker:2375
-    DOCKER_TLS_CERTDIR: ''
-  tags:
-  - gitlab-org-docker
-  extends:
-  - ".docker:build-docker-in-docker"
-  before_script:
-  - nproc
-  - free -m
-  - apk add --no-cache jq curl
-  - "./support/docker ci-login"
-  after_script:
-  - "./support/docker ci-logout"
+  image: docker:20.10.16
   stage: deploy
   needs:
   - build-gitpod-workspace-image

before

https://gitlab.com/gitlab-org/gitlab-development-kit/-/ci/editor?branch_name=main&tab=3

deploy-gitpod-workspace-image:
  image: docker:git
  services:
  - name: docker:${DOCKER_VERSION}-dind
    command:
    - "--experimental"
  variables:
    DOCKER_VERSION: 20.10.16
    DOCKER_HOST: tcp://docker:2375
    DOCKER_TLS_CERTDIR: ''
  tags:
  - gitlab-org-docker
  extends:
  - ".docker:build-docker-in-docker"
  before_script:
  - nproc
  - free -m
  - apk add --no-cache jq curl
  - "./support/docker ci-login"
  after_script:
  - "./support/docker ci-logout"
  stage: deploy
  needs:
  - build-gitpod-workspace-image
  script:
  - "./support/gitpod/docker-tag-image-as-stable"
  rules:
  - if: $CI_PIPELINE_SOURCE == "schedule"
    when: manual

after

https://gitlab.com/gitlab-org/gitlab-development-kit/-/ci/editor?branch_name=tnir-avoid-dind-use-on-deploy-gitpod-workspace-image&tab=3

deploy-gitpod-workspace-image:
  image: docker:20.10.16
  stage: deploy
  needs:
  - build-gitpod-workspace-image
  script:
  - "./support/gitpod/docker-tag-image-as-stable"
  rules:
  - if: $CI_PIPELINE_SOURCE == "schedule"
    when: manual

Merge Request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • [n/a] Tests added for new functionality. If not, please raise Issue to follow-up.
  • [n/a] Documentation added/updated, if needed.
  • [n/a] gdk doctor test added, if needed.
  • [n/a] Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Takuya Noguchi

Merge request reports