gitlab:assets:compile is pushing the wrong assets image for `gitlab-ee` on `dev`
This was reported and discovered in https://gitlab.com/gitlab-org/quality/nightly/issues/142#note_218062707.
I think it's caused by the single codebase migration. As you can see in https://dev.gitlab.org/gitlab/gitlab-ee/-/jobs/5358060, the image name is wrong:
$ time scripts/build_assets_image
Sending build context to Docker daemon 210.9MB
Step 1/3 : FROM scratch
--->
Step 2/3 : ADD public/assets /assets/
---> ede9b47b6305
Step 3/3 : CMD /bin/true
---> Running in b05f70ba6994
Removing intermediate container b05f70ba6994
---> 8069a8cab771
Successfully built 8069a8cab771
Successfully tagged dev.gitlab.org:5005/gitlab/gitlab-ee/gitlab-assets-ce:master
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
The push refers to repository [dev.gitlab.org:5005/gitlab/gitlab-ee/gitlab-assets-ce]
881a7d036d2b: Preparing
881a7d036d2b: Pushed
master: digest: sha256:cd5c39ee1dfca2c446eaacfc9d9848c37a36a8e01d8a5a7e31b6dc263a29be2c size: 529
The push refers to repository [dev.gitlab.org:5005/gitlab/gitlab-ee/gitlab-assets-ce]
881a7d036d2b: Preparing
881a7d036d2b: Layer already exists
9a2e50434750c396369acc9a999bf93e774a7824: digest: sha256:cd5c39ee1dfca2c446eaacfc9d9848c37a36a8e01d8a5a7e31b6dc263a29be2c size: 529
dev.gitlab.org:5005/gitlab/gitlab-ee/gitlab-assets-ce:master
should be dev.gitlab.org:5005/gitlab/gitlab-ee/gitlab-assets-ee:master
!
It's because the project name on dev
is still gitlab-ee
, not gitlab
:
# Generate the image name based on the project this is being run in
ASSETS_IMAGE_NAME="gitlab-assets-ce"
if [[ "${CI_PROJECT_NAME}" == "gitlab" ]]
then
ASSETS_IMAGE_NAME="gitlab-assets-ee"
fi