heroku / heroku-buildpack-cli Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I'm trying to run a release script to copy a database from a staging environment to a review app.
# In release script...
heroku config:set HEROKU_API_KEY=`heroku auth:token`
heroku pg:copy stage-app-name::$DATABASE_URL $DATABASE_URL -a $HEROKU_APP_NAME --confirm $HEROKU_APP_NAME
But I get authentication errors.
› Error: not logged in
› Error: Missing required flag:
› -a, --app APP app to run command against
› See more help with --help
▸ Invalid credentials provided.
heroku: Press any key to open up the browser to login or q to exit: ▸ Invalid credentials provided.
Enter your Heroku credentials:
Email:
So, I'm trying to figure out how to login the best way in a review app environment in order to use the CLI commands during the release phase. Is the recommended way to use a permanemtn machine user? Or to do it in a more ephemeral way each release?
I think I can add a user, store creds in environmental variables, and then use those to login, but I'm not sure of the best option. I figure plenty of other people want to do this or have accomplished it already.
We had a simple ruby app that used the Ruby buildpack, this buildpack, and Heroku scheduler to do heroku pg:backups capture #{database} -a #{app}
every hour. About two weeks ago this started failing. When I heroku run bash -a <app-name>
into the app and try to manually run the commands, I get first the error:
~ $ heroku pg:backups -a karat
▸ heroku-cli: This CLI is deprecated. Please reinstall from https://cli.heroku.com
▸ Invalid credentials provided.
▸ API key is currently set by the HEROKU_API_KEY environment variable.
▸ Ensure this is set to a correct value or unset it to use the netrc file.
~ $ heroku --version
▸ heroku-cli: This CLI is deprecated. Please reinstall from https://cli.heroku.com
Is this buildpack up to date? Thanks.
Adding this buildpack to app.json
for a review app deployment fails:
# app.json
...
,
"buildpacks": [
{
"url": "heroku/ruby",
"url": "https://github.com/heroku/heroku-buildpack-cli"
}
]
...
Release log feedback:
/bin/sh: 1: bundle: not found
When running on CI I get this:
-----> heroku-cli app detected
=== Fetching and vendoring Heroku CLI into slug
=== Installing profile.d script
heroku/7.22.7 linux-x64 node-v11.10.1
=== Heroku CLI installation done
-----> Ruby app detected
bash: /tmp/buildpacks/be6d1a8141ea11e9dcd5364e31ecb61cbd57dcbaaab2823a85be72aa27407c6ca545b19fc22fd2ec0a4a456498d20fbcb40c682ee74dc5019358a712a0dfde5e/export: No such file or directory
The cause is likely the same as heroku/heroku-buildpack-ruby#858, that not export file is being written.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.