Skip to content
Snippets Groups Projects
Commit 11b001c7 authored by Chase Qi's avatar Chase Qi
Browse files

.oniro-ci: add oe-selftest dockerfile


The docker image is based bitbake-builder. 'sudo su - builder' step added for
oe-selftest as 'USER builder' doesn't really load user level profile. The below
vars are misssing before user re-switch.

  SHELL=/usr/bin/bash
  LOGNAME=builder
  LESSCLOSE=/usr/bin/lesspipe %s %s
  LESSOPEN=| /usr/bin/lesspipe %s
  USER=builder
  MAIL=/var/mail/builder

And PATHes are different before and after user re-switch.
Before: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
After: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Although 'whoami' command can be found in both PATHes, oe-selftest reports
'whoami' not found issue with the former path, the reason behind is to be
investigated. In general, user instead of root profile should be used for
oe-selftest.

Signed-off-by: default avatarChase Qi <chase.qi@linaro.org>
parent b04e728b
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !127. Comments created here will be created in the context of that merge request.
FROM chaseqi/bitbake-builder:v1.3
# 'USER builder' doesn't really load user level profile.
# The below vars are misssing before user re-switch.
# SHELL=/usr/bin/bash
# LOGNAME=builder
# LESSCLOSE=/usr/bin/lesspipe %s %s
# LESSOPEN=| /usr/bin/lesspipe %s
# USER=builder
# MAIL=/var/mail/builder
# And PATHes are different before and after user re-switch.
# Before: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# After: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
# Although 'whoami' command can be found in both PATHes, oe-selftest reports
# 'whoami' not found issue with the former path, the reason behind is to be
# investigated. In general, user instead of root profile should be used for
# oe-selftest.
ENTRYPOINT sudo su - builder
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment