diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-09 04:15:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-09 04:15:09 -0800 |
commit | b15273a0ca76fcbfb13c3baa794790489da137b4 (patch) | |
tree | e2c81d1538b22285e93330e59ffb2828cd37f6e2 /contrib/cirrus/setup_environment.sh | |
parent | 720e9c5ab4c0c8530854c4b87360d8169d1aa78a (diff) | |
parent | 142442edaad3ba4c76645f3806519039cb6b7007 (diff) | |
download | podman-b15273a0ca76fcbfb13c3baa794790489da137b4.tar.gz podman-b15273a0ca76fcbfb13c3baa794790489da137b4.tar.bz2 podman-b15273a0ca76fcbfb13c3baa794790489da137b4.zip |
Merge pull request #2531 from cevich/rootless_stub
Cirrus: Add dedicated rootless mode testing
Diffstat (limited to 'contrib/cirrus/setup_environment.sh')
-rwxr-xr-x | contrib/cirrus/setup_environment.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index c3276bb6f..d8d97904b 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -43,6 +43,9 @@ then "export OS_RELEASE_ID=\"$(os_release_id)\"" \ "export OS_RELEASE_VER=\"$(os_release_ver)\"" \ "export OS_REL_VER=\"$(os_release_id)-$(os_release_ver)\"" \ + "export ROOTLESS_USER=$ROOTLESS_USER" \ + "export ROOTLESS_UID=$ROOTLESS_UID" \ + "export ROOTLESS_GID=$ROOTLESS_GID" \ "export BUILT_IMAGE_SUFFIX=\"-$CIRRUS_REPO_NAME-${CIRRUS_CHANGE_IN_REPO:0:8}\"" \ "export GOPATH=\"/var/tmp/go\"" \ 'export PATH="$HOME/bin:$GOPATH/bin:/usr/local/bin:$PATH"' \ @@ -70,14 +73,19 @@ then *) bad_os_id_ver ;; esac - # Do the same for golang env. vars - go env | while read envline - do - X=$(echo "export $envline" | tee -a "$HOME/$ENVLIB") && eval "$X" && echo "$X" - done - cd "${GOSRC}/" source "$SCRIPT_BASE/lib.sh" + + if run_rootless + then + setup_rootless + else + # Includes some $HOME relative details + go env | while read envline + do + X=$(echo "export $envline" | tee -a "$HOME/$ENVLIB") && eval "$X" && echo "$X" + done + fi fi record_timestamp "env. setup end" |