Heroku CI status badge - heroku

Im using Heroku CI to run tests in Heroku Pipeline. I would like to add CI status as badge in the README.md file at Github, for master branch.
But so far, I have not found out-of-box solution on this request. Any tip on workarounds to get this work without building the ci-badge solution myself?
Few inspirations I have found:
https://github.com/heroku/heroku-ci: (see the status badge on top of README.md. However, image URL is specifically searching for pipelines for the Heroku CI application, and doesnt work with other applications)
https://github.com/pussinboots/heroku-badge: displays deploy badges, which is not important for me. Also, this repo/app doesn't seem to be maintained anymore (last commit 2 years ago)

I agree that a good Heroku CI badge generator is lacking! Heroku is still running one here, but the linked GitHub repo is unfortunately 404 (and, as you noted, that generator doesn't seem to work with pipelines other than Heroku's own, which makes it not that useful).
In any and all cases, inspired by your question, I went ahead and created a Heroku CI badge app that you can deploy to your Heroku account! Please find it here.
Feel free to open issues / fork it if you want to change anything.
Cheers

Related

How do I duplicate my Heroku app to add to a pipeline?

I'm beginning to understand how Heroku works, but haven't yet used a pipeline. I have an app I'm working on that is near its first production version. I'd like to begin using pipelines.
But I don't understand how to begin. What do I need to do to make a copy of the current app and have that copy be in the development stage and make another copy for the staging stage? Do I fork my git repository twice and add each one?
I'm trying to take this one step at a time. I don't need GitHub integration yet. This is a small project and will not have any pull requests for quite some time, if ever. I'm only interested in the ability to develop, stage and release in the three stages offered by Heroku.
While pipelines do use multiple apps, they should use the same git repository with different remotes. Heroku's help page helped me understand that the process is to link the repository to each app different remote names and then push to the remote that I'm currently working on.

Heroku not implementing latest pushes from github repo in deploy

I have three different apps I have set up on heroku. When I run the apps, the apps show up in the browser, but they are very old versions of the apps.
I have configured each project to deploy a new build everytime changes are pushed to the linked github repos, and the activity feed claims the builds are successful. The logs also don't appear to show any errors.
I also know heroku is receiving the pushes because it is running new builds when I push and when I monitor the "see diff", the changes are displayed.
I am at a total loss as to what is going on and it's very frustrating. If nothing else, does anyone have any suggestions for similar services to heroku that do not have so many deploy issues?
Try and make sure heroku has the latest, from a local GitHub repo clone:
cd /path/to/my/local/clone
git remote add heroku /url/heroku/repo
git push --force heroku HEAD:master
That will make sure there is no "detached HEAD" situation on the heroku side, which would explain why the push does not update the working tree.

how to have a deployed heroku build while maintaining separate development build

I'm somewhat new to maintaining separate production vs development builds of an app.
I want to have my current build deployed to heroku so i can easily get it in front of people for critique but I'd also like to run a local version as well so i can make changes and see them quickly on the fly.
With my app on heroku, everytime i make a change, I have to push to github then hit the deploy button. This takes a relatively long amount of time compared to just launching the app on localhost and just refreshing the browser page to see how the changes came out. This is fine if you have made a ton of changes and you know they all work as expected, but its horrible for trying incremental changes, as you can imagine.
I know this is sort of a newbie question, but how can I have the best of both worlds?
The only way to achieve something like this is with review apps.
Instead of doing a git push, you will need to enable GitHub Sync. You will be able to deploy either through the heroku dashboard, or automatically when a push is made to master.
Review apps will automatically create a test app and configure it, for each pull request.
Then, when you wish to do QA with other people, you just have to give them the address to that review app where the new code is deployed instead of the main one.

Is it possible to comment heroku build

Is there any possibility how to comment a deployed build on heroku?
For example, I want to put a simple comment before releasing a new version to the production, like version x.y.z. - stable
So if the build from a stage pipeline somehow failed, i know where to return...
I hope there is such an addon, but I guess this should be somehow part of heroku, shouldn't it?
Thanks!
You can leave an annotated tag in your Git repo.

Continuous integration (CI) with Phabricator?

I tried continuous integration tools Travis CI, CircleCI and codeship, but found none of them provide support document for phabricator. Does anyone have ideas about how to do continuous integration (CI) with Phabricator?
I have done an integration with Travis-CI by adding post diff and land hooks to Phabricator to push diffs as branches to GitHub where Travis looks for branch updates. As far as I know, Travis-CI integrates only with GitHub, so if your main repo is there and Phabricator is pointing to it, it can be done.
If you want to take this approach, the place to start is with creating your own ArcanistConfiguration and overriding didRunWorkflow. See also how to create a new library. The API documentation is pretty good, but I had to go through some trial and error to get what I wanted. The Phabricator people are probably happy to answer questions.
You can also look into the Phabricator conduit differential.createcomment to script messages to diffs like so:
arc call-conduit --conduit="https://my.phabricator.com/" --arcrc-file="robot.arcrc" \
differential.createcomment <<EOF
{"revision_id":"1234","message":"Yer build done failed"}
EOF
Where robot.arcrc is an arcrc file with the credentials to push messages, and 1234 is the revision number. You would have to use the conduit API to get the revision number.
So, I think the answer is you may have to build your own custom solution depending on which CI integration for the CI tool you want to integrate with. And here's a discussion of Travis support for Phabricator.
Edit: Here's traphic, an example of extending arcanist to push diffs to branches on GitHub on arc diff and remove them on arc land. As Travis-CI looks for update from GitHub, it will build your diffs.
Side note: This is mostly a brain dump. I know good answers have more code examples and links are frowned on, but the question was pretty open ended and was looking for pointers, so I'm trying to be helpful.
If you are using Jenkins, the nice guys at Uber created a Jenkins Phabricator Differential plugin that makes it possible to really clean up your job configs (if you've already set them up using the links from zerodiff's post).
Might be worth noting that Phabricator's tool to do continuous integration (i.e. Harbormaster) is currently under development.
You can find this in a table in their comparison page. See http://phabricator.org/comparison/

Resources