You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi guys, I have a doubt about how I can run the migration on Heroku after deploy using pipe, can you help me with that?
This is my pipelines.yml:
image: ruby:2.4.2
pipelines:
default:
- step:
caches:
- bundler
- yarn
script:
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
- apt-get install -y --force-yes nodejs
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt-get update && apt-get install -y yarn
- yarn install
- export DATABASE_URL=postgresql://caiena:caiena@localhost/alpop_test
- bin/ci
- bin/webpack
- rspec
- cd ..
- tar czfv application.tgz build/
- mv application.tgz build/
- cd build
artifacts:
- application.tgz
services:
- redis
- postgres
- step:
name: Deploy to production
deployment: production
script:
- pipe: atlassian/heroku-deploy:0.1.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: "application.tgz"
definitions:
caches:
bundler: ./vendor
yarn: ./node_modules
services:
redis:
image: redis
postgres:
image: postgres
environment:
POSTGRES_DB: alpop_test
POSTGRES_USER: caiena
POSTGRES_PASSWORD: caiena
Thank you for your question!
Currently the pipe support only deploy command.
Other commands you could run directly with the heroku cli.
Cheers,
Oleksandr Kyrdan
I see, is it possible to run the Heroku CLI from the pipelines? If it is possible, can you send me an example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Eduardo de Vila yes, for sure, you just execute bash code, just like you installed heroku cli locally to linux (follow https://devcenter.heroku.com/articles/heroku-cli#other-installation-methods) and follow also heroku doc depending on what you exactly need https://devcenter.heroku.com/articles/heroku-cli#getting-started.
Perhaps, if you need to login, you will need to create some secured repository variables for that to not expose this in the pipeline
Regards, Galyna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Halyna Berezovskathank you about the answer. I just followed the article and now it's working perfectly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.