Giter Club home page Giter Club logo

jenkins-slave-osx's People

Contributors

alisoftware avatar cloderic avatar haysclark avatar larryaasen avatar rhwood avatar streeter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jenkins-slave-osx's Issues

Warning messages when configuring keychain

I get this output when running the script. If it's harmless, please modify the script to avoid the warnings (e.g. check if a file exists before running chmod on it). If the warnings are not harmless, let's debug them further.

API token for builds: ABC
security: SecKeychainCreate login.keychain: A keychain with the same name already exists.
/dev/fd/63: line 261: /Users/builds/Library/Keychains/.keychain_pass: Permission denied
chmod: /Users/builds/Library/Keychains/.keychain_pass: No such file or directory

Default JAVA_ARGS in slave.jnlp.sh are ignored

In slave.jnlp.sh, we default to setting JAVA_ARGS=-Djava.awt.headless=true", however this setting needs to be more rigorously enforced, as an empty set of JAVA_ARGS in ${JENKINS_HOME}/Library/Preferences/org.jenkins-ci.slave.jnlp.conf will overwrite the headless arguments. We should prepend that argument to the default JAVA_ARGS created by the installer instead.

Unable to authenticate with token; Jenkins v. 1.551

Same symptoms as reported in https://issues.jenkins-ci.org/browse/JENKINS-13600

Repeating the curl command that fails I get the following from the remote server:

" Unexpected authentication type: org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1925e221: Username: mr-c; Password: [PROTECTED]; Authenticated: false; Details: org.acegisecurity.ui.WebAuthenticationDetails@ffff8868: RemoteIpAddress: nn.nn.nn.nn; SessionId: null; Not granted any authorities"

[RemoteIpAddress removed]

JENKINS_CONF resolves to wrong path

I invoked:

export SERVICE_USER=builds
bash <( curl -L https://raw.github.com/rhwood/jenkins-slave-osx/master/install.sh ) --user=builds --master=http://myhost/builds/ --node="MacOS X 10.8"

from user account "cowwoc". The installation completed successfully, but then when I opened org.jenkins-ci.slave.jnlp.log I got:

Getting slave.jar from http://jenkins
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: jenkins

In other words, the URL of the master node is wrong. What is weird is that /var/lib/builds/Library/Preferences/org.jenkins-ci.slave.jnlp.conf contained the following lines:

JENKINS_SLAVE="MacOS"
JENKINS_MASTER=http://myhost/builds/
HTTP_PORT=
JENKINS_USER=builds
JAVA_ARGS=" -Djava.awt.headless=true"

In other words, this looks correct. I dug further and discovered that /Library/LaunchDaemons/org.jenkins-ci.slave.jnlp.plist launches /Users/builds/slave.jnlp.sh. What is interesting is that JENKINS_CONF inside slave.jnlp.sh is resolving to /Users/builds/Library/Preferences/org.jenkins-ci.slave.jnlp.conf (which does not exist) instead of /var/lib/builds/Library/Preferences/org.jenkins-ci.slave.jnlp.conf (which does exist).

I'm not sure what is the "correct" way to solve this.

curl downloads in script not working without -L flag

Hi!
you probably should consider to add -L flag to any call of curl in your script. Because, otherwise, with system-curl it will not download anything.
So script as-is working perfect with brew version of curl.

Document adding OSX keychain to Jenkins configuration

The script outputs:

The OS X Keychain password for builds is ABC
You will need to copy this into the Jenkins configuration on bbs
for every project that will be compiled on this slave, or copy a special
per-project Keychain to /Users/builds/Library/Keychains.

I have no idea what this means. It's not clear where I need to enter the keychain password in Jenkins. Please document the steps (which menus to go into) and possibly even include screenshots.

set-password fails on snow leopard

While running install.sh I see the following error and login failures in console. Any suggestions?

/var/lib/jenkins/security.sh: line 79: 9281 Segmentation fault security add-generic-password -U -w ${PASSWORD} -a ${ACCOUNT} -s ${SERVICE} ${OSX_KEYCHAIN}
find-generic-password: illegal option -- w
Usage: find-generic-password [-a account] [-s service] [options...] [-g] [keychain...]
-a Match "account" string
-c Match "creator" (four-character code)
-C Match "type" (four-character code)
-D Match "kind" string
-G Match "value" string (generic attribute)
-j Match "comment" string
-l Match "label" string
-s Match "service" string
-g Display the password for the item found
If no keychains are specified to search, the default search list is used.
Find a generic password item.
/var/lib/jenkins/security.sh: line 79: 9295 Segmentation fault security add-generic-password -U -w ${PASSWORD} -a ${ACCOUNT} -s ${SERVICE} ${OSX_KEYCHAIN}

Uninstall?

How do you cleanly uninstall after installing?

Does not build iOS apps

Need to get to point where adding certificates to build iOS apps is documented and, ideally, assisted by the installer.

Spotted tiny typo in install.sh

"During the configuration, you will be prompted for nessessary information." is supposed to read "...necessary information."

Script fails silently if node name contains spaces

If the node name contain spaces and is passed to the script using quotes, escape characters or %20 everything will proceed normally except that the configuration will not contain the correct value for the node name. It will truncate it after the first space.

Jenkins slave service not using configured JENKINS_MASTER

I ran through the install script, specifying the URL to my Jenkins master (which is NOT http://jenkins). However, when I try to run the service, the log shows that it is trying to connect to the default jenkins url:

Starting at Wed Feb 19 16:24:42 EST 2014

Getting slave.jar from http://jenkins
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: jenkins

Unable to download slave-agent

Failing to obtain http://my.jenkins.server.com/computer/opsbibackupsac/slave-agent.jnlp
java.io.IOException: Failed to load http://my.jenkins.server.com/computer/opsbibackupsac/slave-agent.jnlp: 401 Authorization Required
    at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:236)
    at hudson.remoting.Launcher.run(Launcher.java:198)
    at hudson.remoting.Launcher.main(Launcher.java:171)
Waiting 10 seconds before retry

Having an issue where the script won't authenticate to pull down the slave-agent.

We are using Jenkins 1.499. I have already implemented the fix outlined in Issue #34.

Just a quick help in the right direction would be great. Thanks.

Installer assumes service account group is same as service account name

In four places the installer assumes that the service account group is the same as the service account name. This is not necessarily the case (see #12). The installer needs to populate a variable for the group from the output of dscl /Local/Default search /Groups gid $( dscl /Local/Default read /Users/${SERVICE_USER} PrimaryGroupID | awk '{ print $2 }' ) | head -n1 | awk '{ print $1 }' and use that value for the group name instead.

Need to create a group even if the user exists

Currently the code only creates the Jenkins user account and group if the user account does not exist. This fails to handle the case where the user account exists but the group does not.

Compatibility with macOS Sierra

Hi there,

I have just tried to install this on macOS Sierra and noticed that security.sh is not compatible and does not store the token.

The following check fails (the file is now called *-db)

....
if [ ! -f ~/Library/Keychains/${OSX_KEYCHAIN}]; then
....

The other thing I noticed is that the ssh keys are not generated.

Default workspace location

With the latest changes starting the daemon fails with:

Unable to use expected workspace: /var/lib/jenkins/Library/Developer/org.jenkins-ci.slave.jnlp/Library/Developer/org.jenkins-ci.slave.jnlp

${JENKINS_WRKSPC} seems to contain parts of the correct path twice?

Installer creates group for user even if group exists.

While examining #12 and #14, I discovered that if the service account does not exist, but if a group with the same name already exists, that the installer attempts to create a new group anyway. It should not create a group or user if either the group or user being created already exists.

URL parameters: Strip trailing slash if necessary

Some parameters, such as --master take URLs. If the URL ends with a slash and the script appends other components to it, the URL does not resolve properly.

The script should be smart enough to strip the trailing slash when necessary.

Installation fails on 10.9.3

This may be related to #38 - on a freshly unboxed system the script fails with the following:

Installing files...
sed: /var/lib/jenkins/Library/Developer/org.jenkins-ci.slave.jnlp/org.jenkins-ci.slave.jnlp.plist: No such file or directory
sed: /var/lib/jenkins/Library/Developer/org.jenkins-ci.slave.jnlp/org.jenkins-ci.slave.jnlp.plist: No such file or directory
install: /var/lib/jenkins/Library/Developer/org.jenkins-ci.slave.jnlp/org.jenkins-ci.slave.jnlp.plist: No such file or directory
chmod: /var/lib/jenkins/Library/Developer/org.jenkins-ci.slave.jnlp/slave.jnlp.sh: No such file or directory
chmod: /var/lib/jenkins/Library/Developer/org.jenkins-ci.slave.jnlp/security.sh: No such file or directory

and later

launchctl: Couldn't stat("/Library/LaunchDaemons/org.jenkins-ci.slave.jnlp.plist"): No such file or directory
nothing found to load

Is it a problem running this script against Java 8? Do we have to setup something else before running?

Allow installer to prompt for keychain password

  1. When the code executes:
sudo -i -u ${SERVICE_USER} ${SERVICE_HOME}/security.sh set-password —password=${SLAVE_TOKEN} —account=${MASTER_USER} —service=\"`rawurlencode "${SLAVE_NODE}"`\"

the command fails with security: SecKeychainUnlock login.keychain: The user name or passphrase you entered is not correct. and pops up a dialog asking me to enter the password.

It's not clear why the script expects the password to be equal to ${SLAVE_TOKEN} which actually corresponds to the Slave's API token on the Jenkins master node (no relation to what is going on on the slave). Any ideas?

2.. Later on, the code executes:

sudo -i -u ${SERVICE_USER} ${SERVICE_HOME}/security.sh set-password --password=${KEYSTORE_PASS} --account=${SERVICE_USER} --service=java_truststore

The same thing occurs: wrong password, followed by a pop up asking me to enter the password, but all of a sudden I am asked to change the password for keychain "Local Items". Why am I being asked to do this?

Need to document SSH keys

Not only should the use of SSH keys be documented, we should probably document explicitly how to use SSH keys with GitHub, probably in the project Wiki.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.