Giter VIP home page Giter VIP logo

heroku-pipeline's Introduction

This older "pipelines" feature has been superceded by the new Heroku Pipelines.

A new accompanying Heroku CLI plug-in is available.

Use of the older pipelines feature provided by the plugin below is no longer recommended. To uninstall it enter $heroku plugins:uninstall heroku-pipeline. Please upgrade as soon as possible. This older feature will be disabled soon.

heroku-pipeline

An experimental Heroku CLI plugin for continuous delivery on Heroku.

This plugin is used to set up a simple pipeline of apps where the latest slug of one app can be promoted to the next app downstream. The promotion only copies the upstream build artifact and leaves the downstream app's config vars, add-ons, and Git repo untouched. An app can only have one downstream app, but there is no limit to the length of the pipeline or the number of upstream apps.

Example Usage

An example of a simple pipeline where developers push to a staging app and later promote the slug to production:

$ heroku labs:enable pipelines
Enabling pipelines for [email protected]... done
WARNING: This feature is experimental and may change or be removed without notice.
For more information see: https://devcenter.heroku.com/articles/using-pipelines-to-deploy-between-applications

$ cd deep-thought-1234-staging

$ heroku pipeline:add deep-thought-1234
Added downstream app: deep-thought-1234

$ heroku pipeline
Pipeline: deep-thought-1234-staging ---> deep-thought-1234

$ git commit -m "A super important fix"

$ git push heroku master

...

$ heroku pipeline:diff
Comparing deep-thought-1234-staging to deep-thought-1234...done, deep-thought-1234-staging ahead by 1 commit:
  73ab415  2012-01-01  A super important fix  (Joe Developer)

$ heroku pipeline:promote
Promoting deep-thought-1234-staging to deep-thought-1234...done, v2

$ heroku releases --app deep-thought-1234

=== deep-thought-1234 Releases
v2  Promote deep-thought-1234-staging v6 0f0a53b  [email protected]   1m ago
v1  Initial release                               [email protected]   2m ago

Installation

$ heroku plugins:install [email protected]:heroku/heroku-pipeline.git

Commands

  • heroku pipeline display info about the app pipeline
  • heroku pipeline:add DOWNSTREAM_APP add a downstream app to this app
  • heroku pipeline:remove remove the downstream app of this app
  • heroku pipeline:diff compare the commits of this app to its downstream app
  • heroku pipeline:promote promote the latest release of this app to its downstream app

Rolling Back

heroku rollback is a standard heroku command that allows you to rollback when something goes wrong. Its behavior is the same when using pipelines. Use it anytime you need to revert a pipeline promotion.

heroku-pipeline's People

Contributors

idelorenzo avatar jsimone avatar mmcgrana avatar ryanbrainard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heroku-pipeline's Issues

using rest for promote

Hey Guys ,

We are using some rest apis to call heroku cli commans as show releases and rolllback, is it possible to call the same way to 'promote' ?

401 on app access is logging out user without detailed error message

When heroku pipline is run, it has an authentication failure, and asks for re-authentication. When I re-authenticate, it has a failure again and asks for authentication. The next time I run another heroku command it asks for authentication, and it saves it correctly. However if I try heroku pipeline again it de-authenticates.

> heroku apps
=== My Apps
canada-development
django-arbitrage
django-letters
saul

> heroku pipeline:add canada
Authentication failure
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden): 
Authentication successful.
Authentication failure
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden): 
Authentication successful.
Authentication failure
Enter your Heroku credentials.
Email: ^C !    Command cancelled.

> heroku apps
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden): 
=== My Apps
canada-development
django-arbitrage
django-letters
saul

> heroku apps
=== My Apps
canada-development
django-arbitrage
django-letters
saul

No clear way to revert or demote if there is a production issue

When going from staging to production, there may be unanticipated consequences due to scale. Being able to back down to a previous version quickly and reliably is important. There is no 'revert' or 'demote' command, so this process is going to require preparing and pushing another change upstream, in a potentially complex and stressful situation.
consider adding a command to demote or revert the last production promote
(Issue based on comments from Tantek Çelik)

Promote fails with "APP NAME already exists."

I've setup heroku pipeline and diff reports that there is one pending commit to. When I attempt to promote, I get the message "APP NAME already exists."

$ heroku pipeline:promote --app myapp-staging
Promoting myapp-staging to myapp-production.... !    myapp-staging already exists.

Pipeline appears to be setup properly:

$ heroku pipeline --app myapp-staging
Pipeline: myapp-staging ---> myapp-production

$ heroku pipeline:diff --app myapp-staging
Comparing myapp-staging to myapp-production...done, myapp-staging ahead by 1 commit:
  4fb94eb  2013-01-19  Add meta description  (Ryan Twomey)

Let me know if you need any more info.

ENV Variable Dependent Rails Assets Support?

Problem:

  • Assets are compiled in the staging environment with staging environment variables
  • Upon Pipeline promotion, assets are not recompiled with production environment variables.
  • This leads to a fast promotion, but possibly incorrect assets.

Example:

  • Rails .js.erb asset file using an ENV variable. Example:

var shareURL = 'https://www.facebook.com/sharer/sharer.php?app_id=12345&u=http%3A%2F%2F<%= ENV['APP_DOMAIN'] %>/r/'+ referral_code.code +'&display=popup&ref=plugin&src=share_button';

Staging:
ENV['APP_DOMAIN'] == 'staging.example.com'

Production:
ENV['APP_DOMAIN'] == 'example.com'

Result:

Production shareURL incorrectly uses 'staging.example.com'

Any advice for situations like this? Can I no longer use Heroku Pipelines?

Use Ruby 1.8.7 compatible JSON lib

The JSON lib in heroku-pipelines requires Ruby 1.9.3. This should be loaded by Toolbelt, but there are issues with that. The actual issue is with Toolbelt, but the workaround to just use a different JSON lib that is 1.8.7 is simple enough not to warrant a change in this plugin.

promote but compile again

Small question is it possible to recompile
automatically the slug during the promotion
(I want to include another dependency, during promotion)

Thanks in advance
Roan

plugin prompts for credentials when there is no access to the downstream app

The plugin should note that the user doesn't have access to the downstream app, not prompt for credentials.

Other heroku commands run in the context of an upstream app are also prompting for credentials if the user doesn't have access to the downstream app. Presumably there's some check going on for access to the downstream app on every command.

pipeline:promote failing with uninitialized constant Heroku::OkJson

[colin@ayla thesite (master)]$ heroku pipeline:promote
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       uninitialized constant Heroku::OkJson (NameError)
    Command:     heroku pipeline:promote
    Plugins:     heroku-pipeline
    Version:     heroku-toolbelt/3.39.5 (x86_64-darwin14) ruby/2.2.2
    Error ID:    58a6420eba27463da414dec94b028aab


    More information in /Users/colin/.heroku/error.log

I recently used OS X's Migration Assistant to initialize a new workstation. This could be an artifact of that.

I attempted to remove and reinstall the pipeline plugin, but it looks like it's not available:

$ heroku plugins:install heroku-pipeline
Installing plugin heroku-pipeline...  ▸    no such package available
 !    error installing plugin heroku-pipeline

Display diff and prompt confirmation before promoting

heroku pipeline:promote
Comparing deep-thought-1234-staging to deep-thought-1234...done, deep-thought-1234-staging ahead by 1 commit:
  73ab415  2012-01-01  A super important fix  (Joe Developer)

Are you sure you would like to promote these changes? Type target app name to continue:
deep-thought-1234
Promoting deep-thought-1234-staging to deep-thought-1234...done, v2

Also allow optional override with --confirm flag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.