how to handle third party bundles dependencies in Maven/Tycho build ?
Create a P2 repository and then reference that repository. This is the recommended method.
If you want to keep the build location-independent store the repository in a location that allows HTTP protocol access. e.g.
A web server with file-write access
A webdav store
An SVN version control system.
To create the P2 repository
create an eclipse target,
install the required bundles into it, then
create a feature, add the plugins
export the P2 repository.
Store the repository in a well-known location
Reference the location from the Tycho build via one of these three choices
eclipse target files in repository definition
URLs in repository definition
eclipse targets in package definition tycho modules.
Alternatively, as a source
if the 3PDs are available in Eclipse Orbit, you can reference the Orbit P2 site directly
if the 3PDs are available in Maven Central, you can use Tycho POM first build. Please watch out for the limitation that this build can not produce other deliverables in the same reactor run, as described in the howto.
Related
We are considering a move to Azure DevOPS/TFS and we have built a prototype workflow which seems to work well.
The only outstanding thing from our current CI process to replicate is the triggering of builds based on nuget package updates.
Our build pipeline is a tree, where some libraries which generate nuget packages generated at the top of the tree are used as dependencies in other libraries downstream.
Using team city one of our build steps inspects the dependencies of a solution, identifies the topmost level dependencies and adds them as nuget build triggers ensuring that the next time a successful build of a dependency occurs the downstream library is triggered as well.
How can that be replicated in Azure Dev Ops?
I think you might be after something like NuKeeper:
NuKeeper automates the routine task of discovering and applying NuGet
package updates.
NuKeeper will compare the NuGet packages used in your solution to the
latest versions available on NuGet.org, and:
List available NuGet package updates on .NET code on the local file
system or on a GitHub server.
Apply NuGet package updates to .NET code
on the local file system.
Make pull requests containing updates to
code on a GitHub server.
Image stolen from Shayne Boyer's blog.
In TFS, continuous build can be triggered when changes to the repository are detected. I am looking for a feature to trigger only the build when a specific file changes.
I have a library that I want to publish to an internal nuget server. I versioned the library manually in the nuspec file. I want to trigger build and publish when the nuspec file gets updated. Is this doable in TFS?
If you are using TFVC, you can specify the file directly in CI filter.
For Git in TFS 2015 , there is no such feature or setting to specific a folder within the repo by default (it's available in VSTS), as Repository and CI filter are used for different purpose:
Repository specifies which files will be downloaded from your remote
repository into a local sources directory by build agent at the
beginning of the build process.
CI filter selects the version control paths you want to include and
exclude.
There is a User Voice submitted for using repository paths as default, which similar as TFVC. Microsoft Product Team will evaluate it carefully. You can go there and vote it up to achieve it in future.
Nuget restorating is good when using CI in VSTS. However I am using some extensions like SQLite Runtime in my project. Is there any way to include those extension dlls other than referencing them in the project?
Besides referencing them in the project which actually is the most recommended way.
You can also manually install the extension on the build agent. Just like how to use it in your local environment. Make sure the environment on the build agent is as same as your local.
Check the extension and dlls in source control. Even though we do not suggest to manage dlls for source control in TFS.
Some packages (like redis for instance) have a "tools" folder which allows you to pull the "runtime" from nuget.
If your tool is not shipped as a nuget package you'll have either to:
- Include the tool on the source control (not the best thing if you want to keep the repo as small as possible)
- Install the tool on the build machine (only possible if you have your own agents and you're not using the hosted agent)
- Have a script to pull it from the web without relying on nuget (again really depends on the tool and if it has a "run without installation" version)
Hope that helps
Is there any Repository manager that manages the binary dll files and also integrates well with the Jenkins?
Can Nexus be used to manage the dll files as these files are created as a part of Embedded C/C++ Projects and not sure if Nexus Artifact Manager supports/integrates well with such Projects as it mainly supports the Java projects?
Is there a way to automatically manage the upload and download of such project artifacts from Nexus/other artifact managers without the use of POM file?
Suggest in case there are other Artifact Managers that supports binary artifacts.
Artifactory can be used to store any type of binaries.
Starting with Artifactory 4.0, you can create generic repositories which allows uploading packages of any type. You will not need to upload any POM files and Artifactory will not need to calculate any metadata (for example Maven metadata).
To deploy files you can use the REST API or the UI, for example:
curl -uUSER:PASS -T file.dll http://localhost:8081/artifactory/dll-local/path/to/file.dll
If you have a certain layout you would like to use for this repository you can create a custom layout and associate it with the repository. This can be useful for automatic snapshot/integration versions cleanup and other module management tasks.
Disclaimer: I'm affiliated with Artifactory
The Nexus repository manager is java oriented, but can be used to store any files you want. Binaries of all types or even just text configuration files.
To automate the file upload process, you can use maven from command line:
mvn deploy:deploy-file -DgroupId=com.you -DartifactId=file -Dversion=1.0 -Dpackaging=exe -Dfile=c:\out\file.exe -Durl=http://yourserver/nexus/content/repositories/releases -DrepositoryId=releases
Then, to get the file, you should be able to get it directly with the following URL:
wget http://yourserver/nexus/content/repositories/releases/com/you/file/1.0/file-1.0.exe
This is a simple approach to using Nexus as a general artifact repository.
I hope this helps.
The open source version of Nexus (Nexus OSS) is supports many repository formats out of the box including Maven, NuGet, NPM, RubyGems and others. Nexus just runs on Java (e.g. like Jenkins). It is not Java only...
Depending on how you plan to get the DLL files from the repository, different formats might be more or less suited to your usage. You could even use a custom format, but then you rely custom tools.
The scenarios I have seen at many customers are
using a Maven repo and pulling the files in either in a Maven build together with the Maven NAR Plugin (used for native development with C/C++)
using a Maven repo and pulling via plan HTTP GET calls using your scripting language/build tool of choice
using NuGet format and store the DLLs in NuGet packages in the repo and using nuget to retrieve them for the projects
All of these work well.
My structure for TFS is such:
{Main TFS Project}
3rd Party Assemblies
Development
Source
Integration
Source
I am using continuous integration for my development build, but currently I have to setup the working folder so that I am pointing to: {Main TFS Project} root folder. This is not ideal, because any check-in to the system kicks off my Development continuous build. I don't want to have the 3rd party assemblies in each branch, because they are shared throughout projects. What are other users doing?
Update
Before I wrote this message I had tried what kroonwijk had suggested, but my build still fails. this is what my work folders section looks like:
In the build definition, you have the ability to specify multiple folders to be downloaded to the build system when the build starts. From http://msdn.microsoft.com/en-us/library/hh190721.aspx:
When you create your build definition, on the Workspace tab, you
specify the folders that contain the files that you want to download
and how these folders should be mapped to local folders on the build
agent.
So just specify your 3rd Party Assemblies folder together with the Subproject folder you want to build in the Workspaces tab of your build definition, and only those folders will be checked and build.