Move custom images to separate major component directories

This commit is contained in:
Andrejs Cunskis 2022-05-03 13:52:10 +03:00
parent 0d1e680ecb
commit 8fff315864
No known key found for this signature in database
GPG key ID: 87CB75083F227241
4 changed files with 44 additions and 28 deletions

40
.gitlab/ci/e2e.images.yml Normal file
View file

@ -0,0 +1,40 @@
# Used by gitlab e2e tests and other qa related tasks
# Base image used by QA framework unit tests and other jobs not requiring full toolset
.e2e-base:
variables:
DEBIAN: bullseye
GIT: '2.33'
RUBY: '2.7'
BUNDLER: '2.3'
CHROME: '99'
# Image used for running full e2e test suite
.e2e-full:
variables:
LFS: '2.9'
GCLOUD: '383'
KUBECTL: '1.23'
DOCKER: '20.10.14'
e2e-base test:
extends:
- .e2e-base
- .test_custom
e2e-base push:
extends:
- .e2e-base
- .build_and_deploy_custom
needs: ["e2e-base test"]
e2e-full test:
extends:
- .e2e-base
- .e2e-full
- .test_custom
e2e-full push:
extends:
- .e2e-base
- .e2e-full
- .build_and_deploy_custom
needs: ["e2e-full test"]

View file

@ -1,23 +0,0 @@
# Used by gitlab e2e tests and other qa related tasks
.qa:
variables:
DEBIAN: bullseye
LFS: '2.9'
GIT: '2.33'
RUBY: '2.7'
BUNDLER: '2.3'
CHROME: '99'
GCLOUD: '383'
KUBECTL: '1.23'
DOCKER: '20.10.14'
qa test:
extends:
- .qa
- .test_custom
qa push:
extends:
- .qa
- .build_and_deploy_custom
needs: ["qa test"]

View file

@ -268,7 +268,6 @@ function print_kubectl_args() {
function parse_arguments() { function parse_arguments() {
printf -- "-f Dockerfile.custom " printf -- "-f Dockerfile.custom "
# Mapping between sources of architectures # Mapping between sources of architectures
# - arch: a current image architecture (or uname -m if matching host, but can be different) # - arch: a current image architecture (or uname -m if matching host, but can be different)
# - apk --print-arch: a alpine architecture for installed packages # - apk --print-arch: a alpine architecture for installed packages
@ -337,14 +336,14 @@ function generate_command() {
function build_custom_if_needed() { function build_custom_if_needed() {
build_image_path=$(get_image_path) build_image_path=$(get_image_path)
build_image_tag=$(get_image_tag) build_image_tag=$(get_image_tag)
echo "Building image $build_image_tag"
full_image_name="$build_image_path:$build_image_tag" full_image_name="$build_image_path:$build_image_tag"
echo "Building image $full_image_name"
docker_command=$(generate_command $@ --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from="$full_image_name" -t "$full_image_name") docker_command=$(generate_command $@ --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from="$full_image_name" -t "$full_image_name")
echo "Docker command:" echo "Docker command:"
printf "\t%s" "$docker_command" printf "\t%s" "$docker_command"
eval $docker_command eval $docker_command
printf "\n\nSUCCESS - Successfully built:\n\t%s" "$build_image_tag" printf "\n\nSUCCESS - Successfully built:\n\t%s" "$full_image_name"
} }
build_custom_if_needed $@ build_custom_if_needed $@

View file

@ -1,5 +1,5 @@
PATH_TOOLS=() PATH_TOOLS=(DEBIAN RUBY GOLANG NODE POSTGRESQL)
TAG_TOOLS=(DEBIAN RUBY BUNDLER GOLANG GIT LFS CHROME NODE YARN POSTGRESQL GRAPHICSMAGICK PGBOUNCER BAZELISK DOCKER GCLOUD KUBECTL) TAG_TOOLS=(BUNDLER GIT LFS CHROME YARN GRAPHICSMAGICK PGBOUNCER BAZELISK DOCKER GCLOUD KUBECTL)
function get_image_path() { function get_image_path() {
local path local path