chore: fix our release pipeline (#2408)

* chore: fix our release pipeline

Also remove alpine prod.wip file that has not been used and unlikely will be for prod.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-01-14 17:31:59 +02:00 committed by GitHub
parent 7054fc56b1
commit b3e0722d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 45 deletions

View File

@ -101,7 +101,7 @@ jobs:
run: |
cd ${GITHUB_WORKSPACE}/build
echo Run ctest -V -L DFLY
GLOG_logtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY
GLOG_alsologtostderr=1 GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY
echo "Running tests with --force_epoll"
@ -114,7 +114,7 @@ jobs:
EOF
gdb -ix ./init.gdb --batch -ex r --args ./dragonfly_test --force_epoll
FLAGS_force_epoll=true ctest -V -L DFLY
FLAGS_force_epoll=true GLOG_vmodule=rdb_load=1,rdb_save=1,snapshot=1 ctest -V -L DFLY
echo "Finished running tests with --force_epoll"
@ -128,6 +128,12 @@ jobs:
./multi_test --multi_exec_mode=1
./multi_test --multi_exec_mode=3
# GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: unit_logs
path: /tmp/*INFO*
- name: Run regression tests
if: matrix.container == 'ubuntu-dev:20'
uses: ./.github/actions/regression-tests

View File

@ -2134,9 +2134,10 @@ error_code RdbLoaderBase::EnsureReadInternal(size_t min_sz) {
}
io::Result<size_t> res = src_->ReadAtLeast(out_buf, min_sz);
if (!res)
if (!res) {
VLOG(1) << "Error reading from source: " << res.error() << " " << min_sz << " bytes";
return res.error();
}
if (*res < min_sz)
return RdbError(errc::rdb_file_corrupted);

View File

@ -19,15 +19,15 @@ WORKDIR /build
COPY . ./
RUN make HELIO_RELEASE=y release
RUN make release
RUN build-opt/dragonfly --version
RUN build-release/dragonfly --version
FROM alpine:3
COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh
COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/
COPY --from=builder /build/build-release/dragonfly /usr/local/bin/
RUN apk --no-cache add libgcc libstdc++ \
su-exec netcat-openbsd boost-context && ldd /usr/local/bin/dragonfly

View File

@ -1,35 +0,0 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/romange/alpine-dev as builder
WORKDIR /build
COPY src/ ./src/
COPY helio/ ./helio/
COPY patches/ ./patches/
COPY CMakeLists.txt ./
RUN ./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON
WORKDIR build-opt
RUN ninja dragonfly
FROM alpine:latest
RUN addgroup -S -g 1000 dfly && adduser -S -G dfly -u 999 dfly
RUN apk --no-cache add libgcc libstdc++ libunwind boost-context \
'su-exec>=0.2' netcat-openbsd openssl
RUN mkdir /data && chown dfly:dfly /data
VOLUME /data
WORKDIR /data
COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh
COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/
RUN dragonfly -version
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 6380
USER dfly
CMD ["dragonfly", "--logtostderr"]

View File

@ -5,9 +5,9 @@ WORKDIR /build
COPY . ./
RUN make HELIO_RELEASE=y release
RUN make release
RUN build-opt/dragonfly --version
RUN build-release/dragonfly --version
RUN curl -O https://raw.githubusercontent.com/ncopa/su-exec/212b75144bbc06722fbd7661f651390dc47a43d1/su-exec.c && \
gcc -Wall -O2 su-exec.c -o su-exec
@ -28,7 +28,7 @@ WORKDIR /data
COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY tools/docker/healthcheck.sh /usr/local/bin/healthcheck.sh
COPY --from=builder /build/su-exec /usr/local/bin/
COPY --from=builder /build/build-opt/dragonfly /usr/local/bin/
COPY --from=builder /build/build-release/dragonfly /usr/local/bin/
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh
ENTRYPOINT ["entrypoint.sh"]