The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

1

The error message you have provided indicates that this is a problem with the configuration that could be permission related. Here are some steps to help resolve this issue: You can follow guides where other people have configured the two. Pay special attention to the permission settings that are selected. Double check your permissions on the servers. ...


0

There are two approaches to this, neither of them, in my opinion, are especially good as they don't strictly "NOT Fail" the build: Use a plugin such as Naginator which can be configured to restart the build until it passes. This can be quite frustrating as you need to differentiate between ephemeral/preemptable virtual machines being terminated and a truly ...


3

Simple one. You should either add ansible_ssh_extra_args="-o StrictHostKeyChecking=no" to inventory or disableHostKeyChecking: true into Jenkins pipeline script (inside ansiblePlaybook block). Like this: ansiblePlaybook( colorized: true, installation: 'ansible27' inventory: '[hostsfile]' playbook: '[playbook]' disableHostKeyChecking: true )


3

The Git Server It's best practice to setup a Git server for the team to access. This way you have a central server that can be maintained, backed up, and focus on serving the source code. While you could create your own, there are also several popular commercial options available that often have free private repositories (non-exhaustive list): Bitbucket ...


0

There is a natural tension here between: (a) fixing something that is wrong automatically: because for example, a CVE has been created with a high enough severity to need to do something about it. (b) breaking the system: because the automation introduced a breaking change or a defect. I have a tendency towards systems being under constant development, ...


0

You don't need any plugins. You can send an e-mail from your Pipeline using the mail() step. You can respond to the input step by using the REST API as documented in this answer on Stack Overflow. Put the two together and you should be able to craft an e-mail that contains buttons for responding to the input.


1

There are a few different things you can do: In your CI process, run your new SQL update scripts against a Dockerized SQL Server. This will allow your CI server to reject the changes if there are basic errors in the script. If you are fully containerized look into tools like Kubernetes. These tools have ways to handle rolling back failed production updates....


0

I would have a look at the Tool Auto-Installation which allows Jenkins to install the tooling you need. Lets you configure tools so that agents will install them on demand whenever running a job that needs them. This could be especially useful when running a large farm of agents in a cloud which all start with a minimal operating system configuration. ...


0

The Gitlab plugin requires an auth token, you're trying to use an SSH key. https://github.com/jenkinsci/gitlab-plugin#global-plugin-configuration "PLEASE NOTE: This auth configuration is only used for accessing the GitLab API for sending build status to GitLab. It is not used for cloning git repos. The credentials for cloning (usually SSH credentials) ...


0

OK, a good week-end does its job as usual: My issue was indeed caused by my company proxy (a good thing would be to add this requirement in the jenkins doc, i might have missed it anyway). So the fix is actually simple, just need to add the correct options to the jenkins start command, as in: -Dhttp.proxyHost=<your_proxy_ip_here> -Dhttp.proxyPort=<...


0

For the best practices will be great to install Jenkins master on the lower Environments (best Dev env) and to leave Production in peace with only necessary things (with your end-user application and their dependencies). The reason why is because production means production and if something will happen with Jenkins or if you will allow a lot of people ...


2

It really depends on what information you are trying to "Radiate": For an off-the-shelf solution that integrates with everything you mentioned you could check out Prometheus. It has plugins for Jira, Bamboo, Jenkins, and SonarQube. You could also opt for something quite a bit simpler and use the built in dashboards for the tools you are trying to display ...


0

I had this problem when I needed to build something at home. What I did: installed docker in a Ubuntu server VM installed docker in a windows server 2016 VM (if you need windows containers like i did) THEN: In the Ubuntu machine: I created a local registry running in a container (1 command :) ) I spin up a container with a git server - I "linked" the ...


0

There is no hard rule to have jenkins to be running of a single server. However usually it may be better to have separate servers which fulfilling one purpose at a time as this gives some advantages you can focus only on dependencies for the particular service (e.g. Bitbucket and jenkins may require two different Java versions, whereas one installation ...


1

Sometimes it is easier to ask forgiveness than permission. Instead of trying to figure out whether branch b exists, just try to check it out. If it fails, checkout branch a. script { try { checkout([ $class: 'GitSCM', branches: [[name: 'b']], userRemoteConfigs: [[url: url]] ]) } ...


0

Jenkins pipeline jobs are designed to be serializable to disk, to increase durability (their words not mine). Therefore they are considered safe to be suspended. The only things you can do is either wrap your stages in functions with @NonCPS decorator or using properties make the jobs non-resumable after restart, but this will cause them to not be resumed ...


1

One possibility would be via the Jenkins REST API. I guess the recipe below would be dependent on the particular Jenkins version, so you may need to tweak it a bit. The version I looked at was 2.176.1 Go the Jenkins page for the folder in which you want the job created/restored. On the page's footer you'll see a REST API link, go there. On the REST API ...


0

What your are describing can typically be addressed with a correct inventory design. [zone1] serverA serverB serverC [zone2] server1 server2 server3 [zone3] serverX serverY serverZ [jenkins_master] serverA server1 serverX [jenkins_slave] serverB serverC server2 server3 serverY serverZ From there you can easily: create plays that will target a group or ...


1

Solutions: You have a few choices to resolve the security issue in git client plugin 3.0.0-rc. 1) Install git plugin 3.12.1 and git client plugin 2.8.5 from the Jenkins update center 2) Upload git plugin 3.12.1 and git client plugin 2.8.6 into your Jenkins server from the "Advanced" tab of the "Manage Plugins" page inside "Manage Jenkins". 3)Install git ...


0

It seems that it is only possible by using a workaround as depicted in this answer. After setting gitLFS in the UI, subsequently inspecting the /var/lib/jenkins/jobs/some-job/config.xml file it became obvious that the XML looked as follows: <traits> <jenkins.plugins.git.traits.GitLFSPullTrait> <extension class="hudson.plugins.git....


0

You can use Build Periodically functionality under Build Triggers in Jenkins FreeStyle Job. (1) At the Bottom of the Job Configuration, there is also a BUILD Menu with "Add Build Step" and you can execute shell. (2) There is a POST BUILD Menu which you can use to send notifications once the build is done. (3) Depending on how you want things done, you can ...


1

According to the Jenkins Job DSL documentation shallow has to be enabled: shallow(true)


0

https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/demos/jenkins/jenkins.yaml It should be possible by configuring it like this: unclassified: globalLibraries: libraries: - name: "some-lib" retriever: modernSCM: scm: git: remote: "https://github.com/some-project.git" ...


0

If you had one e-mail job that was a downstream of all the other jobs finishing via the Join Plugin, the e-mail job should only fire off after everything is completed. It seems the "normal" build trigger will cause an issue. https://stackoverflow.com/questions/25912639/how-to-build-a-jenkins-project-only-when-two-other-projects-have-successfully-be


Top 50 recent answers are included