diff --git a/docker/test/codebrowser/Dockerfile b/docker/test/codebrowser/Dockerfile index 20c39646af5..db30397ab2e 100644 --- a/docker/test/codebrowser/Dockerfile +++ b/docker/test/codebrowser/Dockerfile @@ -26,20 +26,5 @@ RUN git clone --depth=1 https://github.com/ClickHouse/woboq_codebrowser /woboq_c && cmake . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang\+\+-${LLVM_VERSION} -DCMAKE_C_COMPILER=clang-${LLVM_VERSION} -DCLANG_BUILTIN_HEADERS_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/include \ && ninja -ENV CODEGEN=/woboq_codebrowser/generator/codebrowser_generator -ENV CODEINDEX=/woboq_codebrowser/indexgenerator/codebrowser_indexgenerator -ENV STATIC_DATA=/woboq_codebrowser/data - -ENV SOURCE_DIRECTORY=/repo_folder -ENV BUILD_DIRECTORY=/build -ENV HTML_RESULT_DIRECTORY=$BUILD_DIRECTORY/html_report -ENV SHA=nosha -ENV DATA="https://s3.amazonaws.com/clickhouse-test-reports/codebrowser/data" - -CMD mkdir -p $BUILD_DIRECTORY && cd $BUILD_DIRECTORY && \ - cmake $SOURCE_DIRECTORY -DCMAKE_CXX_COMPILER=/usr/bin/clang\+\+-${LLVM_VERSION} -DCMAKE_C_COMPILER=/usr/bin/clang-${LLVM_VERSION} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_S3=0 && \ - mkdir -p $HTML_RESULT_DIRECTORY && \ - $CODEGEN -b $BUILD_DIRECTORY -a -o $HTML_RESULT_DIRECTORY -p ClickHouse:$SOURCE_DIRECTORY:$SHA -d $DATA | ts '%Y-%m-%d %H:%M:%S' && \ - cp -r $STATIC_DATA $HTML_RESULT_DIRECTORY/ &&\ - $CODEINDEX $HTML_RESULT_DIRECTORY -d "$DATA" | ts '%Y-%m-%d %H:%M:%S' && \ - mv $HTML_RESULT_DIRECTORY /test_output +COPY build.sh / +CMD ["bash", "-c", "/build.sh 2>&1"] diff --git a/docker/test/codebrowser/build.sh b/docker/test/codebrowser/build.sh new file mode 100755 index 00000000000..e673cba95c7 --- /dev/null +++ b/docker/test/codebrowser/build.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -x -e + + +STATIC_DATA=${STATIC_DATA:-/woboq_codebrowser/data} +SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-/repo_folder} +BUILD_DIRECTORY=${BUILD_DIRECTORY:-/build} +HTML_RESULT_DIRECTORY=${HTML_RESULT_DIRECTORY:-$BUILD_DIRECTORY/html_report} +SHA=${SHA:-nosha} +DATA=${DATA:-https://s3.amazonaws.com/clickhouse-test-reports/codebrowser/data} + +mkdir -p "$BUILD_DIRECTORY" && cd "$BUILD_DIRECTORY" +cmake "$SOURCE_DIRECTORY" -DCMAKE_CXX_COMPILER="/usr/bin/clang++-${LLVM_VERSION}" -DCMAKE_C_COMPILER="/usr/bin/clang-${LLVM_VERSION}" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_S3=0 +mkdir -p "$HTML_RESULT_DIRECTORY" +/woboq_codebrowser/generator/codebrowser_generator -b "$BUILD_DIRECTORY" -a \ + -o "$HTML_RESULT_DIRECTORY" --execute-concurrency=0 -p "ClickHouse:$SOURCE_DIRECTORY:$SHA" \ + -d "$DATA" | ts '%Y-%m-%d %H:%M:%S' +cp -r "$STATIC_DATA" "$HTML_RESULT_DIRECTORY/" +/woboq_codebrowser/indexgenerator/codebrowser_indexgenerator "$HTML_RESULT_DIRECTORY" \ + -d "$DATA" | ts '%Y-%m-%d %H:%M:%S' +mv "$HTML_RESULT_DIRECTORY" /test_output