How to promote builds to repository in jenkins multiple branch project - jenkins

I need to promote debian packages build in jenkins to the repo (aptly.. maybe artifactory). However, the available plugins seem to be broken for multiple branch projects. Has anybody found a solution to get around this?

You can use Artifactory Jenkins plugin for that. Define the deb files you want to upload (metadata will be generated by Artifactory for you).
Please note that you need to attach some properties to the uploaded files. From Jenkins you don't need to craft the URL, instead add the properties in the "Deployment properties" textfield.

Related

Jenkins Multibranch Pipeline can't find Jenkinsfile in subdirectory using svn

I'm trying to set up a build using Multibranch. I'm basically having the same problem as stated here, but our SCM is Subversion. The Bug in the Bitbucket Branch Source Plugin as described here can therefore be ruled out, especially since our Jenkins has the newest version installed anyway.
I tried to find a similar ticket regarding my problem, but couldn't find one, so here I am.
As this particular project is configured in a way that configuration files (including something like the Jenkinsfile) are to be stored in a subfolder, I don't know what else to try, apart from configuring individual jobs. I'd rather stick to using Multipipelines, however, as they help keeping the build jobs tidy.

How to set up artifcatory in Jenkins Free Style Project?

I am using Free Style Projects (in Jenkins) to schedule a regression test.
1. Get Source From BitBucket
2. Execute Windows Batch Command.
Earlier we are allowed to upload the jar files in Bitbucket. So we did not face any issue. Now Presently due to some changes in the process, we are not allowed to upload binaries which is affecting to upload jars in the Bitbucket.
Now, They gave given the artifactory url to set up for Maven. But we don't have any Maven projects.
It seems that artifactory is getting populated when it is hosted in the local. But we wanted to use the artifactory which is shared..
Can any one let me know the set up for free style project and the artifactory hosted in other machine and we have only URL.
Thanks
Here is documentation:
https://www.jfrog.com/confluence/display/RTF/Jenkins+Artifactory+Plug-in
I recommend to use Maven Project.

How to serve build archived artifact in jenkins

I am using Jenkins Archive the Artifact build post action to archive my build results. I am looking for a way to directly allow developers to download the archived artifacts from jenkins.
Is there any plugin support that?
Or is there any way to serve static resources through jenkins?
There is no plugins to install for that. When using "Archive the Artifact", every build will generate a package so if developers need to download the artifacts they just need to go the concerned build on Jenkins then look at the "Build Artifacts" section and click to the artifact link that will propose them to download it.
For this to work, developers must have access to the Jenkins interface at least as read only mode.

Artifactory Hudson Builds not showing artifacts

I'm trying to setup Artifactory(free version) and Hudson to deploy artifacts.
The main stuff already works, i can deploy to Artifactory via Hudson. Using the Artifactory Hudson Plugin with generic deployment.
I am also able to browse the deployed stuff via the Tree & Simple Browser.
What not works correctly is the Build Browser, it does show everything except the artifacts deployed by the build. In the published modules view it should show all artifacts, but the tables are just greyed out for me.
Example how it should look:
Link to the official Jfrog Artifactory demo repository
Does anyone know if this view is maybe a pro feature, or any other tips how to resolve this problem?
The build integration feature is limited in the OSS version. You need the Pro version to get the full deal.
I've used the description setter plugin https://wiki.jenkins-ci.org/display/JENKINS/Description+Setter+Plugin . In my case i take the last revision and put a link to the artifact in artifactory. In this way on every build i can see a direct link to the artifact changing the path like you want.

Build multiproject Gradle on Jenkins

I have a Gradle multiproject hosted in Mercurial repo. I would like to setup my Jenkins in such a way, that if I commit changes into only 1 subproject, then only that subproject will be built and published to my Nexus repo.
Can somebody give me a hint? Or is it at all possible?
We sort of have this working.
We create a project in Jenkins for each gradle subproject. And in the Jenkins configuration we build only the subproject by doing something like:
gradle clean :<subproject>:build
We still have the problem that the job is fired for all checkins to the entire project. I would to configure Jenkins to build only when there's checkin to the subproject, but don't know how to specify this.
Leaving our final solution for the future here.
We created a separate Jenkins job for each subproject. Jenkins' Mercurial plugin allows to specify "modules":
Reduce unnecessary builds by specifying a comma or space delimited list of "modules" within the repository. A module is a directory name within the repository that this project lives in. If this field is set, changes outside the specified modules will not trigger a build (even though the whole repository is checked out anyway due to the Mercurial limitation.)
This way our jobs are triggered only when change occurred in the monitoring sub-project.
I guess you need to create a project in jenkins for each subproject.
Other option would be to find if there is a way to intercept the repo sync and see what subproject has changed and do the build dynamically.

Resources