Shippable / support

Shippable SaaS customers can report issues and feature requests in this repository
101 stars 28 forks source link

Composer permission issues with new YML format #2290

Closed mbrodala closed 8 years ago

mbrodala commented 8 years ago

With the new shippable.yml format and the Continuous Delivery plan I am seeing permission errors on build:

composer self-update
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Updating to version cc14bb3ba99eaf2b1ee45bf292962551b4f1436d.
    Downloading: Connecting...    Downloading: 100%         
Cannot create cache directory /root/.composer/cache/repo/https---composer.pagemachine.de/, or directory is not writable. Proceeding without cache
Cannot create cache directory /root/.composer/cache/repo/https---composer.typo3.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /root/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /root/.composer/cache/files/, or directory is not writable. Proceeding without cache

  [ErrorException]                                                                                   
  file_put_contents(/root/.composer/keys.dev.pub): failed to open stream: No such file or directory

This is the relevant part of our shippable.yml currently:

...

build:
  pre_ci_boot:
    image_name: drydock/u14php
    image_tag: tip

  ci:
    - export PATH=$HOME/.phpenv/bin:$HOME/.phpenv/extensions:$PATH && eval "$(phpenv init -)"
    - phpenv global $SHIPPABLE_PHP_VERSION
    - echo "date.timezone = Europe/Berlin" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
    - php --version
    - composer self-update
    - composer config --global github-oauth.github.com "$GITHUB_OAUTH_TOKEN"
    # Install PHP "intl" extension for \Collator class usage
    - sudo apt-get update
    - sudo apt-get install --yes php5-intl
    - echo "extension=$(dpkg -L php5-intl | grep intl\.so)" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
    - cp $HOME/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini /tmp
    - phpenv config-rm xdebug.ini
    - composer install --ansi --no-progress
    - bin/parallel-lint --exclude bin --exclude Packages/Libraries --exclude typo3_src --exclude web/typo3temp .
    - phpenv config-add /tmp/xdebug.ini
    - bin/phpunit --colors=always --log-junit shippable/testresults/junit.xml --coverage-xml shippable/codecoverage;

Aside from the permission error: can this be trimmed down a bit with the new environment/image?

mbrodala commented 8 years ago

Seems to have been a temporary issue since we are not seeing it anymore now.

mbrodala commented 8 years ago

Strike that, it still affects builds with the new YML format.

rageshkrishna commented 8 years ago

@mbrodala We've figured out what's going wrong here. A fix will be available very soon.

mbrodala commented 8 years ago

@rageshkrishna Did you fix this already? At least I cannot see the issue anymore.

rageshkrishna commented 8 years ago

Yes, this was deployed around an hour ago. Please reopen this issue if you still run in to it.

mbrodala commented 8 years ago

Thanks for fixing, works fine so far. :-)