aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--docker/barometer-collectd-experimental/Dockerfile1
-rwxr-xr-xdocker/barometer-collectd-experimental/collectd_apply_pull_request.sh18
-rw-r--r--docs/release/userguide/installguide.docker.rst17
3 files changed, 22 insertions, 14 deletions
diff --git a/docker/barometer-collectd-experimental/Dockerfile b/docker/barometer-collectd-experimental/Dockerfile
index 798868f..2cb2682 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 45a2a2c..dbbc5f2 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"
diff --git a/docs/release/userguide/installguide.docker.rst b/docs/release/userguide/installguide.docker.rst
index 2bb7941..ca113c6 100644
--- a/docs/release/userguide/installguide.docker.rst
+++ b/docs/release/userguide/installguide.docker.rst
@@ -46,7 +46,7 @@ the barometer plugins.
.. note::
The Dockerfile is available in the docker/barometer-collectd directory in the barometer repo.
- The Dockerfile builds a CentOS 7 docker image.
+ The Dockerfile builds a CentOS 8 docker image.
The container MUST be run as a privileged container.
Collectd is a daemon which collects system performance statistics periodically
@@ -271,8 +271,8 @@ flavors of Collectd containers:
* barometer-collectd - stable release, based on collectd 5.11
* barometer-collectd-latest - release based on collectd 'main' branch
* barometer-collectd-experimental - release based on collectd 'main'
- branch that also includes set of experimental (not yet merged into upstream)
- pull requests
+ branch that can also include a set of experimental (not yet merged into
+ upstream) pull requests
.. note::
Experimental container is not tested across various OS'es and the stability
@@ -359,8 +359,14 @@ Build barometer-collectd-latest container
proxy parameters should be passed only if system is behind an HTTP or HTTPS
proxy server (same as for stable collectd container)
-Build collectd-experimental container
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Build barometer-collectd-experimental container
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The barometer-collectd-experimental container use the ``main`` branch of
+collectd, but allows the user to apply a number of pull requests, which are
+passed via the COLLECTD_PULL_REQUESTS build arg, which is passed to docker as
+shown in the example below.
+COLLECTD_PULL_REQUESTS should be a comma-delimited string of pull request IDs.
.. code:: bash
@@ -368,6 +374,7 @@ Build collectd-experimental container
$ sudo docker build -t opnfv/barometer-collectd-experimental \
--build-arg http_proxy=`echo $http_proxy` \
--build-arg https_proxy=`echo $https_proxy` \
+ --build-arg COLLECTD_PULL_REQUESTS=1234,5678 \
--network=host -f docker/barometer-collectd-experimental/Dockerfile .
.. note::