Bug 923687 - Drupal can not be built successfully on Jenkins server.
Summary: Drupal can not be built successfully on Jenkins server.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Vojtech Vitek
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-20 10:30 UTC by Mengjiao Gao
Modified: 2015-05-14 23:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-02 16:53:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1004122 0 medium CLOSED php-cli does not handle tilde expansion - PEAR configuration 2021-02-22 00:41:40 UTC

Internal Links: 1004122

Description Mengjiao Gao 2013-03-20 10:30:29 UTC
Description of problem:
After created a drupal app, I enabled jenkins to the app. But when I tried to build the drupal app on Jenkins server , I found the app would always be built failed.
Have tried to create drupal via website and CLI (rhc app create drupal php-5.3 mysql-5.1 cron --from-code=git://github.com/openshift/drupal-quickstart.git -k
), both of these drupal apps built failed on Jenkins server.

Version-Release number of selected component (if applicable):
devenv_2968, STG, PROD

How reproducible:
always

Steps to Reproduce:
1.Create a drupal app via website
2.Enable jenkins to the app
3.Build drupal on Jenkins server
  
Actual results:
Build failed with console output as follows:
____________________________________________________________
Started by user Jenkins Admin
Building remotely on drupalbldr in workspace php-5.3/ci/jenkins/workspace/drupal-build
Checkout:drupal-build / php-5.3/ci/jenkins/workspace/drupal-build - hudson.remoting.Channel@d78744:drupalbldr
Using strategy: Default
Checkout:drupal-build / php-5.3/ci/jenkins/workspace/drupal-build - hudson.remoting.LocalChannel@12fd192
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from ssh://51498b93c80946372c00006d.rhcloud.com/~/git/drupal.git/
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision e755b504c78766f46e223bdb6bc33a0e865d104a (origin/HEAD, origin/master)
Checking out Revision e755b504c78766f46e223bdb6bc33a0e865d104a (origin/HEAD, origin/master)
No change to record in branch origin/HEAD
No change to record in branch origin/master
[drupal-build] $ /bin/sh -xe /tmp/hudson5748909743022234880.sh
+ source /usr/libexec/openshift/cartridges/abstract/info/lib/jenkins_util
+ alias 'rsync=rsync --delete-after -az -e '\''/usr/libexec/openshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh'\'''
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins-1.4/info/bin/git_ssh_wrapper.sh '51498b93c80946372c00006d.rhcloud.com:~/php-5.3/phplib/' /var/lib/openshift/51498d4ac80946cdb20000b5//php-5.3/phplib/
+ . ci_build.sh
++ set +x
Running .openshift/action_hooks/pre_build
Checking pear: pear.drush.org/drush

Nothing to upgrade
Running .openshift/action_hooks/build

Run '. ${OPENSHIFT_DATA_DIR}.bash_profile' to load Drush into your SSH shell.

Download and install the latest stable version of Drupal

Could not open input file: /var/lib/openshift/51498b93c80946372c00006d/php-5.3/phplib/pear/pear/php/drush/drush.php
ERROR: Unable download and install Drupal.
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE
___________________________________________________________________________


Expected results:
The new created drupal app should be built successfully on Jenkins server

Additional info:

Comment 2 Clayton Coleman 2013-04-10 16:29:54 UTC
Why would the jenkins builder gear be different w.r.t Pear paths?

Comment 3 Vojtech Vitek 2013-04-15 18:42:14 UTC
We could be probably missing the ~/.pearrc settings file on the Jenkins server.
https://github.com/VojtechVitek/origin-server/commit/e75e66e3c9a693bd03590a9327909f7304b713fd

I'm testing the changes right now..

Comment 4 Mrunal Patel 2013-04-16 18:25:25 UTC
Could not open input file: /var/lib/openshift/51498b93c80946372c00006d/php-5.3/phplib/pear/pear/php/drush/drush.php 
We are looking for this file on the source gear as opposed to on the builder gear.
We need to fix the quickstart to prevent the hard-coding that makes us look at the wrong location.

Comment 5 Vojtech Vitek 2013-04-16 20:15:47 UTC
I found out what the problem was:

When we build the PEARs on the gear, the absolute path of the gear can get harcoded into the source codes of the libraries (usually .php files) during it's installation.

This was the case of the "./php-5.3/phplib/pear/pear/drush" library pointing to the wrong drush.php file (the absolute path was pointing to a different gear).

So when we rsync the PEARs from the PHP gear to the Jenkins builder gear (or vice versa, when we pull the changes back from Jenkins), the PEARs might get broken in the context of destination gear.

Comment 6 Vojtech Vitek 2013-04-16 20:18:47 UTC
Seems like we must build the phplibs/ on both Jenkins builder and other PHP gear. This should solve the wrong PATH issues.

On the other hand, it would slow down the build phase on the PHP gear itself..

Comment 8 Vojtech Vitek 2013-04-17 17:42:34 UTC
FutureFeature

We'd need to find more clear solution in the PEAR installation process to prevent any gear-specific hard-coded stuff in the binaries/libraries. This would let us rsync the PEARs among gears.

Comment 11 Dan McPherson 2013-08-02 16:53:19 UTC
Moved to Trello:

https://trello.com/c/HOKvYxdJ/224-3-allow-php-pear-to-work-with-jenkins


Note You need to log in before you can comment on or make changes to this bug.