Open junaruga opened 6 years ago
Here is what I am doing to run on non-root.
Because PostgreSQL command initdb
needs non-root user in the process bundle exec rake test
.
https://github.com/junaruga/ruby-pg/commit/a038730 https://github.com/junaruga/ruby-pg/blob/feature/ci-64bit-shippable-demo/shippable.yml https://app.shippable.com/github/junaruga/ruby-pg/runs/20/1/console The build is success. But the way is a little tricky.
- |
su "${CI_USER}" - <<EOF
bundle install --path vendor/bundle
bundle exec rake compile
bundle exec rake test
EOF
I want to do like this.
- bundle install --path vendor/bundle
- bundle exec rake compile
- bundle exec rake test
Description of your issue:
Thank you for providing this great CI service. I want to propose to add a YAML syntax to run as non-root easily.
Right now there is a way to run as non-root user as you know [1]. But it is not convenient seeing the case [2] and example code [3]
I think that most of users of Shippable has experience for Travis CI. The the difference of the default behavior for the running user is painful point to use Shippable.
On Travis, the running user is
travis
.On Shippable, the running user is
root
.So, I want to propose 2 possible solutions.
user: foo
shippable.yml
If the
user: foo
is specified, kind of [3] is executed internally, keeping the specified environment variables (env
element).non-root: true/false
shippable.yml
or
[1] http://docs.shippable.com/ci/non-root/ [2] https://github.com/Shippable/support/issues/4076 [3] https://github.com/ambarish2012/maven-samples/blob/master/shippable.yml