Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,246
Community Members
 
Community Events
184
Community Groups

Running migration on heroku

Edited

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

1 answer

0 votes
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2021

Hi @Eduardo de Vila

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?

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2021

@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

Like Eduardo de Vila likes this

@Halyna Berezovskathank you about the answer. I just followed the article and now it's working perfectly.

Like Halyna Berezovska likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events