diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-20 06:30:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-20 06:30:40 -0700 |
commit | 22e81b3af5f3fcac759a3cb0be37c185a4310919 (patch) | |
tree | 99e158529ea8f6b20ed1ab266c0168c9f78f68a0 /hack | |
parent | 537c382f5bd098bc89a457554db9bd0b08eab3c2 (diff) | |
parent | 37eb694bd073b8dff265be137ae75eac81e9d769 (diff) | |
download | podman-22e81b3af5f3fcac759a3cb0be37c185a4310919.tar.gz podman-22e81b3af5f3fcac759a3cb0be37c185a4310919.tar.bz2 podman-22e81b3af5f3fcac759a3cb0be37c185a4310919.zip |
Merge pull request #2708 from cevich/actual_rootless_two
Cirrus: Various fixes for rootless testing
Diffstat (limited to 'hack')
-rwxr-xr-x | hack/get_ci_vm.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/hack/get_ci_vm.sh b/hack/get_ci_vm.sh index 70fe93eb5..071b62434 100755 --- a/hack/get_ci_vm.sh +++ b/hack/get_ci_vm.sh @@ -19,6 +19,7 @@ PROJECT="libpod-218412" GOSRC="/var/tmp/go/src/github.com/containers/libpod" GCLOUD_IMAGE=${GCLOUD_IMAGE:-quay.io/cevich/gcloud_centos:latest} GCLOUD_SUDO=${GCLOUD_SUDO-sudo} +ROOTLESS_USER="madcowdog" # Shared tmp directory between container and us TMPDIR=$(mktemp -d --tmpdir $(basename $0)_tmpdir_XXXXXX) @@ -69,7 +70,9 @@ image_hints() { show_usage() { echo -e "\n${RED}ERROR: $1${NOR}" - echo -e "${YEL}Usage: $(basename $0) [-s | -p] <image_name>${NOR}\n" + echo -e "${YEL}Usage: $(basename $0) [-s | -p | -r] <image_name>${NOR}" + echo "Use -s / -p to select source or package based dependencies" + echo -e "Use -r to setup and run tests as a regular user.\n" if [[ -r ".cirrus.yml" ]] then echo -e "${YEL}Some possible image_name values (from .cirrus.yml):${NOR}" @@ -106,7 +109,7 @@ parse_args(){ IMAGE_NAME="$2" elif [[ "$1" == "-r" ]] then - DEPS="ROOTLESS_USER=madcowdog ROOTLESS_UID=3210 ROOTLESS_GID=3210" + DEPS="ROOTLESS_USER=$ROOTLESS_USER" IMAGE_NAME="$2" else # no -s or -p DEPS="$(get_env_vars)" @@ -213,4 +216,8 @@ echo -e "\n${YEL}Executing environment setup${NOR}" showrun $SSH_CMD --command "$SETUP_CMD" echo -e "\n${YEL}Connecting to $VMNAME ${RED}(option to delete VM upon logout).${NOR}\n" +if [[ "$1" == "-r" ]] +then + SSH_CMD="$PGCLOUD compute ssh $ROOTLESS_USER@$VMNAME" +fi showrun $SSH_CMD -- -t "cd $GOSRC && exec env $DEPS bash -il" |