aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorEmma Foley <efoley@redhat.com>2020-11-19 12:38:40 +0000
committerEmma Foley <efoley@redhat.com>2020-11-19 13:41:50 +0000
commitf521375d6e898bbdef7abcd9cae25677af96bd82 (patch)
tree71598d3a14b7dcb716ee8c26446763c462473402 /docker
parent53f164dab619c11dc463510c2c9b58d485b91db6 (diff)
[container][experimental] Update the collectd_apply_pull_request.sh
Updated the script to take the PR list from the environment Updated the container to allow users to pass COLLECTD_PULL_REQUESTS as a build-arg when building the container so they don't have to hard code values to change the PRs that are applied Change-Id: Ie820709d5f57712dc246b6728c772e086e53ab5b Signed-off-by: Emma Foley <efoley@redhat.com>
Diffstat (limited to 'docker')
-rw-r--r--docker/barometer-collectd-experimental/Dockerfile1
-rwxr-xr-xdocker/barometer-collectd-experimental/collectd_apply_pull_request.sh18
2 files changed, 10 insertions, 9 deletions
diff --git a/docker/barometer-collectd-experimental/Dockerfile b/docker/barometer-collectd-experimental/Dockerfile
index 798868ff..2cb26825 100644
--- a/docker/barometer-collectd-experimental/Dockerfile
+++ b/docker/barometer-collectd-experimental/Dockerfile
@@ -21,6 +21,7 @@ RUN dnf update -y && \
ENV DOCKER y
ENV COLLECTD_FLAVOR experimental
+ARG COLLECTD_PULL_REQUESTS
ENV WITH_DPDK y
ENV repos_dir /src
diff --git a/docker/barometer-collectd-experimental/collectd_apply_pull_request.sh b/docker/barometer-collectd-experimental/collectd_apply_pull_request.sh
index 45a2a2cd..dbbc5f26 100755
--- a/docker/barometer-collectd-experimental/collectd_apply_pull_request.sh
+++ b/docker/barometer-collectd-experimental/collectd_apply_pull_request.sh
@@ -18,17 +18,17 @@
# of main branch before building collectd included in docker
# collectd-experimental container
-# Space/newline separated list of pull requests IDs
+# Use this script with a COLLECTD_PULL_REQUESTS variable defined
# for example:
-# PULL_REQUESTS=(3027 #reimplement delay rate
-# 3028 #other PR
-# )
+# COLLECTD_PULL_REQUESTS="3027,3028" ./collectd_apply_pull_request.sh
-PULL_REQUESTS=(
- 3045 #logparser
- 3292 #capabilities plugin
- #insert another PR ID here
- )
+if [ -z "$COLLECTD_PULL_REQUESTS" ];
+then
+ echo "COLLECTD_PULL_REQUESTS is unset, exiting"
+ exit
+fi
+
+IFS=', ' read -a PULL_REQUESTS <<< "$COLLECTD_PULL_REQUESTS"
# during rebasing/merging git requires email & name to be set
git config user.email "barometer-experimental@container"