Reputation: 1826
Having now pushed as many terms into the subject line:
We have a build machine (Mac) that is a bamboo agent. Due to the need to be able to build older versions of the app we have several different installs of Xcode on the machine.
To automate this we need to be able to issue xcode-select for the build machine. This command however requires Sudo; which I haven't found an acceptable solution to for CI. (All I've come up with is clear texting the sudo password in a SUDO_ASKPASS env passed or leaving the sudo/build passwd blank.)
This is being done through bamboo, so I'd prefer not to have to reinvent the wheel as well.
Upvotes: 3
Views: 1040
Reputation: 10608
Instead of using SUDO_ASKPASS you can simply edit your sudoers file (with visudo
) and add the line:
%admin ALL=NOPASSWD: /usr/bin/xcode-select
This will prevent the system from asking the password for sudo code-select
when you are an admin on the machine.
Upvotes: 1