I'm trying to add 2 badges to my github repo readme, so I can see build status of my dev branch and master branch. I was able to add the badges (and they work too) but I'm not able to differentiate between the badge for master or dev.
Is there a way to add custom text something [dev|passing] [master|failing], etc?
You can use shields.io which provides quite a lot of badges.
They have one for travis and you can specify the left side text of the badge.
As an example for one of my repo:
The normal link:
Build branch : https://img.shields.io/travis/73VW/TechnicalReport/build.svg
Master branch: https://img.shields.io/travis/73VW/TechnicalReport.svg
Renders as:
A bit of custom:
https://img.shields.io/travis/73VW/TechnicalReport/build.svg?label=Whatever+You+Want
https://img.shields.io/travis/73VW/TechnicalReport.svg?label=Master
Renders as:
This works this way: https://img.shields.io/travis/USER/REPO/BRANCH.svg?label=YOURLABEL
Be aware that the branch part is not needed if you want to use master branch.
I Agree this slows down a bit the load of your github (or whatever) page because shields.io is not really fast but this is cool.
And you can also change badge style:
: https://img.shields.io/travis/73VW/TechnicalReport.svg?style=plastic&label=Custom+Label
: https://img.shields.io/travis/73VW/TechnicalReport.svg?style=flat-square&label=Custom+Label
: https://img.shields.io/travis/73VW/TechnicalReport.svg?style=for-the-badge&label=Custom+Label
: https://img.shields.io/travis/73VW/TechnicalReport.svg?style=social&label=Custom+Label
Have fun!
I'm afraid this isn't possible at the time. I was looking into this a while ago and stumbled upon this issue, which is still open and unresolved.
Related
I have a couple of questions about devops/docker/github actions.
I'm pretty new to all of this, seen some full implemented projects but I'm missing some "parts".
I'm trying to set up a "complete project" myself, just for exercise/training and getting familiar with everything.
For now, I have 3 branches: dev, uat and master.
I work on dev (it's the default branch). I create a local branch of the dev branch and push my local changes to that branch.
Every time I finish a job (let's say user login functionality), I push this to uat.
Some customers get access to the uat server and are able to test these new functionalities. After they accepted the changes, everything from uat goes to master (which is the live server).
So far so good I guess, and if I miss something or there are things I can do better please let me know!
What my questions are:
If I push changes to the dev branch, it should automatically test these changes before I'm able to open a pr to the dev branch, is this possible with Github Actions? Or do I interpret the things I read on the internet wrong?
When things are tested during this push, do I have to spin up a Docker container? Or do I test these things on the ubuntu VM given by Github Actions? What is the best practice?
I know there is the possibility to do both, but what is considered best practice?
Does someone has an example? Or a tutorial/blog about this? I'm trying to connect the dots but I'm a little stuck...
Cheers and many thanks for the help!
1 - This video explains it simple and quick
2 - If you deploy it using docker, test it using docker
3 - see 1
Edit:
This other video is also a really nice tutorial that uses docker.
Jenkins is used to poll SCM (SVN) using SVN plugin, then build using Ant/Maven/Gradle
In Post Build Actions, I`ve chosen Editable Email Notification, and under section of Triggers chose Always
And in Content section I have set the following tags (as is):
$PROJECT_DEFAULT_CONTENT
$CAUSE
$BUILD_LOG_REGEX
$CHANGES
Unfortunately it does not do what I want. First two is fine, but last two, I need them to send errors and warnings (only, not all the log), and what changes and in what particular files were made since last build.
Thank you.
Ok, no one answered, but I find solution for changes on my own:
${CHANGES, showPaths=true, format="%a: %r %p \n--\"%m\"", pathFormat="\n\t- %p"}
As for $BUILD_LOG_REGEX, now when I know format, I`ll find solution too some time later.
I have a change-set in Gerrit that for a while has been based off of the master branch.
So, my push commands have looked like this:
git push origin HEAD:refs/for/master
But now, I need to start working off of a topic branch (but still using the same change-set).
So, I tried pushing like this:
git push origin HEAD:refs/for/myTopicBranch
But, this seems to have created a whole new change-set, rather than simply altering the metadata of my current change (as updating a topic does).
Is there a way associate a change-set with a different branch after creation?
No. You can't do that. If you want to work in a different branch, push to this new branch like you have done (git push origin HEAD:refs/for/myTopicBranch) and abandon (using the Gerrit web interface) the original change.
I setup travis-ci for a new rails project, but for some reason the build status is always shown as unknown in my README. I have googled a bit and not been able to find any solutions. Although I have had some similar symptoms as others. E.g., all of my builds show they are still building, but if you look at the individual builds they are passed or failed.
BTW, should this be reported as a travis-ci issue?
I ran in to the same issue. I was able to address the issue by adding the branch parameter to the image url:
This url did not work
https://travis-ci.org/kandadaboggu/iprofiler.png
This url worked
https://travis-ci.org/kandadaboggu/iprofiler.png?branch=master
.com will not work here, as per latest. This works for me
## Travis-Build
[![Build Status](https://api.travis-ci.org/sananand007/genTspsolver.png?branch=master)](https://travis-ci.org/sananand007/genTspsolver)
Travis-Build
I use the Travis badge in our project's README in Github and I had the same issue. It turned out I did not have the correct settings in Travis.
From your Travis dashboard, go to More options => Settings. For me, I needed to turn on "Build pushed branches." After that, I clicked More options => Trigger build, and triggered a build.
Once Travis ran (and passed), I went back to Github and hard refreshed the page. The Travis badge had updated to green, or "build: passing".
In my case, the links I used were based on travis-ci.org when as of May 2018, all links should use travis-ci.com
See this announcement
This registered unknown
https://travis-ci.org/jlboat/FastaUtils.png?branch=master
This registered passing
https://travis-ci.com/jlboat/FastaUtils.png?branch=master
My issue was just that I this was my first build on travis-ci.org after I made my app public instead of private. I just had to wait for the image to be updated to reflect the new build status, which took a couple minutes. It is a free service on the .org rather than the paid service on the travis-ci.com so we have to wait on the shared resources to create the build status image.
In my case, the issue resolved by opening the image url on browser. You can get the image url from the Status Image popup by clicking build status badge on your project dashboard. The build status changed immediately after the image url fully loaded on the browser. For example click me
Follow a simple rule: use link of your travis repository dashboard.
In my case it's https://travis-ci.com/<username>/<repository>
I am trying to migrate the setup here at the office from SVN to Git and am setting up Redmine as the host for our projects and issue management (Currently we use a version of Gforge + SVN). I should preface by saying that I'm an embedded C software developer by day and have basically zero experience with Rails or web apps, but I like trying new things so I volunteered to set up the project management tools which will take us into the future.
I have Redmine setup and am using Gitolite as the Git repo manager. Additionally, I am using the ericpaulbishop/redmine_git_hosting plugin to facilitate automatic public ssh key pushing to Gitolite and automatic repo creation when we register a new project. Everything seems to work except the repo view within the project does not keep track of the changesets. (The "History" is just empty, although when you view the files, it does show the latest version correctly)
I copied the post-receive hook from the plugin's contrib directory to the .gitolite/ common hooks, but again I know little about Ruby and how these gitolite hooks work so I don't know how to debug this. I notice there are log messages and things in the hook, but I have no idea where those are printed, etc...
I even tried the Howto on the Redmine wiki, HowTo setup automatic refresh of repositories in Redmine on commit:
#!/bin/sh
curl "http://<redmine url>/sys/fetch_changesets?key=<your service key>"
Any ideas on where I start debugging? I've been able to resolve every problem up to this point, but I'm a little stuck now. The plugin doesn't make it obvious how this is supposed to work, and to be honest, I'm not even sure if this is a problem with Redmine not reading the repo correctly (or at all), or gitolite not communicating as Redmine expects, etc...
I guess I could answer this...
I checked the issues under the Github page and I found this on:
https://github.com/ericpaulbishop/redmine_git_hosting/issues/89
Which was pretty much exactly my problem. This does appear to be a small bug in the plugin, but you can work around it by changing Max Cache Time to "1 minute or until next commit". This immediately fixed my problem. I simply left it like that but one of the posters claimed that you could change it back to until next commit and it works from then on...