From 3feb6b035875062966b16430ee02c64e8454b9a9 Mon Sep 17 00:00:00 2001 From: Konrad Botor <kbotor@syncad.com> Date: Wed, 15 May 2024 10:53:03 +0200 Subject: [PATCH] Moved PostgREST installation step from instance to runtime to make it available in CI --- .gitlab-ci.yaml | 4 ++-- Dockerfile | 3 ++- scripts/ci/build_ci_base_image.sh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml index 805042bf9..07c221365 100644 --- a/.gitlab-ci.yaml +++ b/.gitlab-ci.yaml @@ -321,7 +321,7 @@ cleanup_haf_cache_manual: download_await: extends: .job-defaults - image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-4 + image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-5 stage: prepare variables: GIT_STRATEGY: none @@ -412,7 +412,7 @@ sync: - data-cache-storage e2e_benchmark: - image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-4 + image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-5 stage: benchmark interruptible: true needs: diff --git a/Dockerfile b/Dockerfile index 4f54261b8..d90267239 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,8 @@ RUN <<EOF useradd -ms /bin/bash -c "Hivemind service account" -u 1000 "hivemind" --groups users EOF +COPY --chmod=755 --from=pure_postgrest /bin/postgrest /usr/local/bin + SHELL ["/bin/bash", "-c"] FROM runtime AS ci-base-image @@ -120,7 +122,6 @@ WORKDIR /home/hivemind SHELL ["/bin/bash", "-c"] -COPY --chmod=755 --from=pure_postgrest /bin/postgrest /usr/local/bin COPY --from=builder --chown=hivemind:hivemind /home/hivemind/app/dist /home/hivemind/dist COPY --from=builder --chown=hivemind:hivemind /home/hivemind/.hivemind-venv /home/hivemind/.hivemind-venv COPY --from=builder --chown=hivemind:hivemind /home/hivemind/app/docker/docker_entrypoint.sh . diff --git a/scripts/ci/build_ci_base_image.sh b/scripts/ci/build_ci_base_image.sh index b86cab3f8..e97d7c114 100755 --- a/scripts/ci/build_ci_base_image.sh +++ b/scripts/ci/build_ci_base_image.sh @@ -10,7 +10,7 @@ cat <<EOF Options: --registry=URL Registry to use as a part of image names (default: registry.gitlab.syncad.com/hive/hivemind) - --tag=TAG Image tag (default: python-3.8-slim-4) + --tag=TAG Image tag (default: python-3.8-slim-5) EOF } @@ -21,7 +21,7 @@ function image-exists() { } REGISTRY=${REGISTRY:-"registry.gitlab.syncad.com/hive/hivemind"} -CI_IMAGE_TAG=${CI_IMAGE_TAG:-"python-3.8-slim-4"} +CI_IMAGE_TAG=${CI_IMAGE_TAG:-"python-3.8-slim-5"} while [ $# -gt 0 ]; do case "$1" in -- GitLab