Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifactory <----> TeamCity build-info / properties / how to store information in properties and how to represent it? #753

Open
smileNika opened this issue Aug 8, 2023 · 4 comments
Labels
question Further information is requested

Comments

@smileNika
Copy link

Hello Team,

I am totally new in Artifactory users. But I have a task related to storing some important information regarding git_commit_number / build_number / HW_version and so one in Artifactory with each uploaded conan package.

So from my point of view it should be implemented via properties for recipe / package or package revision.

I found an information in your site about "Attaching Searchable Parameters to Build-Info and to Published Artifacts" https://jfrog.com/help/r/jfrog-integrations-documentation/attaching-searchable-parameters-to-build-info-and-to-published-artifacts?tocId=s~2ygr8PHuqvxYpITEorwA

So I am going to create in TeamCity artifactory.deploy.* and define it like one of stored value in teamcity (gi value / build number of whatever) .

Does it mean that after uploading this parameter with deploy with package revision into repository into a properties ?

If I am not correct. Please let me know are there any other valid way how to implement my idea?

One more thing I would like to have a possibiliy ti check all the info I saved for certain package before installing one or another. I need to check this "properties" and decide which one I would like to install and avoid opening Artifactory.

Thank you in advance.

@smileNika smileNika added the question Further information is requested label Aug 8, 2023
@DanielJRutledge
Copy link

Hello, I've used the Teamcity artifactory plugin and the artifactory.deploy.* should do what you're looking for. If you want dynamic values for these (like a build number or commit hash), you'll need to add these as parameters in your build config https://www.jetbrains.com/help/teamcity/creating-and-editing-build-configurations.html#Where+to+Create+Build+Configuration.

The value you designated as an artifact property should then show up when you browse to the artifact https://jfrog.com/help/r/jfrog-artifactory-documentation/working-with-jfrog-properties without any post-build steps.

Your last question I believe is asking how to use the properties to target installs of a say a certain commit hash or other property you uploaded. This is going to be somewhat dependent on the build tool you're using (in this case conan's), but the properties can be used to control and target installs as well. https://jfrog.com/help/r/jfrog-artifactory-documentation/using-properties-in-deployment-and-resolution?section=UUID-51b16f4f-5654-1c0e-b9e2-5d5f07dfd420_id_UsingPropertiesinDeploymentandResolution-ControllingArtifactResolutionwithMatrixParametersQueries

@smileNika
Copy link
Author

@DanielJRutledge Hi ) Nive to meet you. Thanks to your reply.

Yes I want a couple of dynamical changing parameters which will be different for every build and package.
Lets say I would like to fix the info about build_num, git_commit, HW_version which will be transferred by me.

So I need to use this artifactory.deploy.* prefix to name this 3 parameters om the configuration build page?
When I define this params with such prefix they with be written into artifact properties during uploading?

My last question is about possibility to get this properties and its values. Lets say I am a developer and I would like to install conan package with HW_Version == xxx. There are 3 different packages for HW_version xxx, yyy and zzz. So, I need to check somehow which one package to install with which recipe revision (RREV). I do not want to open Artifactory to check each package and its properties tab. I rather execute specific command in terminal to identify RREV for HW_version == xxx.
Only after that I will specify package_name and its revision during installation.
Are there such possibility?

@DanielJRutledge
Copy link

DanielJRutledge commented Aug 11, 2023

The answer to your last question will be specific to conan, but you can pull down a specific hash with the Jfrog CLI and artifactory properties: https://jfrog.com/help/r/jfrog-artifactory-documentation/using-properties-in-deployment-and-resolution and go from there.

@smileNika
Copy link
Author

@DanielJRutledge Do you have the answear for my other questions?

@DanielJRutledge Hi ) Nive to meet you. Thanks to your reply.

Yes I want a couple of dynamical changing parameters which will be different for every build and package. Lets say I would like to fix the info about build_num, git_commit, HW_version which will be transferred by me.

So I need to use this artifactory.deploy.* prefix to name this 3 parameters om the configuration build page? When I define this params with such prefix they with be written into artifact properties during uploading?

My last question is about possibility to get this properties and its values. Lets say I am a developer and I would like to install conan package with HW_Version == xxx. There are 3 different packages for HW_version xxx, yyy and zzz. So, I need to check somehow which one package to install with which recipe revision (RREV). I do not want to open Artifactory to check each package and its properties tab. I rather execute specific command in terminal to identify RREV for HW_version == xxx. Only after that I will specify package_name and its revision during installation. Are there such possibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants