mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-10 10:32:56 +01:00
Add custom www-gitlab-com image with patched gsutil rsync command
Currently the `gsutil rsync` command does not support the `-z` or `-Z` options available in `gsutil cp` to compress files locally via gzip before uploading (https://github.com/GoogleCloudPlatform/gsutil/issues/579). As https://cloud.google.com/storage/docs/gsutil/commands/cp states: When you specify the -z option, the data from your files is compressed before it is uploaded, but your actual files are left uncompressed on the local disk. The uploaded objects retain the Content-Type and name of the original files, but have their Content-Encoding metadata set to gzip to indicate that the object data stored are compressed on the Cloud Storage servers and have their Cache-Control metadata set to no-transform. about.gitlab.com is currently serving uncompressed HTML files because `Cache-Control: max-age=0` is set (see https://gitlab.com/gitlab-com/www-gitlab-com/-/merge_requests/87045), and Fastly has a custom rule to skip HTML files and therefore won't cache them. This patches the `rsync.py` using https://github.com/GoogleCloudPlatform/gsutil/pull/1430 to support these command-line options so local gzip compression can be performed. Relates to https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14852
This commit is contained in:
parent
58a310f6ce
commit
519554013c
4 changed files with 131 additions and 1 deletions
|
|
@ -49,6 +49,7 @@ release-tools test: *test_build
|
|||
sitespeed-gitlab test: *test_build
|
||||
ubi-release test: *test_build
|
||||
www-gitlab-com-3.0 test: *test_build
|
||||
www-gitlab-com-3.0-patched-gsutil test: *test_build
|
||||
build-git: *test_build
|
||||
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/-/blob/13-8-stable-ee/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
|
||||
terraform test: *test_build
|
||||
|
|
@ -94,6 +95,7 @@ release-tools push: *build_and_deploy
|
|||
sitespeed-gitlab push: *build_and_deploy
|
||||
ubi-release push: *build_and_deploy
|
||||
www-gitlab-com-3.0 push: *build_and_deploy
|
||||
www-gitlab-com-3.0-patched-gsutil push: *build_and_deploy
|
||||
build-git push: *build_and_deploy
|
||||
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/-/blob/13-8-stable-ee/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
|
||||
terraform push: *build_and_deploy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue