Skip to content

Commit

Permalink
# This is a combination of 186 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

various improvements

# This is the commit message #2:

new hash

# This is the commit message #3:

fix for script path

# This is the commit message #4:

fixes

# This is the commit message #5:

fixes

# This is the commit message #6:

fixes

# This is the commit message #7:

fixes

# This is the commit message #8:

fixes

# This is the commit message #9:

fixes

# This is the commit message #10:

fixes

# This is the commit message boscore#11:

fixes

# This is the commit message boscore#12:

fixes

# This is the commit message boscore#13:

fixes

# This is the commit message boscore#14:

fixes

# This is the commit message boscore#15:

fixes

# This is the commit message boscore#16:

fixes

# This is the commit message boscore#17:

fixes

# This is the commit message boscore#18:

fixes

# This is the commit message boscore#19:

fixes

# This is the commit message boscore#20:

fixes

# This is the commit message boscore#21:

fixes

# This is the commit message boscore#22:

fixes

# This is the commit message boscore#23:

fixes

# This is the commit message boscore#24:

fixes

# This is the commit message boscore#25:

fixes

# This is the commit message boscore#26:

testing

# This is the commit message boscore#27:

testing

# This is the commit message boscore#28:

testing

# This is the commit message boscore#29:

testing

# This is the commit message boscore#30:

testing

# This is the commit message boscore#31:

testing

# This is the commit message boscore#32:

testing

# This is the commit message boscore#33:

testing

# This is the commit message boscore#34:

testing

# This is the commit message boscore#35:

testing

# This is the commit message boscore#36:

testing

# This is the commit message boscore#37:

testing

# This is the commit message boscore#38:

testing

# This is the commit message boscore#39:

testing

# This is the commit message boscore#40:

testing

# This is the commit message boscore#41:

testing

# This is the commit message boscore#42:

testing

# This is the commit message boscore#43:

testing

# This is the commit message boscore#44:

fixes

# This is the commit message boscore#45:

fixes

# This is the commit message boscore#46:

fixes

# This is the commit message boscore#47:

fixes

# This is the commit message boscore#48:

fixes

# This is the commit message boscore#49:

fixes

# This is the commit message boscore#50:

fixes

# This is the commit message boscore#51:

fixes

# This is the commit message boscore#52:

fixes

# This is the commit message boscore#53:

fixes

# This is the commit message boscore#54:

fixes

# This is the commit message boscore#55:

fixes

# This is the commit message boscore#56:

fixes

# This is the commit message boscore#57:

fixes

# This is the commit message boscore#58:

fixes

# This is the commit message boscore#59:

fixes

# This is the commit message boscore#60:

fixes

# This is the commit message boscore#61:

fixes

# This is the commit message boscore#62:

fixes

# This is the commit message boscore#63:

fixes

# This is the commit message boscore#64:

fixes

# This is the commit message boscore#65:

fixes

# This is the commit message boscore#66:

fixes

# This is the commit message boscore#67:

fixes

# This is the commit message boscore#68:

fixes

# This is the commit message boscore#69:

fixes

# This is the commit message boscore#70:

fixes

# This is the commit message boscore#71:

fixes

# This is the commit message boscore#72:

fixes

# This is the commit message boscore#73:

fixes

# This is the commit message boscore#74:

fixes

# This is the commit message boscore#75:

fixes

# This is the commit message boscore#76:

fixes

# This is the commit message boscore#77:

fixes

# This is the commit message boscore#78:

fixes

# This is the commit message boscore#79:

more testing

# This is the commit message boscore#80:

testing

# This is the commit message boscore#81:

fixes

# This is the commit message boscore#82:

fixes

# This is the commit message boscore#83:

fixes

# This is the commit message boscore#84:

fixes

# This is the commit message boscore#85:

fixes

# This is the commit message boscore#86:

fixes

# This is the commit message boscore#87:

fixes

# This is the commit message boscore#88:

fixes

# This is the commit message boscore#89:

fixes

# This is the commit message boscore#90:

fixes

# This is the commit message boscore#91:

fixes

# This is the commit message boscore#92:

fixes

# This is the commit message boscore#93:

propagate-environment for buildkite-agent

# This is the commit message boscore#94:

propagate-environment for buildkite-agent

# This is the commit message boscore#95:

propagate-environment for buildkite-agent

# This is the commit message boscore#96:

propagate-environment for buildkite-agent

# This is the commit message boscore#97:

fixes

# This is the commit message boscore#98:

fixes

# This is the commit message boscore#99:

fixes

# This is the commit message boscore#100:

fixes

# This is the commit message boscore#101:

fixes

# This is the commit message boscore#102:

fixes

# This is the commit message boscore#103:

fixes

# This is the commit message boscore#104:

fixes

# This is the commit message boscore#105:

fixes

# This is the commit message boscore#106:

fixes

# This is the commit message boscore#107:

fixes

# This is the commit message boscore#108:

fixes

# This is the commit message boscore#109:

fixes

# This is the commit message boscore#110:

fixes

# This is the commit message boscore#111:

fixes

# This is the commit message boscore#112:

fixes

# This is the commit message boscore#113:

fixes

# This is the commit message boscore#114:

fixes

# This is the commit message boscore#115:

fixes

# This is the commit message boscore#116:

fixes

# This is the commit message boscore#117:

fixes

# This is the commit message boscore#118:

fixes

# This is the commit message boscore#119:

fixes

# This is the commit message boscore#120:

fixes

# This is the commit message boscore#121:

fixes

# This is the commit message boscore#122:

fixes

# This is the commit message boscore#123:

fixes

# This is the commit message boscore#124:

fixes

# This is the commit message boscore#125:

fixes

# This is the commit message boscore#126:

fixes

# This is the commit message boscore#127:

fixes

# This is the commit message boscore#128:

fixes

# This is the commit message boscore#129:

fixes

# This is the commit message boscore#130:

fixes

# This is the commit message boscore#131:

fixes

# This is the commit message boscore#132:

fixes

# This is the commit message boscore#133:

fixes

# This is the commit message boscore#134:

fixes

# This is the commit message boscore#135:

fixes

# This is the commit message boscore#136:

fixes

# This is the commit message boscore#137:

fixes

# This is the commit message boscore#138:

fixes

# This is the commit message boscore#139:

fixes

# This is the commit message boscore#140:

fixes

# This is the commit message boscore#141:

fixes

# This is the commit message boscore#142:

fixes

# This is the commit message boscore#143:

fixes

# This is the commit message boscore#144:

fixes

# This is the commit message boscore#145:

fixes

# This is the commit message boscore#146:

fixes

# This is the commit message boscore#147:

fixes

# This is the commit message boscore#148:

fixes

# This is the commit message boscore#149:

fixes

# This is the commit message boscore#150:

fixes

# This is the commit message boscore#151:

fixes

# This is the commit message boscore#152:

fixes

# This is the commit message boscore#153:

testing

# This is the commit message boscore#154:

fixes

# This is the commit message boscore#155:

fixes

# This is the commit message boscore#156:

fixes

# This is the commit message boscore#157:

fixes

# This is the commit message boscore#158:

fixes

# This is the commit message boscore#159:

fixes

# This is the commit message boscore#160:

fixes

# This is the commit message boscore#161:

fixes

# This is the commit message boscore#162:

fixes

# This is the commit message boscore#163:

fixes

# This is the commit message boscore#164:

fixes

# This is the commit message boscore#165:

fixes

# This is the commit message boscore#166:

fixes

# This is the commit message boscore#167:

fixes

# This is the commit message boscore#168:

fixes

# This is the commit message boscore#169:

fixes

# This is the commit message boscore#170:

fixes

# This is the commit message boscore#171:

fixes

# This is the commit message boscore#172:

fixes

# This is the commit message boscore#173:

fixes

# This is the commit message boscore#174:

fixes

# This is the commit message boscore#175:

fixes

# This is the commit message boscore#176:

fixes

# This is the commit message boscore#177:

fixes

# This is the commit message boscore#178:

fixes

# This is the commit message boscore#179:

fixes

# This is the commit message EOSIO#180:

fixes

# This is the commit message EOSIO#181:

fixes

# This is the commit message EOSIO#182:

fixes

# This is the commit message EOSIO#183:

fixes

# This is the commit message EOSIO#184:

fixes

# This is the commit message EOSIO#185:

fixes

# This is the commit message EOSIO#186:

fixes
  • Loading branch information
Nathan Pierce committed Jul 30, 2019
1 parent b912e52 commit 6c09577
Show file tree
Hide file tree
Showing 18 changed files with 768 additions and 73 deletions.
14 changes: 6 additions & 8 deletions .cicd/.helpers
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ VERBOSE=${VERBOSE:-true}
export PROJECT_NAME="eosio"

# Set IMAGE_TAG using arg (generate-base-images.sh) or env (travis.yml)
( [[ $(uname) != 'Darwin' ]] && [[ -z $IMAGE_TAG ]] && [[ -z $1 ]] ) && echo "You must provide the distro IMAGE_TAG name (example: ubuntu-18.04) as argument \$1 or set it within your ENV" && exit 1
export IMAGE_TAG=${IMAGE_TAG:-$1}

function execute() {
$VERBOSE && echo "--- Executing: $@"
$DRYRUN || "$@"
${VERBOSE:-true} && echo "--- Executing: $@"
${DRYRUN:-false} || "$@"
}

function determine-hash() {
Expand All @@ -29,10 +28,8 @@ function determine-hash() {
function generate_docker_image() {
# If we cannot pull the image, we build and push it first.
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
cd ./.cicd
docker build -t $FULL_TAG -f ./${IMAGE_TAG}.dockerfile .
docker build -t $FULL_TAG -f ./docker/${IMAGE_TAG}.dockerfile .
docker push $FULL_TAG
cd -
}

function docker_tag_exists() {
Expand All @@ -42,8 +39,9 @@ function docker_tag_exists() {
( [[ $EXISTS =~ '404 page not found' ]] || [[ $EXISTS =~ 'manifest unknown' ]] ) && return 1 || return 0
}

if [[ $(uname) != 'Darwin' ]]; then # Darwin doesn't need hash (yet)
determine-hash ".cicd/${IMAGE_TAG}.dockerfile"
# If you're on mac and you want to generate the image, use "force" as $2
if [[ ! -z $IMAGE_TAG ]]; then # Darwin doesn't need hash (yet)
determine-hash "docker/${IMAGE_TAG}.dockerfile"
[[ -z $DETERMINED_HASH ]] && echo "DETERMINED_HASH empty! (check determine-hash function)" && exit 1
export FULL_TAG="eosio/producer:${PROJECT_NAME}-$HASHED_IMAGE_TAG"
fi
8 changes: 8 additions & 0 deletions .cicd/docker/.helpers-v33
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function fold-execute() {
${TRAVIS:-false} && echo -en "travis_fold:start:$(echo $@)\r" || true
echo "--- Executing: $@"
"$@"
rcode=$?
[ $rcode -eq 0 ] || exit $rcode
${TRAVIS:-false} && echo -en "travis_fold:end:$(echo $@)\r" || true
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,23 @@ ENV PATH=${PATH}:/mongodb-linux-x86_64-amazon-3.6.3/bin
RUN curl -LO http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/c/ccache-3.3.4-1.el7.x86_64.rpm \
&& yum install -y ccache-3.3.4-1.el7.x86_64.rpm

# Install Buildkite Agent
RUN echo -e "[buildkite-agent]\nname = Buildkite Pty Ltd\nbaseurl = https://yum.buildkite.com/buildkite-agent/stable/x86_64/\nenabled=1\ngpgcheck=0\npriority=1" > /etc/yum.repos.d/buildkite-agent.repo && \
yum -y install buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="export PATH=/usr/lib64/ccache:$PATH &&"
ENV PRE_COMMANDS="export PATH=/usr/lib64/ccache:\$PATH"
ENV CMAKE_EXTRAS="-DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang'"

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
22 changes: 17 additions & 5 deletions .cicd/centos-7.dockerfile → .cicd/docker/centos-7.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN yum update -y \
&& yum --enablerepo=extras install -y which git autoconf automake libtool make bzip2 doxygen \
graphviz bzip2-devel openssl-devel gmp-devel ocaml libicu-devel \
python python-devel rh-python36 gettext-devel file libusbx-devel \
libcurl-devel patch
libcurl-devel patch

# Build appropriate version of CMake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz \
Expand Down Expand Up @@ -88,10 +88,22 @@ RUN cd /usr/lib64/ccache && ln -s ../../bin/ccache c++
## We need to tell ccache to actually use devtoolset-8 instead of the default system one (ccache resets anything set in PATH when it launches)
ENV CCACHE_PATH="/opt/rh/devtoolset-8/root/usr/bin"

# Install Buildkite Agent
RUN echo -e "[buildkite-agent]\nname = Buildkite Pty Ltd\nbaseurl = https://yum.buildkite.com/buildkite-agent/stable/x86_64/\nenabled=1\ngpgcheck=0\npriority=1" > /etc/yum.repos.d/buildkite-agent.repo && \
yum -y install buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python36/enable && export PATH=/usr/lib64/ccache:$PATH &&"
ENV PRE_COMMANDS="source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python36/enable && export PATH=/usr/lib64/ccache:\$PATH"

# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git automake \
libbz2-dev libssl-dev doxygen graphviz libgmp3-dev autotools-dev libicu-dev \
python2.7 python2.7-dev python3 python3-dev autoconf libtool curl zlib1g-dev \
sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config
sudo ruby libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config apt-transport-https

# Build appropriate version of CMake.
RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz \
Expand All @@ -20,10 +20,9 @@ RUN curl -LO https://cmake.org/files/v3.13/cmake-3.13.2.tar.gz \
# Build appropriate version of Clang.
RUN mkdir -p /root/tmp && cd /root/tmp && git clone --single-branch --branch release_80 https://git.llvm.org/git/llvm.git clang8 && cd clang8 && git checkout 18e41dc && cd tools && git clone --single-branch --branch release_80 https://git.llvm.org/git/lld.git && cd lld && git checkout d60a035 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/polly.git && cd polly && git checkout 1bc06e5 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/clang.git clang && cd clang && git checkout a03da8b && cd tools && mkdir extra && cd extra && git clone --single-branch --branch release_80 https://git.llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && git checkout 6b34834 && cd .. && cd ../../../../projects && git clone --single-branch --branch release_80 https://git.llvm.org/git/libcxx.git && cd libcxx && git checkout 1853712 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/libcxxabi.git && cd libcxxabi && git checkout d7338a4 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/libunwind.git && cd libunwind && git checkout 57f6739 && cd ../ && git clone --single-branch --branch release_80 https://git.llvm.org/git/compiler-rt.git && cd compiler-rt && git checkout 5bc7979 && cd ../ && cd /root/tmp/clang8 && mkdir build && cd build && cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr/local' -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_DOCS=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all -DCMAKE_BUILD_TYPE=Release .. && make -j$(nproc) && make install \
&& cd / && rm -rf /root/tmp/clang8
COPY ./docker/pinned_toolchain.cmake /tmp/pinned_toolchain.cmake

COPY ./pinned_toolchain.cmake /tmp/pinned_toolchain.cmake

# # Build appropriate version of LLVM.
# Build appropriate version of LLVM.
RUN git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git llvm \
&& cd llvm \
&& mkdir build \
Expand Down Expand Up @@ -83,11 +82,23 @@ RUN curl -LO https://github.com/ccache/ccache/releases/download/v3.4.1/ccache-3.
&& make install \
&& cd / && rm -rf ccache-3.4.1/

RUN echo "deb https://apt.buildkite.com/buildkite-agent stable main" > /etc/apt/sources.list.d/buildkite-agent.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \
&& apt-get update && apt-get install -y buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:$PATH &&"
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:\$PATH"
ENV CMAKE_EXTRAS="$CMAKE_EXTRAS -DCMAKE_TOOLCHAIN_FILE='/tmp/pinned_toolchain.cmake' -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,23 @@ RUN curl -L https://github.com/mongodb/mongo-cxx-driver/archive/r3.4.0.tar.gz -o

ENV PATH=${PATH}:/mongodb-linux-x86_64-ubuntu1804-4.1.1/bin

RUN echo "deb https://apt.buildkite.com/buildkite-agent stable main" > /etc/apt/sources.list.d/buildkite-agent.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 \
&& apt-get update && apt-get install -y apt-transport-https && apt-get install -y buildkite-agent

# PRE_COMMANDS: Executed pre-cmake
# CMAKE_EXTRAS: Executed right before the cmake path (on the end)
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:$PATH &&"
ENV PRE_COMMANDS="export PATH=/usr/lib/ccache:\$PATH"
ENV CMAKE_EXTRAS="-DCMAKE_CXX_COMPILER='clang++' -DCMAKE_C_COMPILER='clang'"

CMD bash -c "$PRE_COMMANDS ccache -s && \
mkdir /workdir/build && cd /workdir/build && cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && make -j $(getconf _NPROCESSORS_ONLN) && \
ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test"
# Bring in helpers that provides execute function so we can get better logging in BK and TRAV
COPY ./docker/.helpers-v33 /tmp/.helpers

CMD bash -c ". /tmp/.helpers && $PRE_COMMANDS && \
fold-execute ccache -s && \
mkdir /workdir/build && cd /workdir/build && fold-execute cmake -DCMAKE_BUILD_TYPE='Release' -DCORE_SYMBOL_NAME='SYS' -DOPENSSL_ROOT_DIR='/usr/include/openssl' -DBUILD_MONGO_DB_PLUGIN=true $CMAKE_EXTRAS /workdir && \
fold-execute make -j $(getconf _NPROCESSORS_ONLN) && \
if ${ENABLE_PARALLEL_TESTS:-true}; then fold-execute ctest -j$(getconf _NPROCESSORS_ONLN) -LE _tests --output-on-failure -T Test; fi && \
if ${ENABLE_SERIAL_TESTS:-true}; then mkdir -p ./mongodb && fold-execute mongod --dbpath ./mongodb --fork --logpath mongod.log && fold-execute ctest -L nonparallelizable_tests --output-on-failure -T Test; fi && \
if ${ENABLE_LR_TESTS:-false}; then fold-execute ctest -L long_running_tests --output-on-failure -T Test; fi && \
if ! ${TRAVIS:-false}; then cd .. && tar -pczf build.tar.gz build && buildkite-agent artifact upload build.tar.gz --agent-access-token $BUILDKITE_AGENT_ACCESS_TOKEN; fi"
5 changes: 3 additions & 2 deletions .cicd/generate-base-images.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail
cd $( dirname "${BASH_SOURCE[0]}" )/.. # Ensure we're in the repo root and not inside of scripts
. ./.cicd/.helpers
cd $( dirname "${BASH_SOURCE[0]}" ) # Ensure we're in the .cicd dir
. ./.helpers
( [[ -z $IMAGE_TAG ]] && [[ -z $1 ]] ) && echo "You must provide the distro IMAGE_TAG name (example: ubuntu-18.04) as argument \$1 or set it within your ENV" && exit 1
echo "Looking for $FULL_TAG"
docker_tag_exists $FULL_TAG && echo "$FULL_TAG already exists" || generate_docker_image
Loading

0 comments on commit 6c09577

Please sign in to comment.