From 7f40c70b9c702a813d9059ab479641ebac30ecd6 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 4 Feb 2023 13:01:11 -0300 Subject: [PATCH] feat: send log to gitea sutty/gems#2 --- Dockerfile | 2 +- bulk-compiler.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 63a0fbc..a4f22f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,6 @@ COPY ./os-version.sh /usr/local/bin/os-version RUN install -dm 2750 -o builder -g builder /srv/gems VOLUME /srv/gems -RUN apk add --no-cache su-exec libc6-compat libstdc++ openssh-client +RUN apk add --no-cache su-exec libc6-compat libstdc++ openssh-client tea ENTRYPOINT /bin/sh diff --git a/bulk-compiler.sh b/bulk-compiler.sh index 050f9ba..ae83bd2 100755 --- a/bulk-compiler.sh +++ b/bulk-compiler.sh @@ -33,6 +33,8 @@ find build/ -type f | grep -v /.keep | nl | set +e + echo '```' > build_log + HTTP_BASIC_USER="${HTTP_BASIC_USER}" \ HTTP_BASIC_PASSWORD="${HTTP_BASIC_PASSWORD}" \ SUTTY="${SUTTY}" \ @@ -42,11 +44,15 @@ find build/ -type f | grep -v /.keep | nl | EXTRA_PKGS="${EXTRA_PKGS}" \ EXTRA_GEMS="${EXTRA_GEMS}" \ GEM_COMPILER_FLAGS="${GEM_COMPILER_FLAGS}" \ - /usr/local/bin/bootstrap + /usr/local/bin/bootstrap 2>&1 | tee -a build_log + + echo '```' >> build_log if test $? -ne 0 ; then BUILT="${FAILED}" echo "not ok ${NUMBER} - ${GEM_NAME} ${GEM_VERSION} build failed" + + tea issue create -t "${GEM_NAME} ${GEM_VERSION} build failed" -d "$(cat build_log)" fi set -e