Dpl: No such file or directory - git

Created on 7 Nov 2018  路  2Comments  路  Source: travis-ci/dpl

My .gitlab-ci.yml file:

image: alaxalves/klara-api:1.5

services:
  - postgres:9.6

variables:
  PG_USERNAME: postgres
  PG_DATABASE_TEST: klara-api-test
  PG_HOST: postgres
  PG_PORT: 5432
  BUNDLE_PATH: vendor/
  RAILS_ENV: test

stages:
  - test
  - deploy

.cache: &cache
  cache:
    untracked: true
    key: "$CI_BUILD_REF_NAME"
    paths:
      - vendor/ruby

.dependencies: &dependencies
  before_script:
    - bundle install --path vendor

test:
  stage: test
  <<: *cache
  <<: *dependencies
  script:
  - bundle exec rails db:create
  - bundle exec rails db:migrate
  - bundle exec rake test
  artifacts:
    paths:
      - coverage/

rubocop:
  stage: test
  <<: *cache
  <<: *dependencies
  script:
  - bundle exec rubocop

staging:
  stage: deploy
  variables:
    HEROKU_APP_NAME: klara-api-staging
  <<: *cache
  <<: *dependencies
  script:
    - bundle exec dpl --skip_cleanup --provider=heroku --strategy=git --app=$HEROKU_APP_NAME --api-key=$HEROKU_STAGING_API_KEY
  only:
    - master

production:
  stage: deploy
  variables:
    HEROKU_APP_NAME: klara-api-prod
  <<: *cache
  <<: *dependencies
  script:
    - bundle exec dpl --skip_cleanup --provider=heroku --strategy=git --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_API_KEY
  only:
    - tags

My output is:
image

Most helpful comment

Seems like I had to install git package in my docker image, and it worked!

All 2 comments

Seems like I had to install git package in my docker image, and it worked!

apt-get install git -yqq
Helped me too

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rodmoreno picture rodmoreno  路  3Comments

Sytten picture Sytten  路  4Comments

amblock picture amblock  路  5Comments

jingsam picture jingsam  路  7Comments

Stevoisiak picture Stevoisiak  路  3Comments