Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/280919
Change subject: Pass BUNDLE_PATH to Nodepool jobs ...................................................................... Pass BUNDLE_PATH to Nodepool jobs On Jessie, gem default to install to the system path which is not writable by the jenkins user: /var/lib/gems/2.1.0/cache/ . This was worked around with bundle install --path for the rake-jessie job. The parsoid npm job installs jsduck using 'bundle install' from https://gerrit.wikimedia.org/r/280906 . Which cause the same issue. Have Zuul to inject BUNDLE_PATH so any usage of bundle install get the gems installed under a directory writable by jenkins and saveable by castor. Bug: T109005 Bug: T126992 Change-Id: I0b9e91bb017a5d5229d04a55e717735a4386701f --- M jjb/ruby-jobs.yaml M zuul/parameter_functions.py 2 files changed, 18 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/19/280919/1 diff --git a/jjb/ruby-jobs.yaml b/jjb/ruby-jobs.yaml index 67f07c5..31bcd0e 100644 --- a/jjb/ruby-jobs.yaml +++ b/jjb/ruby-jobs.yaml @@ -64,13 +64,9 @@ builders: - castor-load - shell: | - # Bundle defaults to install to GEM_HOME which on Debian is the system - # directory. It thus attempt to sudo which is not available to the - # 'jenkins' user on Nodepool instances. - # To avoid injecting material in the source workspace, install material - # in the parent directory. - # We cleaned up unused gems that might be injected by castor - bundle install --clean --path ../vendor/bundle + # We clean up unused gems that might be injected by castor + # Installs under BUNDLE_PATH injected by Zuul + bundle install --clean bundle exec rake test publishers: - castor-save diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py index e3cc79f..f528efc 100644 --- a/zuul/parameter_functions.py +++ b/zuul/parameter_functions.py @@ -31,11 +31,11 @@ set_ext_dependencies(item, job, params) if job.name.endswith('-jessie'): - offline_when_complete(item, job, params) + nodepool_params(item, job, params) elif job.name.endswith('npm-node-4.3'): - offline_when_complete(item, job, params) + nodepool_params(item, job, params) elif job.name in ['integration-jjb-config-diff']: - offline_when_complete(item, job, params) + nodepool_params(item, job, params) if job.name.endswith('-publish'): set_doc_variables(item, job, params) @@ -179,11 +179,20 @@ return resolve_deps(ext_name) -# Instruct Jenkins Gearman plugin to put a node offline on job completion. -# Ie for nodepool -def offline_when_complete(item, job, params): +def nodepool_params(item, job, params): + # Instruct Jenkins Gearman plugin to put a node offline on job completion. params['OFFLINE_NODE_WHEN_COMPLETE'] = '1' + # Bundle defaults to install to GEM_HOME which on Debian is the system + # directory. It thus attempt to sudo which is not available to the + # 'jenkins' user on Nodepool instances. + # + # To avoid injecting material in the source workspace, install material + # in the parent directory. + # + # If changing this: DO UPDATE castor-save as well!!! + params['BUNDLE_PATH'] = '~/workspace/vendor/bundle' + def set_doc_variables(item, job, params): change = item.change -- To view, visit https://gerrit.wikimedia.org/r/280919 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b9e91bb017a5d5229d04a55e717735a4386701f Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
