Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline support #26

Merged
merged 6 commits into from
Feb 13, 2022
Merged

Pipeline support #26

merged 6 commits into from
Feb 13, 2022

Conversation

xavdid
Copy link
Owner

@xavdid xavdid commented Feb 2, 2022

Adds support for specifying a --pipeline-name and --pipeline-stage instead of an --app. Fixes #25.

@xavdid
Copy link
Owner Author

xavdid commented Feb 2, 2022

@ErlanBazarov @mpvosseller ok, i've got a proof-of-concept up! It's only the pull command so far while we make sure this does what you want.

Unfortunately, I don't use heroku much these days and don't have any pipelines set up correctly to actually use this feature. So, I'd really appreciate a hand testing it. To install it:

  1. Have yarn and node.js installed locally
  2. Clone this repo
  3. git checkout pipeline-support
  4. yarn
  5. heroku plugins:link

Now when you run heroku config:pull, it'll use this branch. The --help docs are updated, so let me know if they make sense. You should be able to play around and reference an app by --pipeline-name and --pipeline-stage instead of --app.

Alternatively, you could (temporarily) invite me to a sample pipeline that is already set up and I can test this out manually.

Thanks for your help here!

@mpvosseller
Copy link

@xavdid Amazing! I'll try to check this out soon. FWIW setting up a pipeline to test this is trivial and can be done for free with an empty placeholder app and pipeline.

  • Create an empty app
    heroku apps:create my-test-app

  • Create an empty pipeline with your app as staging (every pipeline needs at least one app)
    heroku pipelines:create my-test-pipeline -a my-test-app -s staging

  • Manually connect the pipeline to a GitHub repo and enable Review Apps

    • Heroku Dashboard -> My Test Pipeline -> "Connect to GitHub" -> Find and select a repo -> Connect -> Once Connected -> Click "Enable Review Apps" below and do so with default settings
  • You should now be able to test your tool!

  • See the review app config vars in the Heroku Dashboard:

    • Heroku Dashboard -> My Test Pipeline -> Settings -> Review Apps -> Reveal Config Vars

@mpvosseller
Copy link

@xavdid I tested it out and config:pull appears to do exactly what I would like! I also just invited you to a new heroku team (configpullteam) with a pipeline (cft-pipeline) so you can test it out yourself.

heroku config:pull --pipeline-name=cft-pipeline --pipeline-stage=review

@xavdid
Copy link
Owner Author

xavdid commented Feb 12, 2022

@mpvosseller awesome, great to hear!

I'm not seeing that invite, in my heroku dashboard but it's probably ok! If it's working, I should be able to add the other pieces.

@xavdid
Copy link
Owner Author

xavdid commented Feb 12, 2022

Ok, that should do it!

I can do some manual testing later, but the PR as written should push and pull using the exact same logic as before, but now targeting pipes instead.

You're welcome to try the heroku invite again, or you can just test it yourself and I can release once you give the 👍

@xavdid xavdid marked this pull request as ready for review February 12, 2022 02:21
@xavdid
Copy link
Owner Author

xavdid commented Feb 13, 2022

Ok, tests look good! Merging and deploying.

@xavdid xavdid merged commit 42daaa7 into master Feb 13, 2022
@xavdid xavdid deleted the pipeline-support branch February 13, 2022 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is it possible to push to pipeline's review app config vars?
2 participants