why is my organisation not available on travis-ci? - travis-ci

I setup an organisation on github a while (maybe a week) ago, and I am yet to see it appear on travis-ci. The organisation is mr-php (https://travis-ci.org/profile/mr-php / https://github.com/mr-php).
Do I have to do something to make it appear, or if this length of wait usual?

It was to do with organisation permissions. I had to go to GitHub and into the Travis-CI app settings then give it permission to access the organisation.

Please login into Github and then sign into Travis CI.
Give Travis permissiona to access the organisation.
And on your profile page https://travis-ci.org/profile/mr-php
use the "sync" button to synchronize your repos.
If no repos are found, file a bug.
If repos are found: flick the switch to turn Travis on for your repo.
You might also trigger your first build with a git push.
Or go back to your repo on Github and into Settings, then Webhooks & Services.
Click the "Travis CI" link, enter PW again and trigger a manual build, to test the service.

Related

Unable to create Build on Docker Hub from GitHub

I just created a new account on hub.docker.com. I successfully linked my GitHub account in settings. After I clicked on Create Repository, I am presented with the familiar screen, where I can create a new docker repository. However, the first strange thing here I noticed is, that I don't have the additional build options.
This is what is missing:
I went on and created a blank repository. After that I went to the builds tab and clicked on the GitHub button, which said I was connected:
In the following screen, I can select the the desired repository. After filling out the remainder of the form, nothing happens after I click Save or Save and Build.
I do not see any error messages popping up either.
Any ideas what I am doing wrong with this newly created docker account?
Thank you very much for your time and help!
For GitHub, I'd recommend this guide for setting up a connection with GitHub Actions and Docker.
I've only set up a connection with BitBucket and Docker, but I'll share the process with BitBucket for anyone else searching, or in case that provides any additional insight that might help with GitHub.
In BitBucket, you need to set up a pipeline to push the build to the repo. The docs here outline the process.
A quick summary of the steps in BitBucket:
Go to your repo in bit bucket
Click on pipelines and add the Docker template
Update the image name in the yml template
Commit the yml to the repo
Set up the variables in the repository settings in BitBucket for your credentials and repo slug
Check the status of your build in the pipelines tab, it should automatically rebuild up update.

How we can trigger jenkins job which takes source code from one repository, whenever a developer push changes to their beanstalk-git repository?

I want to run(trigger) my jenkins job whenever a push happens to developer repository.
Firstly,
i'm storing all my automation scripts in my personal GitHub.
All of my developer's code is another GitHub, i.e in beanstalk which is top of GitHub
Now whenever dev's pushes their changes to their repository, then i want trigger my jenkins job which takes source code from my personal GitHub.
So, after some research on it, i came to know Webhooks will help in this.
Bu in my case as per their are two separate repositories, i couldn't able to get what exactly i have to do.
Any solution appreciated.
One of the solution, I can think of is you can build a WebHook and Git integration on your Dev's repository to trigger your Jenkins job, and in the build steps you can perform the check-out of your git repository source code using git commands.

Sourcetree add bitbucket with two factor auth

I've enabled two factor authentication for my bitbucket account.
Now Atlassian Sourcetree app on Osx doesn't works, it is unable to login on bitbucket.
How i can configure SourceTree to use bitbucket two factor auth?
Skip the initial login and from bitbucket.org, click the down arrow next to the repo name (to the left of the ssh/https link) and click 'clone to source tree' and it will work fine assuming you have your ssh keys setup already.
This worked fine for me when I just installed it and ran into the same issue of not allowing me to login initially.
-- update June 2016 --
Bitbucket now allows you to add an app password for specific apps like source tree. It is found under bitbucket settings > access management > app passwords. Once I created one and added the password to my source tree settings then I was able to successfully connect and reconnect to bitbucket to push and pull updates and create new repos.
Madness. Sourcetree supports Github MFA, but not BitBucket :(
Update
#markyk comments that:
The task with Atlassian is "Closed" with no intention of adding support. There is a comment to "user application passwords" as a work around, which is not ideal.
Original issue (closed)
bitbucket/two-step-verification-777023203.html#Two-stepverification-ConfirmapplicationsuseSSH
Workaround
In practice, this means creating the repo on the bitbucket website, then clicking 'I have an existing project' and copy pasting the revealed git commands into the terminal, like:
cd /path/to/my/repo
git remote add origin git#bitbucket.org:username/repo.git
git push -u origin --all # pushes up the repo and its refs for the first time
git push -u origin --tags # pushes up any tags
Then (after a refresh) Sourcetree will display your new remote.
There's a known bug around SourceTree and 2FA: https://confluence.atlassian.com/bitbucket/two-step-verification-777023203.html#Two-stepverification-Troubleshootingtwo-stepverification
For future reference, the ones who have configured their accounts to use OAuth and ssh to log in, but still run into the "There was an error authenticating the request. The account is configured to use Basic Auth with HTTPS but may have 2FA enabled on the server. Please edit your account to use OAuth."
Go to the main view of Sourcetree (I.E. where you add repositories). Right click your repository and select "Convert to OAuth".
SourceTree for Windows 1.10.x and SourceTree for Mac 2.4.x both now support using OAuth over HTTPS for REST api interactions and Git/Hg calls.
In both cases this means its possible to turn 2FA on Bitbucket but continue to use HTTPS rather than SSH for the Git/Hg remote urls.

Jenkins doesn't verify/review change on Gerrit

I'm trying to configure a local installation of Jenkins to review uploaded changes on Gerrit. So far, I've gotten Jenkins to detect uploaded changes and build them (using Gerrit Trigger). However, while the build concludes successfully on Jenkins, it doesn't post any reviews on Gerrit, even though it is configured to do so. Interestingly, in Gerrit change history, I can see Jenkins having started a build:
Jenkins Patch Set 1: Build Started http://localhost:8080/job/TestProject/70/
but that's it. No results are shown after this, like successful conclusion of the build etc. Since I can see the build started result, I'm assuming I've configured the review settings correctly, but something else is causing a hold up. I've checked in the Gerrit error_log file and it doesn't show any errors. What maybe the issue?
By the way I've been able to verify/review the code as jenkins using the command line.
To make code verification possible, you have to go through the following steps:
Allow label “Verified” on Gerrit server (also see here or here);
Read this and make sure your job configured properly, because you will not build latest changesets instead;
Give access to labels Code-Review and Verified in your Gerrit project for user Jenkins;
I was able to resolve this by adding the 'Verified Label' to the Gerrit Server. The version of Gerrit I used (2.11.3) explicitly asks you to install the Verified Label, and the default option is set at No and as a result I didn't install it. I simply reinstalled my Gerrit, this time choosing Yes on Install Verified Label. If you're facing this issue, simply reinstall your Gerrit. If re-installation is not an option, read this:
http://blog.bruin.sg/2013/04/how-to-edit-the-project-config-for-all-projects-in-gerrit/
Some basic information can be found also in Jenkins plugin
Create the profile through in Gerrit web interface for your Jenkins user, and set up a SSH key for that user.
Gerrit web interface > Admin > Groups > Non-Interactive Users > Add your jenkins user.
Admin > Projects > ... > Access > Edit
Reference: refs/*
Read: ALLOW for Non-Interactive Users
Reference: refs/heads/*
Label Code-Review: -1, +1 for Non-Interactive Users
Label Verified: -1, +1 for Non-Interactive Users

How can i use Jenkins with Atlassian Stash?

I've just setup Jenkins and i have some Repositories in my Stash.
I installed the "Git plugin" in jenkins.
I can now enter the repository url but there is nothing to enter my credentials.
It's possible using
http://username:password#mydomain/xx/yy.git
but that is something i dont want to do.
What else can i do to authenticate?
I am the author of this stash plugin that might help you: https://github.com/palantir/stashbot
Taking selectively from the readme:
To work with Jenkins, you MUST install the following jenkins plugins first.
Jenkins GIT plugin
Post build task
Next, build and install the plugin using the plugin SDK (more details in the readme)
Next, the stash admin goes into the Stashbot Admin page and creates a jenkins server config - here you give it the URL, username/password, etc details of the jenkins server.
Next, for each repository a "Stashbot CI Admin" link shows up for repo admins. From there you can check the "enabled" checkbox and tell it what branches you want build (via a regex) and what command it should run to do the build (optionally verifies and publishes).
After this point, the remainder is completely self-service. Any repo admin can ask for their project to "have CI" by filling out that form, and the jobs will automatically be created in the jenkins server.
Hope that helps.
Set up an SSH key for the user that runs your Jenkins builds and add it to the repository's SSH keys in Stash. See the Stash docs for instructions.
Two things to add to Gareth's answer.
While I agree that using SSH keys are definitely better than hard-coding the username/password, it's worth mentioning that Stash (currently) scales better with HTTP when it comes to CI. If you have quite a few builds we generally recommend using HTTP. We are currently extending our Git cache support to support SSH so this no longer an issue.
Somewhat related, you might be interested in watching and voting for the following feature which will make it easier to create CI specific keys.
Lastly having build icons show up in Stash is surprisingly handy, and you should have a look at the following plugin if you haven't already:
https://github.com/jenkinsci/stashNotifier-plugin
Since version 2.0 of "Git Plugin" for jenkins you should be able to directly add the required credentials for both ssh and username/password (based on credentials plugin).
See changelog of Git plugin: https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Changelog for details.
For further integration of git and stash regarding pull requests you additionally need the "Stash Webhook for jenkins" add-on in stash and the "Stash Notifier" plugin for jenkins to connect each other.

Resources