How can I run custom dpl on Travis CI?

Travis-CI uses the dpl deployment tool to deploy your application.

I created a fork of repo that includes a number of enhancements for deploying to AWS. In the pre-deployment phase, I clone the repo and create a gem with it.

I have found that the use of edge: local

the section deploy

in the .travis.yml

lead to the fact that Travis will add a command --local

to gem install dpl

.

Travis is supposed to scan the current working directory for this gem, but it doesn't work correctly. The team gem

cannot find a new stone.

ERROR:  Could not find a valid gem 'dpl' (>= 0) in any repository

The command "rvm 1.9.3 --fuzzy do ruby -S gem install dpl --pre --local" failed and exited with 2 during .

      

I tried to copy it to the current working directory (same as $TRAVIS_BUILD_DIR

) as well as to $HOME

but doesn't work.

This is part of my depoy .travis.yml

.

before_deploy:
- export ELASTIC_BEANSTALK_LABEL=$(git tag --contains)
- git clone -b master https://github.com/jasny/dpl.git /tmp/dpl
- (cd /tmp/dpl && gem build dpl.gemspec && cp *.gem "$TRAVIS_BUILD_DIR")
deploy:
  provider: elasticbeanstalk
  edge: local
  access_key_id: ...
  secret_access_key:
    secure: ...
  region: eu-west-1
  app: dms
  env: dms-travis-test
  bucket_name: elasticbeanstalk-eu-west-1-930677074220
  bucket_path: dms
  on:
    branch: travis-deploy

      

+3


source to share


1 answer


Usage edge: local

is currently broken in a Travis build environment called by Ruby gems version 2.4.5.

Ruby gems v1.x flag --local

will scan current working directory for gems of any version. However ruby ​​gems v2.x no longer does this and requires you to use the gem file name.

The travis-build application has not been modified to cope with this change.



As a workaround, you can upgrade to Ruby Jewels v1.8.30.

before_install:
- gem update --system 1.8.30

      

+1


source







All Articles