]> git.proxmox.com Git - ceph.git/blame - ceph/src/pmdk/utils/docker/prepare-for-build.sh
import ceph 16.2.7
[ceph.git] / ceph / src / pmdk / utils / docker / prepare-for-build.sh
CommitLineData
a4b75251
TL
1#!/usr/bin/env bash
2# SPDX-License-Identifier: BSD-3-Clause
3# Copyright 2016-2020, Intel Corporation
4
5#
6# prepare-for-build.sh - is called inside a Docker container; prepares
7# the environment inside a Docker container for
8# running build of PMDK project.
9#
10
11set -e
12
13# This should be run only on CIs
14if [ "$CI_RUN" == "YES" ]; then
15 # Make sure $WORKDIR has correct access rights
16 # - set them to the current UID and GID
17 echo $USERPASS | sudo -S chown -R $(id -u).$(id -g) $WORKDIR
18fi
19
20# Configure tests (e.g. ssh for remote tests) unless the current configuration
21# should be preserved
22KEEP_TEST_CONFIG=${KEEP_TEST_CONFIG:-0}
23if [[ "$KEEP_TEST_CONFIG" == 0 ]]; then
24 ./configure-tests.sh
25fi