summaryrefslogtreecommitdiffstats
path: root/src/pmdk/utils/docker/prepare-for-build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/pmdk/utils/docker/prepare-for-build.sh
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pmdk/utils/docker/prepare-for-build.sh')
-rwxr-xr-xsrc/pmdk/utils/docker/prepare-for-build.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/pmdk/utils/docker/prepare-for-build.sh b/src/pmdk/utils/docker/prepare-for-build.sh
new file mode 100755
index 000000000..f18c18c68
--- /dev/null
+++ b/src/pmdk/utils/docker/prepare-for-build.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2016-2020, Intel Corporation
+
+#
+# prepare-for-build.sh - is called inside a Docker container; prepares
+# the environment inside a Docker container for
+# running build of PMDK project.
+#
+
+set -e
+
+# This should be run only on CIs
+if [ "$CI_RUN" == "YES" ]; then
+ # Make sure $WORKDIR has correct access rights
+ # - set them to the current UID and GID
+ echo $USERPASS | sudo -S chown -R $(id -u).$(id -g) $WORKDIR
+fi
+
+# Configure tests (e.g. ssh for remote tests) unless the current configuration
+# should be preserved
+KEEP_TEST_CONFIG=${KEEP_TEST_CONFIG:-0}
+if [[ "$KEEP_TEST_CONFIG" == 0 ]]; then
+ ./configure-tests.sh
+fi