CircleCI never completes - ruby-on-rails

I have a Ruby/Rails project I inherited. It's a private github repo, and it's hooked up to CircleCI in the standard way: github won't allow a merge til the required CircleCI tests pass. That's fine, but when I create a pull request, I only get "ci/circleci — Waiting for status to be reported" and that never changes (I waited all weekend). I'm not sure where to look for log files, or what might be going wrong. I'm new to CircleCI. Any help? The last item I see in my circleci dashboard is months ago, so it's almost like it's not seeing the new pull request. But I can see github sending it and getting a 200 reply.
BTW, the circle.yml just sets the machine timezone, nothing else, nothing fancy.

You may need to configure the branch settings:
https://circleci.com/docs/2.0/workflows-waiting-status/

Related

Jenkins GitHub Webhook not triggering builds

I have a Jenkins server (2.249) setup and I have connected my GitHub account and tested the connection and it works fine, but for a normal pipeline job where you enter the GitHub repo url, Jenkins seems to add an extra slash at the end? So I can't get my normal pipeline job to build on a push event, I've checked the logs and it says:
skipped [repo-name] because it doesn't have a matching repository.
So I've starting to think its because Jenkins is adding an extra slash at the end of my repo url? The webhook on the GitHub side works as it gives back a green tick and it works on another multibranch job for push events, just not the normal pipeline jobs.
Don't know if the problem is still on after more than one year but because I've just faced the same issue, here is an answer that help me to understand : https://serverfault.com/a/884717
Just to resume the answer : you have to complete the git part (scm) of your Project Configuration :
For my part: as the project is a private one, in an organisation that I can't update to add a personal token (as I'm not the owner of the resource - organisation), I choose to use the git+ssh url with a ssh key access to this repo. The next trick for github is to add the github's IPs to the jenkins user know_hosts file !
The reason behind the need to add twice the repository url is obscure. But I could only see that in https://github.com/jenkinsci/github-plugin/blob/master/src/main/java/com/cloudbees/jenkins/GitHubRepositoryNameContributor.java#L113 the method parseAssociatedNames will try to get the Jenkins'job associated names from :
com.cloudbees.jenkins.GitHubRepositoryNameContributor$FromSCM
com.cloudbees.jenkins.GitHubTrigger$GitHubRepositoryNameContributorImpl
org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRepositoryNameContributor
I think the third one is for multibranch pipelines. I don't really know for the second but indeed the first one is fromSCM configuration !

Suspending a Travis build

I have a travis.yml script as part of a package on my github site. So every time I push an update, it is automatically rebuilt and checked. However, sometimes I know it won't build correctly and I am just pushing my changes to keep from losing them.
Another incentive for suspending a build is that I literally cringe when I receive an e-mail with a subject line saying it has "errored." I wish somebody would tell this Travis guy that "error" is a noun, not a verb.
The best way to handle your travis build would be to setup a branch where the build is trigger and to build in another branch. This way, you will do what you want and only trigger the build when you will do a merge.
About the verb errored, it isn't currently a verb. But it will maybe be, like to google.
error (third-person singular simple present errors, present participle erroring, simple past and past participle errored)
(computing) To function improperly due to an error, especially accompanied by error message.
The web-page took a long time to load and errored out.
Remove that line of code and the script should stop erroring there.
This directory errors with a "Permission denied" message.

Build Jenkins project on BitBucket pushes and pull requests

I have a scenario where I'm setting up Jenkins for my app. I have BitBucket set up and firing appropriate webhooks.
I want to start a build whenever a push is made to the repo as well as whenever someone creates/updates a pull request.
I've looked at the BitBucket Plugin. It works good if I have the BitBucket webhook to fire for all pushes.
Then I added the BitBucket Pull request plugin to build on every pull request create/update. So I changed the BitBucket webhook preferences to fire on pushes and PR creates/updates.
Unfortunately, these plugins have conflicting settings, hence they cannot be used at the same time (as per my research, the minute I send custom webhooks from BitBucket, the first one stops working, but the second one works)
Has anyone been able to set this up correctly? Maybe there's a plugin for what I want, but I couldn't find it.
I want to keep writing a proxy in front of Jenkins to manage webhooks the last option, only if there really is nothing I can do.
Thanks for the help!

Travis basic understanding and set up

I have a little-to-none understanding of what travis-ci is. All I know ( and I could be wrong ) is that, it is where a github code is hosted. This code has a test written in Unit Tests, and Travis is a way to automatically test whenever a new commit is pushed to github. As I said, I could be totally wrong. Wikipedia article didn't help me understand this.
But, in the case that it is a test automation software, then how do I set up a simple application? I have a github account, and I know the first step is to register in travis, connect a github account and place a travis.yml file but what is next?
Any help would be appreciated.
What Travis CI does is connects to your GitHub repository to run you code's tests (Scripts that write to confirm that your code is working) on every commit you make on GitHub. It also runs on pull requests, which makes it great for checking if a pull request breaks anything. You can get started by going to the Travis CI and hitting sign in on the top right corner. You'll sign in with your GitHub account, and on the profile page you can turn on the repositories that you want Travis CI to test. Next, you'll need to create a .travis.yml in the repositories you want to test. You didn't specify what language you to would like to use so I'll refer you to the Travis CI getting started page which has examples in every language that Travis CI supports.
If you want to read up more I reccomend taking a look at the Travis CI docs.

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

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>

Resources