How can I add a proxy server to the jira plugin in jenkins - jenkins

I my jenkins job, I need to check the blocked issues in jira, if there is any issued in blocked level. than the job will stop.
the jenkins server is in the inner network of our custom company. The Jira server is in our office and published to the internet.
so the jenkins server need to using a proxy server to access the lira server.
but I can't find the way to config the proxy server.(In the 'Manager Plugins' page of jenkins there has been set a proxy, but it seems not work for lira plugin)

Related

JIRA trigger plugin is not working if Jenkins is configured with HTTPS

I have JIRA and Jenkins installed locally on my system. Jira is installed with http on port 8082 and Jenkins is configured with https on port 443.
I have configured Jira Trigger Plugin which triggers Jenkins build if status is changed in JIRA, it works fine when Jenkins is launched with http on port 8083.
Webhook URL - http://localhost:8083/jira-trigger-webhook-receiver/
It does not work when jenkins is launched with https on port 443.
Webhook URL - https://localhost/jira-trigger-webhook-receiver/
I downloaded ".pem" file (security file) from Jenkins server (https://localhost) and added it into the keystore of JIRA (E:\JIRA\8.5.1\Install\jre\lib\security\cacerts) on my local installation but I was not able to trigger jenkins build based on JIRA status change.
I went ahead and added ".pem" in every "cacerts" keystore of every java which is installed on my system but still it was not working for me.
Can anybody please help me here, what am I missing when it comes to configuring webhook for jenkins server if jenkins is configured with https.

How to configure TFS build agent with web proxy

We noticed that one of our task started failing with the following error after using a new proxy:
Error: connect ETIMEDOUT 102.33.19.18:443
If we remove the proxy, everything back to the track. However, we already configured proxy for our build agent.
Are there something special we missed?
When your self-hosted agent requires a web proxy, you can inform the agent about the proxy during configuration. This allows your agent to connect to Azure Pipelines or TFS through the proxy. This in turn allows the agent to get sources and download artifacts. Finally, it passes the proxy details through to tasks which also need proxy settings in order to reach the web.
To enable the agent to run behind a web proxy, pass --proxyurl, --proxyusername and --proxypassword during agent configuration.
For example:
./config.cmd --proxyurl http://127.0.0.1:8888 --proxyusername "myuser" --proxypassword "mypass"
Note: It applies to agent version 2.122 and newer. Do not forget to restart your agent and give it a try again.

How to set up an Azure DevOps service connection or endpoint to my localhost Jenkins install

I have Jenkins installed on an Ubuntu 18.04.3 LTS desktop PC on my localhost.
I also have an AzureDevOps repo on which I can successfully run a build, through a Jenkins pipeline job, connecitivity achieved via my AzureDevOps personal access token (PAT).
I am now trying to set up a Jenkins service connection or endpoint in AzureDevOps, to enable me trigger an Azure DevOps pipeline release whenever a Jenkins build completes successfully.
To achieve this in AzureDevOps, I am trying to set up access to Jenkins via a Jenkins service endpoint. The endpoint configuration requires among others, a Jenkins "Server URL" (screenshot below). Not surprisingly, AzureDevOps is unable to connect to my Jenkins instance as it's running on my local machine and therefore not publicly accessible.
Any suggestions on how I can overcome this hurdle would be most appreciated.
How to set up an Azure DevOps service connection or endpoint to my localhost Jenkins install
As we know, in order to receive the service hook notifications, you'll need to expose a port to the public internet.
To expose a port to the public internet, you can try to use the tool ngrok:
ngrok exposes local servers behind NATs and firewalls to the public
internet over secure tunnels.
Please check the document Configure a service hook for PR events for some more details.
Hope this helps.

Is there any way to integrate Bitbucket on cloud and Jenkins On premise

I am trying to integrate Bitbucket on cloud and Jenkins on premise, but once I enter the IP of my local Jenkins in Bitbucket cloud it show error URL not valid.
Is there a way to solve this, or do I need to buy Jenkins cloud license?
Your local Jenkins server is not seen by a cloud Bitbucket server because it is an internal server.
You can solve it in one of those alternatives:
Ask your system administrator to expose your Jenkins server with a global IP address along with the Jenkins port (e.g. 8080) so the Bitbucket server will be able to access it. This is not totally secure due.
Activate the Jenkins job that pulls from the remote BitBucket server on time internal - in the Job 'Build Triggers' section check the 'Poll SCM' checkbox and set the cron setting (for example: 'H/15 * * * *' for building every 15 minutes. Notice that it will not build if there were no code changes)

JIRA is not able to configure application URL of Jenkins

I am getting error while integrating jenkins with JIRA.
Both JIRA and jenkins are hosted on same server.
Provided application URL in JIRA is my-ip:8080
error: No response was received from the URL you entered - it may not be valid. Please fix the URL below, if needed, and click Continue.
What ports are JIRA & Jenkins running on? Usually JIRA and Jenkins like to run on the same port (8080) by default. You can change the default port for starting Jenkins as ala something like java -jar jenkins.war --httpPort=9090
Did you see this link: Configuring the Atlassian JIRA plugin to work with Jenkins CI system

Resources