我正在尝试将我们的应用部署到Heroku
,.gitlab-ci.yml
中的设置似乎
staging_heroku:
stage: deploy
script:
- git remote add heroku https://heroku:$STAGING_HEROKU_KEY@git.heroku.com/staging-myapp.git
- git push -f heroku master
这就是我们在日志中看到的内容
Cloning repository...
Cloning into '/builds/org/project'...
Checking out 340111af as dev/feature1...
Skipping Git submodules setup
Downloading artifacts for maven-build (17234382)...
Downloading artifacts from coordinator... ok id=17234382 responseStatus=200 OK token=2YSHdANA
/bin/sh: eval: line 46: apt-get: not found
$ apt-get update -yqqq
ERROR: Job failed: exit code 127
这些参赛者甚至没有apt-get
,所以我无法安装gem
。
我甚至尝试过git
命令,但即便找不到。有人可以帮忙吗?
答案 0 :(得分:0)
您需要先安装ruby
和ruby-dev
! (和rubygems-integration
对于Debian 8)
staging:
type: deploy
script:
- apt-get update -yq
- apt-get install -y ruby ruby-dev rubygems-integration
- gem install dpl
- dpl --provider=heroku --app=teeth-taroko --api-key=$HEROKU_STAGING_API_KEY
only:
- develop