Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ workflows:
<<: *not-on-integ-branch
- platforms-build:
context: common
<<: *on-integ-and-version-tags
<<: *not-on-integ-branch
Comment thread
rafie marked this conversation as resolved.
Resolved
matrix:
parameters:
platform: [focal, bionic, xenial, centos8, centos7, bullseye]
Expand Down
71 changes: 71 additions & 0 deletions build/platforms/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# BUILD redisfab/rejson:${VERSION}-${ARCH}-${OSNICK}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is temporary, but it still makes me sad. I can't wait for you to release!


ARG REDIS_VER=6.2.5

# OSNICK=focal|bionic|xenial|bullseye|centos8|centos7
ARG OSNICK=bullseye

# OS=debian:bullseye-slim|ubuntu:bionic|centos:7
ARG OS=debian:bullseye-slim

# ARCH=x64|arm64v8|arm32v7
ARG ARCH=x64

ARG PACK=0
ARG TEST=0

#----------------------------------------------------------------------------------------------
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK} AS redis
FROM ${OS} AS builder

ARG OSNICK
ARG OS
ARG ARCH
ARG REDIS_VER
ARG PACK
ARG TEST

RUN echo "Building for ${OSNICK} (${OS}) for ${ARCH} [with Redis ${REDIS_VER}]"

WORKDIR /build
COPY --from=redis /usr/local/ /usr/local/

ADD . /build

RUN ./deps/readies/bin/getupdates
RUN ./deps/readies/bin/getpy3
RUN ./system-setup.py

RUN bash -l -c make

RUN mkdir -p bin/artifacts
RUN set -e ;\
if [ "$PACK" = "1" ]; then bash -l -c "make pack"; fi
RUN set -e ;\
if [ "$TEST" = "1" ]; then \
bash -l -c "TEST= make test" ;\
cd /build/tests/pytest/logs ;\
rm -f *.aof *.rdb ;\
tar -czf /build/bin/artifacts/pytest-logs-${ARCH}-${OSNICK}.tgz . ;\
fi

#----------------------------------------------------------------------------------------------
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK}

ARG REDIS_VER
ARG OSNICK
ARG ARCH

ENV LIBDIR /usr/lib/redis/modules
WORKDIR /data
RUN mkdir -p "$LIBDIR"

RUN mkdir -p /var/opt/redislabs/artifacts
RUN chown -R redis:redis /var/opt/redislabs
COPY --from=builder /build/bin/artifacts/ /var/opt/redislabs/artifacts
RUN true
COPY --from=builder /build/target/release/rejson.so "$LIBDIR"

EXPOSE 6379
CMD ["redis-server", \
"--loadmodule", "/usr/lib/redis/modules/rejson.so"]
2 changes: 2 additions & 0 deletions build/platforms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ROOT=../..
MK.pyver:=3
include $(ROOT)/deps/readies/mk/main

DOCKERFILE_STEM=$(ROOT)/build/platforms/Dockerfile

# OSNICK=bullseye|bionic|xenial|centos7|centos8
OSNICK ?= bullseye

Expand Down
5 changes: 2 additions & 3 deletions sbin/get-redisearch
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ else
fi

dist="$($READIES/bin/platform --dist)"
nick="$($READIES/bin/platform --osnick)"

[[ $os == linux ]] && os=Linux
[[ $arch == x64 ]] && arch=x86_64

if [[ -n $OSNICK ]]; then
nick="$OSNICK"
elif [[ $dist == ubuntu ]]; then
if [[ $dist == ubuntu ]]; then
if [[ $nick == focal ]]; then
nick="ubuntu20.04"
elif [[ $nick == bionic ]]; then
Expand Down