Jenkins / Gitlab Multibranch Pipeline not ignoring projects archived in Gitlab - jenkins

We're using Jenkins to orchestrate our builds from GitLab using a Multibranch Pipeline strategy. Recently, something changed somewhere, and now Jenkins is no longer ignoring projects archived in GitLab.
We're using the following stack (not all may be relevant to the problem at hand, and certainly not the complete list of plugins, which would take many pages, if there are other items that I can provide, happy to do so):
Jenkins: 2.263.3
Git Plugin 4.5.1
GitLab Enterprise Edition: 13.7.9-ee
GitLab API Plugin for Jenkins: 1.0.6
GitLab Plugin for Jenkins: 1.5.13
GitLab Branch Source Plugin for Jenkins: 1.5.3
We have our projects organized into groups (with no subgroups) in GitLab, and have used a strategy to archive them when they're no longer needed (instead of deleting them). In Jenkins, we have set up a GitLab Group as an "organization folder", which configures itself to autoscan the GitLab group, searching for projects that have a file named "Jenkinsfile" (configured via project recognizer).
I haven't been able to correlate any recent changes to the behavior I'm seeing, but am still searching. Does anyone have any ideas of where to look to fix this, or is this a known issue?
Thanks!

Related

GitHub Organization job is missing from list of Jenkins jobs

I am following this Jenkins tutorial. After installing Jenkins, I manually add the missing recommended plugins. I then try to create a new Jenkins job. I notice that the GitHub Organization option is missing from the list. I am using version 2.375.1 (latest as of now). Why is this happening? How can I fix it? Is it missing any kind of plugin?
The GitHub Branch Source plugin is responsible for that, and is automatically installed if you selected the defaults when starting Jenkins. This is also highlighted in the Jenkins docs.
However, the job type is no longer GitHub Organization, and is instead called Organization Folder, which "enables Jenkins to monitor an entire GitHub Organization". The functionality is the same.

Does Sonatype's Nexus Repository offer any benefit with Jenkins?

So I'm setting up a CI solution using Jenkins and I've been instructed to use SonaType's Nexus Repository as a binary repository that ties into Jenkins. The idea as I understand is that it will provide immediate rollback to previous compiled binaries.
Some of the other engineers who have experience with Jenkins have questioned this decision, because they believe Jenkins can already do this. Apparently Jenkins will store build results for immediate rollback deployment anyway, so the inclusion of Nexus is of dubious benefit.
Is it true that Jenkins can already offer immediate rollback without a third-party service or plugin? If so, what is the benefit of using Nexus with Jenkins if any?
One of the benefits of use an artifact repository (Nexus, Jfrog Artifactory..) with Jenkins(or another CI tool like Bamboo) is that you can deploy your artifacts to a repository in Nexus(or Artifactory) with their control version (include SNAPSHOT in maven) previously to send these artifacts to each environment (integration environment, production environment...).
This is a good practice because when you do an install of your projects, for example:
mvn install
Your projects downloads all dependencies from the artifact repository (Nexus, Artifactory...) and theses dependencies are organized and availables for al your team.

Continuous Deployment using Jenkins and Docker

We are building a java based high-availability service for a financial application. I am part of the team for managing continuous integration using Jenkins.
Lately we introduced continuous deployment too in the list and we opted for Docker containers.
Here is the the infrastructure:
The production cluster will have 3 RHEL machines running the following docker containers on each of them:
3 instances of Wildfly
Cassandra
Nginx
Application IDE is Netbeans and source code is in git.
Currently we are doing manual deployment on this infrastructure.
Please suggest me some tools which I use with Jenkins to complete the continuous deployment process.
You might want jenkins to trigger on each push to your jenkins repository. There are plugins that help you do that with a webhook.Gitlab-plugin is a solution similar solution exist for Github and other git solutions.
Instead of heavily relying on bash and jenkins configuration you might want to setup a jenkins pipeline with the jenkins pipeline plugin or even pipeline: multibranch plugin. With those you can automate your build in groovy code (jenkinsfile) in a repository with the possibility to add functunality with other plugins building on them.
You can then use the docker pipeline plugin to easily build docker containers, push docker images and run code inside docker containers.
I would suggest building your services inside docker so that your jenkins machine does not have all the different dependencies installed (and therefore maybe conflicting versions). Use docker containers with all the dependencies and run your build code in there with the docker pipeline plugin from groovy.
Install a registry solution to push and pull your docker images to.
Use the Pipeline: Shared Groovy Libraries to extract libraries from your jenkinsfiles so that they can be reused. Those library files should have their own repository which your jenkins knows about and keeps up to date. Possibly you can even have an entire pipeline process shared between multiple projects which simply add parameters in their jenkinsfile.
A lot of text and no examples. If you think something is interesting and you want to see some code just ask. I am currently setting all this up.

Jenkins & Artifactory

On a server running ubuntu 12.04 I have installed jenkins 1.532.1 and artifactory 2.6.4.
Both of then are running fine separately. I also have maven 2.
With jenkins, I can build maven java project with sources on subversion.
With maven I can use Artifactory.
The problem is with the artifactory plugin for jenkins.
I added an artifactory server with credentials. Using connection check tell me : "Found Artifactory 2.6.4". It seems to be ok.
But when I create a maven job, in post build actions, I choose Deploy artifacts to artifactory. My server is already selected in the artifactory server but nothing is available in the repositories.
What can I do. Do I have to configure something special in Artifactory ?
I had also this issue, the problem comes from a refresh of Jenkins Plugin.
To deal with that issue, you should:
open your job
add a task for artifactory
save your job
Open again your job
Now you should be able to see your repositories.
Conclusion: You should add/save and reload your job to see your list of repo of artifactory.
I also have this problem, when switching from one artifactory server to another and it looks like a bug for me.
But if I save the settings once without a "non-selectable" repository and access the configuration of the job again, the repositories will be shown.
Ok, so after a very long time I tried again and ... I don't know why but now (I'm quite sure it was not working few months ago) the solution given by aorfevre and user3424040 are working.
I have also upgraded jenkins to 1.565.1 and the artifactory plugin to 2.2.3 and now there is a Refresh Repositories button in the Deploy artifacts to Artifactory task.
For the "Generic-Artifactory Integration" I had to configure Artifactory a bit. I added a group 'deployers' and a user 'deploy' in that group. Also I added a Permission Target for the LOCAL repositories where the group was granted deploy permissions.

Retrieving old builds for re-deployment in Jenkins

I have built an automated deployment system using Jenkins, Subversion and ANT on a set of environments. It all works, allowing me to deploy old tagged releases to a set of environments or automatically deploy the latest build using the Subversion Release Manager within Jenkins.
The problem is on the client site, we have to utilise Perforce (which does not currently have a Release Manager plugin within Jenkins [don't really want to write one, but possible]). What is the best way to setup up Jenkins to be able to deploy certain releases to environments? I started looking at Ivy and Artifactory as a possibility.
If anyone has any suggestions, or any guides online, that would be great!
We currently build a WAR file for each Subversion checkin - and make this available with the copy artifact plugin. Redeploy is merely a matter of executing the deploy task for this WAR.

Resources