When I create release bundles in Jfrog and then move them to a satellite, all artifacts on the satellite are placed in repositories from where I can download them. But they are stored there without reference to a specific release bundle. I can download any combination of artifacts. I am asking me if there is a possibility to download artifacts not from the repository but from the release bundle.
For that i would suggest to use the Jfrog CLI:
https://www.jfrog.com/confluence/display/CLI/JFrog+CLI
Thats a tool developed in Jfrog itself for ease of use.
After you configure it (`jfrog config add`) you can use the following command to download all the files of a release bundle:
`jfrog rt dl --bundle bundle_name/bundle_version`
I succesfully pushed a git-lfs repo to a Nexus repo and I can see two git blobs on the remote server. I'm wondering if is there the possibility to clone this repo. I tried different ways:
git clone http://..../reponame/info/lfs
git clone http://..../reponame/
creating a new git-lfs repo and pulling (no error, but no pull is actually done)
There's no reference to this topic in the doc here https://help.sonatype.com/repomanager3/nexus-repository-administration/formats/git-lfs-repositories
What's the right way to clone/pull this type of repository from Nexus?
Since VSTS has sought to bend to the popular Git source control, I have yet to see a good description of building .Net projects located in Git repositories, having project dependencies on one another.
For instance, in Visual Studio, I build a solution that includes projects with dependencies on each other. Then, in VSTS each of those .Net projects are versioned in separate Git repositories.
How, then, do you get a build on VSTS? How do you get the artifacts (read: DLLs) from one project into the project of the other?
UPDATE: 12/18/17
I took #VonC's suggestion and followed-through on a VSTS (Visual Studio Team Services) hosted Nuget package. I was able to make this work. This process makes .Net solution files and project dependencies OBSOLETE.
If you want to reuse a library, you can save the binaries as a NuGet package.
In the downstream project, you simply assign the VSTS url reference to the Nuget package to get the Nuget Restore to find/place the binaries in your build project.
You will have to download and install a Credentials tool that will allow you to push your binaries to VSTS's package location. Additionally, tell your admin to add the Packages functionality from the VSTS Marketplace.
Thanks, #VonC for the great suggestion!
Here are some helpful links:
Create and Publish the Private Nuget Package here
VSTS Marketplace Package Manager here
The idea is, for binary dependencies (DLLs) to not involve a source control tool (like Git) but a binary referential one (like Nuget)
See for instance:
"Package: NuGet"
"NuGet is now fully integrated into MSBuild"
With Visual Studio 2017 and .NET Core, we have improved the NuGet package management experience by introducing the PackageReference feature in MSBuild.
PackageReference brings new and improved capabilities such as deep MSBuild integration, improved performance for everyday tasks such as install and restore, multi-targeting and more.
First, it’s unnecessary to manage the build artifacts (such as dlls) in source control since they're the output files from the source code.
Then to add dependencies (dlls) from other repos to the parent (main) repo’s project, there usually has below options:
Option 1: manage the build artifacts as packages
As Vonc mentioned, you can manage the dlls as nuget packages, and then add nuget packages to your main repo’s project.
Option 2: git submodules
You can also treat other repos as the submodules for the main repo, and both build the projects from the submodules repos and the main repo in the build, then the main repo project can get the dependencies from the submodule repos’ build artifacts.
Commands to add a submodule for the main repo:
# In local main repo
git submodule add <URL for a submodule repo>
git commit -m 'add a submodule'
git push
Note: in VSTS build definition, you should select checkout submodules in Get Sources step.
Details about git submodules, you can refer Submodules.
Option 3: git subree (alternative way for git submodules)
Treat a branch from another repo as a subtree (a folder) in the main repo. Then build the projects both in the main repo and the subtrees, and get dependencies from subtrees for the main repo’s project.
Commands to add a subtree in the main repo:
git submodule add --prefix=submodule1 <URL for sub repo> master
git push
Then it will add a folder submodule1 with the files in the sub repo master branch, and commit the changes in the main repo.
Details about git subtree, you can refer
Git subtree: the alternative to Git submodule.
At any time, if your branch has working code with any version of dependent assemblies, I can't see any reason you need to do anything.
For example of dependencies here:
You can set dependencies in project like:
Also you can add dependencies in solution like :
You can set build order in solution too if your project has multiple project with dependencies.
As long as your current code in branch from which you are build is working (with any version of different assemblies, e.g. Classlibrary1 has version 1.0.0.0, Classlibrary2 has version 1.2.2.1 & so on but is working fine with each other after referencing) this approach will work.
Project dependencies exist for ages in Visual Studio & .Net. As long those project exist in same TFS branch You can add project dependency right in dependent project. Also you can manage Project build order in Solution.
For more complex scenarios like different repositories or branch dependencies you need to modify build workflow but it is also quite possible.
You can also refer
http://dailydotnettips.com/2015/11/25/how-to-identify-the-project-dependencies-in-visual-studio/
what I saw long time ago when I created same sample for test.
I have two cooksbooks that I created in my Chef repo that I want to try to manage using Berkshelf.
One cookbook is dependent on the other. Both are not in Chef Supermarket. I don't want to add them there just for dependency resolving.
On on berks install this things complains about the other cookbook is missing.
This cookbook only exist as upload to my Chef server. It is not in Chef supermarket and also not in ~/.berkshelf/cookbooks/
Is this possible? Or does Berkshelf require all recipes in one cookbook? It is not possible to have dependencies between two cookbooks that are not in Chef supermarket?
The Berkshelf does not seem to deal with this use case of multiple interdependent cookbooks. There are also no commands to get cookbooks in ~/.berkshelf/cookbooks.
Berkshelf do support multiple cookbooks.
I've experience in managing more than 30 cookbooks in same berkshelf.
Berks can refer cookbooks from local path, git path, github sources and community cookbooks from Chef super market.
Update
Lets take the example of the scenario mentioned in the query. Please carry out the below steps,
You need to create a project repository with your cookbooks and other stuff.
Project repo is nothing but a directory containing other directories for Roles, Databags, Cookbooks and Environments.
Place your cookbooks inside cookbooks directory.
Create a Berksfile in the root of the repo.
Berksfile uses berkshelf. Install latest berkshelf version using gem install berkshelf (I would prefer using bundle install)
Example content of Berksfile
source "https://supermarket.chef.io"
# Mention community cookbooks used, if any
cookbook 'community_cookbook_name'
# Mention cookbook names from your repo
%w(my_cookbook_name_1 my_cookbook_name_2).each do | cookbook_name |
cookbook cookbook_name, path: 'cookbooks/' + cookbook_name
end
Community cookbook dependencies will get resolved using the source url in 1st line.
Now the basic project repo setup has been done. You're ready to run berks install
List items berks list
Please try the above steps and let me know if it's solved your purpose.
In case, if you want to upload the content, follow the steps below,
Create a directory ".chef" inside the project repository
Copy your Chef server knife/pem files into .chef
Run the command mentioned below from inside the project repo.
berks upload
Your cookbooks will be uploaded to Chef server using the command.
You can use knife upload data_bags and knife upload roles, to upload your databags and roles from the repo.
I have a Git project/repo called "ABC" to which I would like to add WordPress among other things.
ABC
WordPress
Other
Stuff
Ideally I would like to base my WordPress setup on the WordPress Skeleton repo.
(The WordPress Skeleton also contains a submodule referring to the latest stable WordPress release.)
How do I go about creating this setup?
Should I fork the WordPress-skeleton vs copy it into my existing repo?
How do I update the submodule that the WP-skeleton refers to from my ABC git repo?
I guess I am confused regarding the use of forks in this scenario when I want the ABC to contain code from other repos that in themselves have submodules.
Basically what you are looking for is a tool to manage multiple repos. Here are few:
repo (http://source.android.com/source/version-control.html)
gitslave (http://gitslave.sourceforge.net/)
Also beware of submodule gotchas':
http://codingkilledthecat.wordpress.com/2012/04/28/why-your-company-shouldnt-use-git-submodules/
#dani I did something like that. I created this git project: http://stechico.github.io/wordpress-skeleton/
Code samples there if any. HTH