How to setup vcpkg with artifactory using a generic repository. #39901
Replies: 1 comment 8 replies
-
This is fantastic, thanks a lot for describing the process and attaching the script. It just worked™ almost on the first try. I said "almost" because I was getting
|
Beta Was this translation helpful? Give feedback.
-
Step 1: Setup a repository in artifactory
a) Go to the administration tab
b) Create a new repository
c) Select generic repository and set it up as you like
Step 2: Setup vcpkg for artifactory
<baseurl>
= URL of the repository<token>
= API token for repository accessSetup for binary caching:
set VCPKG_BINARY_SOURCES=clear;http,<baseurl>/{name}/{version}/{triplet}/{sha},readwrite,Authorization: Bearer <token>
Setup for asset caching:
set X_VCPKG_ASSET_SOURCES=clear;x-script,pwsh <full_path_to_https_script>/https_assert.ps1 {url} {sha512} {dst};x-block-origin
https_assert.ps1
script:Resulting layout:
Conclusion:
X_VCPKG_ASSET_SOURCES=clear;x-script,pwsh <full_path_to_https_script>/https_assert.ps1 {url} {sha512} {dst};x-block-origin
should have ax-script-upload
andx-script-download
option instead so that the script does not have to reimplement the SHA512 check. It would also be nice to store the assets in a more order way by also supplying{name|port}
and{version}
as url templates. The final storage name {filename} also should be passed to the script somehow instead of using implementation knowledge to recalculate it in the script. The download within vcpkg probably should be equal to working directory of parent call instead of switching between different downloads.Beta Was this translation helpful? Give feedback.
All reactions