aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-11-13 17:05:36 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-11-13 17:05:36 +0000
commit206ec1d0098c965e62d993cf8119bb72816dbd42 (patch)
tree80a1fbbdc902d8af9182e45d28dd12587c3770fe
parenta72d3e842b665c0bd3a7d387ac5300ea7da136e2 (diff)
downloaddockerfiles-206ec1d0098c965e62d993cf8119bb72816dbd42.tar.gz
latest-amd64-tcwg-llvmmonitor: New image
... to host LLVM monitor web-page. Change-Id: I1552a4e13cfb2c4d83a2e4e653e5d98199760647
-rw-r--r--latest-amd64-tcwg-llvmmonitor/Dockerfile19
-rwxr-xr-xlatest-amd64-tcwg-llvmmonitor/build.sh23
-rw-r--r--latest-amd64-tcwg-llvmmonitor/gerrit-branches1
3 files changed, 43 insertions, 0 deletions
diff --git a/latest-amd64-tcwg-llvmmonitor/Dockerfile b/latest-amd64-tcwg-llvmmonitor/Dockerfile
new file mode 100644
index 0000000..0a0b60f
--- /dev/null
+++ b/latest-amd64-tcwg-llvmmonitor/Dockerfile
@@ -0,0 +1,19 @@
+FROM nginx:latest
+
+RUN apt-get update \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ cron \
+ git \
+ libjson-perl \
+ libwww-perl \
+ && git clone https://git.linaro.org/toolchain/llvm/linaro-scripts.git \
+ && /linaro-scripts/monitor/install.sh /linaro-scripts-monitor \
+ && echo "*/5 * * * * /linaro-scripts-monitor/bin/bot-status /linaro-scripts-monitor/bin/linaro.json /usr/share/nginx/html/index.html && chmod +r /usr/share/nginx/html/index.html" | crontab - \
+ && rm -rf \
+ /var/lib/apt/lists/* \
+ /tmp/* \
+ /var/tmp/*
+
+CMD ["bash", "-c", "service cron start && exec nginx -g 'daemon off;'"]
+
+# docker run -d -p 80:80 --name llvmmonitor linaro/ci-amd64-tcwg-llvmmonitor-nginx
diff --git a/latest-amd64-tcwg-llvmmonitor/build.sh b/latest-amd64-tcwg-llvmmonitor/build.sh
new file mode 100755
index 0000000..18775bf
--- /dev/null
+++ b/latest-amd64-tcwg-llvmmonitor/build.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+trap cleanup_exit INT TERM EXIT
+
+cleanup_exit()
+{
+ :
+}
+
+export LANG=C
+top=$(git rev-parse --show-toplevel)
+distro=$(basename ${PWD} | cut -f1 -d '-')
+arch=$(basename ${PWD} | cut -f2 -d '-')
+name=$(basename ${PWD} | cut -f3- -d '-')
+image=linaro/ci-${arch}-${name}-nginx:${distro}
+baseimage=$(grep "^FROM" Dockerfile | head -n 1 | cut -d" " -f 2)
+
+docker pull $baseimage 2>/dev/null || true
+docker pull $image 2>/dev/null || true
+docker build --tag=$image .
+echo $image > .docker-tag
diff --git a/latest-amd64-tcwg-llvmmonitor/gerrit-branches b/latest-amd64-tcwg-llvmmonitor/gerrit-branches
new file mode 100644
index 0000000..1f7391f
--- /dev/null
+++ b/latest-amd64-tcwg-llvmmonitor/gerrit-branches
@@ -0,0 +1 @@
+master