Merge "Add mandatory container_mode to reproducer script"
This commit is contained in:
commit
09f9dde27d
|
@ -18,6 +18,7 @@
|
||||||
: ${UPSTREAM_GERRIT_SSH_KEY:="id_rsa"}
|
: ${UPSTREAM_GERRIT_SSH_KEY:="id_rsa"}
|
||||||
: ${RDO_GERRIT_SSH_KEY:="id_rsa"}
|
: ${RDO_GERRIT_SSH_KEY:="id_rsa"}
|
||||||
: ${EXTRA_PARAMS:=""}
|
: ${EXTRA_PARAMS:=""}
|
||||||
|
: ${CONTAINER_MODE:="podman"}
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
|
@ -146,6 +147,11 @@ while [ "x$1" != "x" ]; do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--container-cli|-cont)
|
||||||
|
CONTAINER_MODE=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
--help|-h)
|
--help|-h)
|
||||||
usage
|
usage
|
||||||
exit
|
exit
|
||||||
|
@ -195,7 +201,8 @@ install_package_deps_via_bindep
|
||||||
# Ensure pip is updated
|
# Ensure pip is updated
|
||||||
sudo pip install --upgrade pip
|
sudo pip install --upgrade pip
|
||||||
|
|
||||||
if [ -x "/usr/bin/docker" ] ; then
|
if [[ "$CONTAINER_CLI" == "docker"]]; then
|
||||||
|
if [ -x "/usr/bin/docker" ] ; then
|
||||||
# Fail as early as possible if the docker
|
# Fail as early as possible if the docker
|
||||||
# group is not setup appropriately.
|
# group is not setup appropriately.
|
||||||
# This has to be done AFTER package intalls.
|
# This has to be done AFTER package intalls.
|
||||||
|
@ -234,6 +241,7 @@ if [ -x "/usr/bin/docker" ] ; then
|
||||||
|
|
||||||
# Ensure the docker process has been restarted
|
# Ensure the docker process has been restarted
|
||||||
sudo systemctl restart docker
|
sudo systemctl restart docker
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start from a clean workspace
|
# Start from a clean workspace
|
||||||
|
@ -298,10 +306,10 @@ if [[ "$RDO_GERRIT_SSH_KEY" != "$USER_SSH_KEY" ]]; then
|
||||||
EXTRA_PARAMS="$EXTRA_PARAMS -e rdo_gerrit_key=$RDO_GERRIT_SSH_KEY "
|
EXTRA_PARAMS="$EXTRA_PARAMS -e rdo_gerrit_key=$RDO_GERRIT_SSH_KEY "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Run the launcher playbook
|
# Run the launcher playbook
|
||||||
PATH=${HOME}/.local/bin:$PATH ansible-playbook \
|
PATH=${HOME}/.local/bin:$PATH ansible-playbook \
|
||||||
$WORKSPACE/launcher-playbook.yaml \
|
$WORKSPACE/launcher-playbook.yaml \
|
||||||
|
-e container_mode="$CONTAINER_MODE" \
|
||||||
-vv \
|
-vv \
|
||||||
--tags all \
|
--tags all \
|
||||||
${EXTRA_PARAMS[@]}
|
${EXTRA_PARAMS[@]}
|
||||||
|
|
Loading…
Reference in New Issue