how to setup remote host for jenkins parameterized remote trigger plugin - plugins

How do you setup the remote host field for Jenkins Parameterized Remote Trigger Plugin? The documentation doesn't seem clear to me, and this explanatory blog post has some Jenkins UI features that I can't locate.
This article suggests going to Manage Jenkins > Configure Credentials to add a Domain, but when I go there I see no "Add Domain" button:
The plugin wiki shows screenshots of a section on a page labelled "Parameterized Remote Trigger Configuration". How do I view this section in Jenkins, where is it? I thought it might be in Manage Jenkins > Manage Plugins, but there is no "Manage" or "Configure" button there:
How do I add a "Host" to my Parameterized Remote Trigger Plugin so that I can use it in a Jenkins job?

Update: The official Parameterized Remote Plugin has gone stale and may not fully work. sap-production appears to be maintaining a much more up-to-date version here. You can install it on your instance by cloning the repo then running mvn package. Then install the ./target/Parameterized-Remote-Trigger.hpi file using Manage Jenkins > Manage Plugins > Advanced (tab) > Upload Plugin
It appears that the Jenkins UI has changed over time. Here is how it works now.
Add The Domain
On the left sidebar of the main Jenkins UI, click Credentials > System > Add domain
Name the domain whatever you like, then click Add > Hostname
Fill in the IP or hostname of the remote Jenkins instance in "Includes"
Set Up Credentials
The previous step leaves you on a page with an "Add Credentials" button. Click that. If you can't find it, then you can locate it from the main view via: Credentials > System > Your Domain
If not already selected, then select "Username with password". Choose a scope.
Fill in all the fields as shown. I personally recommend creating a new user on the remote Jenkins and generating an API token and using that here, but you could also just generate an API token for your own user. Click OK.
Configure Parameterized Remote Trigger Plugin
From the main Jenkins page click Manage Jenkins > Configure System, then scroll down to the Parameterized Remote Trigger Configuration section and click Add.
Fill out at least the Authentication and Remote address and port properties, then click Save.
Add Build Step In Job
Open an existing Jenkins job or create a new one, scroll down to the Build section, and add the build step Trigger a remote parameterized job:
Select your host, and fill the rest of the values in.

This is well documented on the plugin's wiki page. See the "System configuration option" section. If you're having trouble with one of the fields specifically, please add more detail to your question.

Related

How can we disable this "Can one of the admins verify this patch? "on the GitHub Pull Request Builder plugin?

When triggering a job on a pull request this comment "Can one of the admins verify this patch?" is automatically added to the pull request how can we disable this on the GitHub Pull Request Builder plugin?
thanks!
One possible workaround is to add the username of anyone you want to be allowed to trigger the job to the Admin List within the GitHub Pull Request Builder plugin section of Build Triggers in your Jenkins job.
Also, if the repository is part of a GitHub organization you can simply add your organization name to the List of organizations. section of the plugin configuration which will allow all members in the organization to be whitelisted and allowed to trigger jobs.
I simply went on the plugin config and modified the phrase to the empty string.
On the main server config page find "GitHub Pull Request Builder"
Click on "Advanced..." button underneath
Find box underneath: "Request for testing phrase"
Delete the contents of the box
Save the config

How can I setup access to a private github repository in Openshift 3?

Well, i'm using Openshift to host a node.js application, and some things need to be private. So i need to let Openshift acess my Git repository in private.
I found some tutorials in the internet, but no one helped me.
I tried using PuTTY, i used Git Bash, but i failed everytime.
Everytime i get this error from Openshift:
error: build error: failed to fetch requested repository "myrepository.git" with provided credentials
(i changed the repository url in the error)
Well, what can i do to setup Openshift to acess a private repository?
I'm using OpenShift 3.
It took me a bit of time to figure it out, since the last step is missing in the configuration.
In order to give OpenShift 3 access to a private github repository, I performed the following:
> oc secrets new-basicauth github-credentials --username=<yourgithubusername> --password=<yourgithubpassword>
It returns:
secret/github-credentials
Then (and here is the missing part) from the Openshift 3 web interface:
Click on Build
Click on your application's link
On the top right, click on Action and select Edit
Underneath Git Repository URL, click on Advanced Options
In Source Secrets, select github-credentials
Click on Save at the bottom of the screen.
You can try this solution:
consider that I am using openshift version 3.11
So, on the left side menu click on "Builds" then "Builds" again, then click on the name of your project, now click on the action button and select "edit" option. now click on "Show advanced options", in the Build Secret Section "Create New Secret", put a new secret name and the user name and password that you use for the private repository. Now select a build secret that you have created. That is all!

Jenkins + Github Pull Request builder display name

For our project we use GitHub. We have TravicCI enabled (as this was required for our project to use). Besides that, we've also got a full instance of Jenkins running with the pull request builder.
Now this all works fine, and in the overview of a pull request this looks like this:
Now as you can see travis is displayed nicely with a name. The Jenkins setup is however shown as 'default'. I'd like to change this to something else, however I can not find anything anywhere (github, jenkins, plugin settings) on how/where to change this. How do I change this?
You can change this in the job.
Your Job > Configure > Build Triggers > Trigger Setup > Commit Status Context
Enter something in this field to override "default".
In the GHPRB ver 1.33.0, the option for changing the name of the check for GitHub PR is within the job configuration:
Your Job > Configure > Build Environment > Set GitHub commit status with custom context and message (Must configure upstream job using GHPRB trigger) > Commit Status Context
I might be late to this answer, but my suggestion is to create another user as a 'bot' account to connect with GitHub from your Jenkins server instead of using your main admin account. This adds another security layer to the connection. I wrote a bit about it here

How to modify trac workflow from admin panel?

I've got a trac system v0.12.3 on remote host (mysvn.ru) and I haven't any access to the file trac.ini.
And I have to modify trac workflow from admin panel. May be with the help of some plugins.
I have trac_ini_editor plugin there, but I can't remove current options with it, only add new ones.
What plugins can modify trac workflow from admin panel?
Everything of your workflow changes can be done in trac.ini. Use TracIniAdminPanelPlugin to do that via web interface in case you only have remote access.
install AdvancedTicketWorkflowPlugin. Have advancedworkflow.*
= enabled in your [components] section of trac.ini.
Have workflow = ConfigurableTicketWorkflow,TicketWorkflowOpOwnerReporter in your [ticket] section of trac.ini.
Define your own workflow in a new trac.ini section [ticket-workflow]. The wiki page of AdvancedTicketWorkflowPlugin will explain that in detail.

GitHub Organization Repo + Jenkins (GitHub Plugin) integration

I have an organization on GitHub with private repositories. I also have Jenkins set up running on port 8080 on a server, with the GitHub plugin installed. I've created an account on GitHub for my jenkins user, which resides in the owners group.
I'm trying to trigger a job on jenkins when a change is pushed to my development branch (or master branch, neither seem to be working).
When I look at the GitHub Hook Logs in Jenkins, it says that Polling has not run yet. When I go to "Manage Jenkins", the GitHub plugin says my account is Verified when I test it.
Any insight on how to configure this? I have multiple repositories I'd like to work with, so deploy keys don't seem like the solution to me.
Update:
As Craig Ringer mentions in his answer, you can select Grant READ permissions for /github-webhook in "Configure Jenkins" under the GitHub plugin settings, allowing the webhook to be called without authentication.
Another update: Webhooks are now (Dec. 2014) available for organization: see WebHooks API for orgs.
Note: the issue 4 of the hudson-github-plugin was about:
Last GitHub Push
Polling has not run yet.
And the conclusion was:
Nevermind, the only missing piece was a permission checkbox for the github user which ain't documented anywhere on the internet.
So is this a permission issue regarding your Jenkins users?
The article "Set up Jenkins-CI on Ubuntu for painless Rails3 app CI testing" includes the following process:
To restrict the CI system and give access to your Team members to use or see the build logs, first you’ve to create an account.
Go to Manage Jenkins > Configure System,
Check the Enable Security checkbox
Under Security Realm, choose Jenkins's own user database
Check the Allow users to sign up checkbox
Under Authorization, choose Project-based Matrix Authorization Strategy
Add first user with the name admin and another with GitHub (Note: the username for Admin access has to be admin) For GitHub named user, just choose the Overall Read only permission. We’ll use this user later with the GitHub hook.
Note: The admin and GitHub user that we’ve added in the above step does not create the User. Then you’ve to create a real user with that same name. Ya, I know, its a bit weird with Jenkins UI.
Go to Manage Jenkins > Manage Users > Create User. Create both admin and GitHub users.
Hooking with the Github web-hooks
Now to run the build automagically when new commit or branch gets pushed onto Github, we have to setup the repository.
Got to the hooks page for your repository. e.g.
github.com/<username>/<project_name>/admin/hooks
Under AVAILABLE SERVICE HOOKS > Post-Receive URLs, add github:github#your-ci-server.com/github-webhook/.
The github:github is the user that we’d created earlier.
Then we have to verify Jenkins with Github. Go to Manage Jenkins > Configure System and under GitHub Web Hook, add your Github username and password and click the Test Credential button to authorize once with Github.
It looks like the accepted answer is no longer necessary with the current version of the GitHub plugin. You can instead check Grant READ permissions for /github-webhook in "Configure Jenkins" under the GitHub plugin settings, allowing the webhook to be called without authentication.
As explained in the help on this option that's quite safe, and frankly no worse than having a user named "github" with password "github" anyway.
There are two ways to achieve automatic builds on Jenkins. What you choose depends on whether GitHub can call the Jenkins server URL you provide. This may not be the case if you are running Jenkins behind a firewall.
If GitHub can reach that URL you can set up the service hook on your repo there.
If not you can set up Jenkins to poll periodically.
You may set up both, but one solution is enough to get it working. I would always go for the first if feasible as it saves resources CPU and traffic wise.
Either way you need the GitHub plugin for Jenkins.
Hope that helps a bit.