Skip to content
Closed
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
17 changes: 8 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,21 +175,19 @@ commands:
name: Build for platform
command: |
ROOT=$PWD
cd build/platforms
make build OSNICK="<<parameters.platform>>" VERSION=$CIRCLE_TAG BRANCH=$CIRCLE_BRANCH ARTIFACTS=1 TEST=1 SHOW=1
make -C build/docker build DOCKER_SUFFIX=".<<parameters.platform>>" OSNICK=<<parameters.platform>> PACK=1 TEST=1 VERBOSE=1
cd $ROOT
mkdir -p tests/pytest/logs
tar -C tests/pytest/logs -xzf bin/artifacts/pytest-logs*.tgz
timeout: 60m
no_output_timeout: 30m
- save-tests-logs
- early-return-for-forked-pull-requests
- run:
name: Build for platform (publish)
command: |
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
cd build/platforms
make publish OSNICK="<<parameters.platform>>" VERSION=$CIRCLE_TAG BRANCH=$CIRCLE_BRANCH OFFICIAL=0 SHOW=1 VERBOSE=1
# - run:
# name: Build for platform (publish)
# command: |
# docker login -u redisfab -p $DOCKER_REDISFAB_PWD
# make -C build/docker build DOCKER_SUFFIX=".<<parameters.platform>>" OSNICK=<<parameters.platform>> PACK=1 TEST=1 VERBOSE=1 PUBLISH=1 DOCKERWRAPPER_EXTRA_VARS="DOCKER_PUSH_ONLY=1"
- persist-artifacts

benchmark-steps:
Expand Down Expand Up @@ -382,7 +380,8 @@ workflows:
<<: *not-on-integ-branch
- platforms-build:
context: common
<<: *on-integ-and-version-tags
# <<: *on-integ-and-version-tags
<<: *on-any-branch
matrix:
parameters:
platform: [focal, bionic, xenial, centos8, centos7, bullseye]
Expand Down
67 changes: 0 additions & 67 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pack:
#----------------------------------------------------------------------------------------------

docker:
docker build --pull -t rejson:latest .
@$(MAKE) -C ./build/docker

docker_push:
docker push redislabs/rejson:latest
Expand Down
9 changes: 9 additions & 0 deletions build/docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
REDIS_VERSION=6.2.5
PRODUCT=rejson

OSNICK ?= bullseye
OSNICK_OFFICIAL=bullseye

ROOT=../../
READIES=${ROOT}/deps/readies
include ${READIES}/mk/docker.rules
43 changes: 43 additions & 0 deletions build/docker/dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ARG REDIS_VER={{REDIS_VERSION}}

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

#----------------------------------------------------------------------------------------------
FROM redisfab/redis:{{REDIS_VERSION}}-{{REDIS_ARCH}}-{{REDIS_OSNICK}} AS redis
FROM {{REDIS_OS}} AS builder

RUN echo "Building for {{REDIS_OSNICK}} ({{REDIS_OS}}) for {{REDIS_ARCH}} [with Redis {{REDIS_VERSION}}]"

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

ADD . /build

{% include 'setup_environment.yml' %}
RUN ./system-setup.py

RUN bash -l -c make

RUN mkdir -p bin/artifacts
{% if REDIS_PACK == "1" %}
RUN bash -e -l -c "make pack"
{% endif %}

{% if REDIS_TEST == "1" %}
RUN set -e ;\
bash -l -c "TEST= make test" ;\
cd /build/tests/pytest/logs ;\
rm -f *.aof *.rdb ;\
tar -czf /build/bin/artifacts/pytest-logs-{{REDIS_ARCH}}-{{REDIS_OSNICK}}.tgz .
{% endif %}

#----------------------------------------------------------------------------------------------
{% with redis_module="rejson.so", redis_module_srcpath="/build/target/release/rejson.so" %}
{% set redis_docker_extra_content ="
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
" %}
{% include "redis_docker.yml" %}
{% endwith %}
18 changes: 0 additions & 18 deletions build/platforms/Makefile

This file was deleted.