diff --git a/images/.utils/gitlab-ci.yaml b/images/.utils/gitlab-ci.yaml index 0c3b8d4c7a4b65be098cff560b140b83cc744878..1274eef81cf67eb237b45438db310fb8d0f84199 100644 --- a/images/.utils/gitlab-ci.yaml +++ b/images/.utils/gitlab-ci.yaml @@ -15,7 +15,7 @@ container-build: - findmydevice-server - opentf - cowsay - - splio-vectorrs + - splio script: - cd images/${IMAGE} - | diff --git a/images/splio-vectorrs/.release b/images/splio-vectorrs/.release deleted file mode 100644 index 51cc74622cc09120ccb1cb514986c5e2f5b6af54..0000000000000000000000000000000000000000 --- a/images/splio-vectorrs/.release +++ /dev/null @@ -1 +0,0 @@ -release=2 diff --git a/images/splio/.release b/images/splio/.release new file mode 100644 index 0000000000000000000000000000000000000000..74692a587dd81f22ccbbaae9f7a69a23f0bac3e9 --- /dev/null +++ b/images/splio/.release @@ -0,0 +1 @@ +release=0 diff --git a/images/splio-vectorrs/Earthfile b/images/splio/Earthfile similarity index 54% rename from images/splio-vectorrs/Earthfile rename to images/splio/Earthfile index 85ce044d70fe7326a4c437a6144065c3c4ea0959..baa9ca7de49d4d107cf806d1625391a6d5b07781 100644 --- a/images/splio-vectorrs/Earthfile +++ b/images/splio/Earthfile @@ -1,21 +1,38 @@ VERSION 0.7 container: + BUILD +container-spilo + BUILD +container-pgvectors + +container-spilo: FROM ghcr.io/zalando/spilo-15:3.0-p1 - ARG registry=quay.io/shivering-isles/splio-vectorrs + ARG registry=quay.io/shivering-isles/splio COPY .release ./ + ENV PG_VERSION=$(pg_config --version | sed -e 's/PostgreSQL //' -e 's/\..*//') + ENV SI_REVISION=$(awk -F'=' '$1 == "release" {print $2}' .release) + ARG tag=$PG_VERSION-$(echo $PATRONIVERSION | cut -d'.' -f 1-2)-r$SI_REVISION + DO ../.utils/+LABEL --image=spilo --version=main + IF [ $latest = "true" ] + SAVE IMAGE --push ${registry}:latest + ELSE + LABEL "quay.expires-after"="12w" + END + SAVE IMAGE --push ${registry}:${tag} + +container-pgvectors: + FROM +container-spilo + ARG registry=quay.io/shivering-isles/splio # renovate: datasource=github-releases depName=tensorchord/pgvecto.rs ARG PG_VECTORS_VERSION=v0.2.0 - ENV PG_VERSION=$(pg_config --version | sed -e 's/PostgreSQL //' -e 's/\..*//') - ARG tag=$PG_VERSION-$(echo $PATRONIVERSION | cut -d'.' -f 1-2)-pg${PG_VECTORS_VERSION}-r$(awk -F'=' '$1 == "release" {print $2}' .release) + ARG tag=$PG_VERSION-$(echo $PATRONIVERSION | cut -d'.' -f 1-2)-pg${PG_VECTORS_VERSION}-r${SI_REVISION} ARG latest=false ARG VECTORS_DEB="./vectors-pg${PG_VERSION}_amd64.deb" RUN curl -L https://github.com/tensorchord/pgvecto.rs/releases/download/${PG_VECTORS_VERSION}/vectors-pg${PG_VERSION}_$(echo $PG_VECTORS_VERSION | sed -e 's/^v//')_amd64.deb > "$VECTORS_DEB" RUN apt install "$VECTORS_DEB" RUN rm "$VECTORS_DEB" - DO ../.utils/+LABEL --image=postfix --version=main + DO ../.utils/+LABEL --image=spilo --version=main IF [ $latest = "true" ] - SAVE IMAGE --push ${registry}:latest + SAVE IMAGE --push ${registry}:latest-pg${PG_VECTORS_VERSION} ELSE LABEL "quay.expires-after"="12w" END