Why is my travis-ci build status always reflected as unknown?
Asked Answered
K

7

20

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?

Krall answered 19/8, 2012 at 21:51 Comment(1)
Best to contact them directly. Stackoverflow is not a support forum for services and the travis-ci people are pretty speedy when they know about issues.Carleton
N
21

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
Nihon answered 9/3, 2013 at 10:42 Comment(1)
This would be the correct answer, we have later changed our web interface to give links with the branch parameter set.Bueno
M
3

.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

Build Status

Mcmillon answered 13/1, 2019 at 18:2 Comment(2)
As of April 5th of 2020, this should be the right answer.Disconcert
so just adding a png nothing special.Smutty
F
2

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".

Fennell answered 5/2, 2018 at 21:55 Comment(1)
Yeah, but if you use the wrong URL as mentioned in the answers above, the badge will only stay green for a while (cache timeout?) and then will revert back to build failed...Peneus
M
2

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

Monney answered 2/8, 2018 at 14:52 Comment(0)
O
0

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.

Outfox answered 14/4, 2018 at 17:42 Comment(0)
T
0

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

Tomas answered 15/5, 2019 at 8:15 Comment(0)
C
0

Follow a simple rule: use link of your travis repository dashboard.
In my case it's https://travis-ci.com/<username>/<repository>

Conveyance answered 18/12, 2019 at 9:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.