Skip to content

gitlab-ci.yml - dpl: command not found error #214

@Sklico

Description

@Sklico

This is my gitlab-ci.yml file:

image: ruby:latest

stages:
  - deploy

deploy_master:
  stage: deploy
  script:
    - gem install dpl
    - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_API_KEY
  only:
    - master
  when: on_success

deploy_test:
  stage: deploy
  script:
    - gem install dpl
    - dpl --provider=heroku --app=$HEROKU_TEST_APP_NAME --api-key=$HEROKU_API_KEY
  only:
    - test
  when: on_success

And this is output from pipeline:

Checking out 2c69d48d as test...
Skipping Git submodules setup
$ gem install dpl
Successfully installed dpl-1.9.6
1 gem installed
$ dpl --provider=heroku --app=$HEROKU_TEST_APP_NAME --api-key=$HEROKU_API_KEY
/bin/bash: line 57: dpl: command not found
ERROR: Job failed: exit code 1

It worked yesterday, but today, it still fails on dpl command. I've tried different ruby images, but nothing changed. It works, when I use a little workaround and use this in my gitlab-ci file:

  • export PATH=$PATH:/usr/local/bundle/bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions