Install Chromium on Jenkins Nodes - jenkins

I have a project which runs karma tests and need chromium-browser binary. For testing purposes I've manually install it with apt install but now that it is working I'll like to have an automatic way to install it on any Jenkins slave.
I've tried chromedriver-plugin but it doesn't seem to work and not maintained for over 2 years.

you can use the slave setup plugin
it will install the chromium-browser on the startup process. another option is to add the installation to the relevant job , and install the package only if it's not installed already.
BTW , how many slaves you have , did you install them manually or automatically ?

Related

Cannot install plugins on Jenkins

I'm new to Jenkins and am trying to get a simple pipeline setup and struggling with the plugins page. I want to install the Azure credentials plugin but in the Plugin Manager page, when I select the plugin checkbox, there is no "Install" button so I don't know what to do next.
Tried on latest Chrome and Firefox with same issue. No errors in the console.
I looked at the documentation and it does not describe any reasons why the buttons won't appear. I am unsure if this is a bug or a problem with the documentation.
I am running v2.249.1 LTS version on Windows Server 2016.
Because this issue seems to be present in both 2.235.1 as ell as 2.260, the weekly release, I would recommend using the Jenkins CLI in the meantime. You can find the documentation here: https://www.jenkins.io/doc/book/managing/cli/ - I just used it and it works well. Do not forget to download the jenkins-cli.jar file as well as generted an API token.
wget https://localhost:8080/jnlpJars/jenkins-cli.jar
I have the same bug here, try Jenkins 2.249.1 fresh installation using ubuntu 20.04 and cannot install plugin from web UI https://prnt.sc/uudmrw
So I downgrade jenkins to older version to version 2.235.1, now I can install plugin from web ui https://prnt.sc/uue9tl
sudo apt-get install jenkins=2.235.1

Jenkins and Phabricator integration

I am new to jenkins and need to integrate it with phabricator.
I installed jenkins but when I tried to configure it, I can't find Phabricator Section.
It is mentioned that arcanist needs to be installed on jenkins nodes, but I don't know how to do that.
Can anybody help me out?
Here's the repo: https://github.com/uber/phabricator-jenkins-plugin
Thanks in advance.
Also to install Arcanist you can follow the Quick Start here.
If you are running Jenkins on a linux server you can quickly install with the command:
sudo apt install arcanist
Afterwards you can use the Manage Jenkins button on the sidebar to navigate to the Plugins Manager page to install the Phabricator Differential plugin seen here

Dependency Graph plugin jenkins doesn't work

I've installed Graphviz and necessary plugins for Jenkins to run Dependency graph plugin, but when I click on Dependency Graph, it doesn't show me anything, I don't know where is the problem, my Jenkins is v2.32.1, thank you very much
In my case I hadn't graphviz in my system.
I solve my issue running the following command (ubuntu 16.04.03):
sudo apt-get install graphviz
No reboot was required on jenkins and than the dependency graph worked as expected.

Installing a package on container-based Travis instance

I am trying to install a couple of dependency packages for testing my code on Travis-CI. I am an education user, so all my builds get sent to a container-based instance. Because it is container-based, I cannot use sudo to install the packages. Is there a workaround for this?
Sort of.
Through the apt_packages addon, you can specify additional packages to be installed with your .travis.yml file.
addons:
apt_pacakges:
- lib32stdc++6
You can only installed packages that are on the whitelist.

Jenkins' /etc/default/jenkins not update safe?

I installed Jenkins using apt-get install jenkins. Then I made some changes in /etc/default/jenkins (which is, as far as I know, the only way to change the Jenkins system user etc.). Now I found out that this file becomes reverted with every update (using apt-get update).
In addition I changed the owner of some files of the jenkins installation (e.g. /var/lib/jenkins, /var/log/jenkins and some others) because I changed the user under which jenkins should run. Also these permission changes are reverted after every update.
There are two solutions I could think about, both not really "nice" and clean:
Install and run the jenkins.war manually without any package management
Write a DPKG-Post-Install-Trigger that fixes the problems after every update
Does anyone have a cleaner solution for that?
Two answers occur to me
1) Download the source package that apt-get uses and modify the users, permissions etc to suit your local use. Rebuild the package and either install it from cli with dpkg -i or make your own repository for local use.
or
2) Use a tool like puppet to manage the package install and then apply the changes required locally afterwards. The puppet "package/file/service" pattern explained in various places including here https://docs.puppetlabs.com/puppet_core_types_cheatsheet.pdf shows how to do the puppet manifests for this

Resources