build info associated with build

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

build info associated with build

Jalon
For reasons I just don't want to type out, I'm trying to write a Gradle task that will upload build info to Artifactory after artifacts have been uploaded.

I have verified that the file I'm creating contains all the correct data, including the correct MD5 and SHA1 values for the artifacts themselves (verified by checking the artifacts in the repo artifact tree, one by one).

The problem is that Artifactory (Artifactory Pro Power Pack 3.9.4 (rev. 30226)) isn't associating the build info with said artifacts.  How can I tell?  Because when I go to Artifacts -> Builds -> <my build name> -> <my build number> -> Published Modules, then click on a module name and the "Repo Path" field is blank for all artifacts.

Yes, I've dug around through the "build-info-extractor" code to see how jFrog does things, and what I came up with is nearly identical functionality (as far as the build info goes).  I even tried changing from simple "application/json" to "application/vnd.org.jfrog.artifactory+json" for the content type after I saw that in the plugin source, but no luck - Artifactory still doesn't associate the build info with the artifacts.

So... how do I get it to understand that the info I uploaded should be associated with the artifacts I uploaded?
Reply | Threaded
Open this post in threaded view
|

Re: build info associated with build

J.T. Conklin-2
Jalon <[hidden email]> writes:

> For reasons I just don't want to type out, I'm trying to write a Gradle task
> that will upload build info to Artifactory after artifacts have been
> uploaded.
>
> I have verified that the file I'm creating contains all the correct data,
> including the correct MD5 and SHA1 values for the artifacts themselves
> (verified by checking the artifacts in the repo artifact tree, one by one).
>
> The problem is that Artifactory (Artifactory Pro Power Pack 3.9.4 (rev.
> 30226)) isn't associating the build info with said artifacts.  How can I
> tell?  Because when I go to Artifacts -> Builds -> <my build name> -> <my
> build number> -> Published Modules, then click on a module name and the
> "Repo Path" field is blank for all artifacts.

I recently went down a similar path at work, and encountered the same
symptoms -- artifacts weren't associated with the build-info metadata
even though the MD5 and SHA1 checksums matched.

In my case, I missed the fact that individual artifact uploads need the
build.name, build.number and build.timestamp attributes to be provided.
Specifying the artifacts' MD5 and SHA1 checksums in build-info metadata
is necessary but not sufficent.

   --jtc

FWIW, while I was working on this project, I thought there should be a
more formal definition of the build-info metadata than was provided in
the REST API documentation.

To help fill this gap, I contributed a JSON schema definition to the
github build-info project (https://github.com/JFrogDev/build-info). I
use the schema to validate the build-info metadata before I upload it
to Artifactory. This may be of use to you and others who are writing
their own build integrations.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users
Reply | Threaded
Open this post in threaded view
|

Re: build info associated with build

Jalon
On Sun, May 22, 2016 at 10:55 PM, J.T. Conklin <[hidden email]> wrote:
Jalon <[hidden email]> writes:
> For reasons I just don't want to type out, I'm trying to write a Gradle task
> that will upload build info to Artifactory after artifacts have been
> uploaded.
>
> I have verified that the file I'm creating contains all the correct data,
> including the correct MD5 and SHA1 values for the artifacts themselves
> (verified by checking the artifacts in the repo artifact tree, one by one).
>
> The problem is that Artifactory (Artifactory Pro Power Pack 3.9.4 (rev.
> 30226)) isn't associating the build info with said artifacts.  How can I
> tell?  Because when I go to Artifacts -> Builds -> <my build name> -> <my
> build number> -> Published Modules, then click on a module name and the
> "Repo Path" field is blank for all artifacts.

I recently went down a similar path at work, and encountered the same
symptoms -- artifacts weren't associated with the build-info metadata
even though the MD5 and SHA1 checksums matched.

In my case, I missed the fact that individual artifact uploads need the
build.name, build.number and build.timestamp attributes to be provided.
Specifying the artifacts' MD5 and SHA1 checksums in build-info metadata
is necessary but not sufficent.

Thanks for the reply.

The official REST Api docs state that the name and number must match, but don't say anything about the timestamp.  I'll have to try that.


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Artifactory-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/artifactory-users