Skip to content

Commit

Permalink
Docker image to build website in Jenkins (apache#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Aug 7, 2017
1 parent 517885e commit 9f64b8c
Show file tree
Hide file tree
Showing 186 changed files with 56 additions and 18,811 deletions.
22 changes: 21 additions & 1 deletion pulsar-client-cpp/docker/Dockerfile → build/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y maven tig g++ cmake libssl-dev libcurl4-openssl-dev \
liblog4cxx-dev libprotobuf-dev libboost-all-dev libgtest-dev \
libjsoncpp-dev libxml2-utils protobuf-compiler valgrind
libjsoncpp-dev libxml2-utils protobuf-compiler wget \
curl doxygen openjdk-8-jdk-headless

# Compile and install gtest
RUN cd /usr/src/gtest && cmake . && make && cp libgtest.a /usr/lib
Expand All @@ -31,3 +32,22 @@ RUN cd /usr/src/gtest && cmake . && make && cp libgtest.a /usr/lib
RUN git clone https://github.com/google/gtest-parallel.git

ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64

## Website build dependencies

# Install Ruby-2.4.1
RUN apt-get install -y
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \
(curl -sSL https://get.rvm.io | bash -s stable)
ENV PATH "$PATH:/usr/local/rvm/bin"
RUN rvm install 2.4.1

# Install PIP and PDoc
RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
RUN pip install pdoc

# Protogen doc generator
RUN wget https://github.com/pseudomuto/protoc-gen-doc/releases/download/v1.0.0-alpha/protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz && \
tar xvfz protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz && \
cp protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1/protoc-gen-doc /usr/local/bin && \
rm protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz
8 changes: 4 additions & 4 deletions pulsar-client-cpp/docker/README.md → build/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@


This folder contains a Docker image that can used to compile the Pulsar C++ client library
in a reproducible environment.
and website in a reproducible environment.

```shell
docker build -t pulsar-cpp-build .
docker build -t pulsar-build .
```

The image is already available at https://hub.docker.com/r/apachepulsar/pulsar-build-cpp/
The image is already available at https://hub.docker.com/r/apachepulsar/pulsar-build

Example: `apachepulsar/pulsar-build-cpp:ubuntu-16.04`
Example: `apachepulsar/pulsar-build:ubuntu-16.04`
2 changes: 1 addition & 1 deletion pulsar-client-cpp/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set -e
ROOT_DIR=$(git rev-parse --show-toplevel)
cd $ROOT_DIR/pulsar-client-cpp

BUILD_IMAGE_NAME="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-build-cpp}"
BUILD_IMAGE_NAME="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-build}"
BUILD_IMAGE_VERSION="${BUILD_IMAGE_VERSION:-ubuntu-16.04}"

IMAGE="$BUILD_IMAGE_NAME:$BUILD_IMAGE_VERSION"
Expand Down
2 changes: 1 addition & 1 deletion pulsar-client-cpp/docker-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set -e
ROOT_DIR=$(git rev-parse --show-toplevel)
cd $ROOT_DIR/pulsar-client-cpp

BUILD_IMAGE_NAME="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-build-cpp}"
BUILD_IMAGE_NAME="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-build}"
BUILD_IMAGE_VERSION="${BUILD_IMAGE_VERSION:-ubuntu-16.04}"

IMAGE="$BUILD_IMAGE_NAME:$BUILD_IMAGE_VERSION"
Expand Down
3 changes: 3 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ node_modules/
vendor/
api/admin/
api/client/
api/cpp
api/python
generated/
.sass-cache
_data/config/*.bak
_data/admin-rest-api-swagger.json
_data/protobuf.json
scripts/protoc-gen-doc
scripts/doxygen
1 change: 1 addition & 0 deletions site/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ exclude:
- package-lock.json
- Rakefile
- VERSIONS
- README.md
Loading

0 comments on commit 9f64b8c

Please sign in to comment.