jfrog / jenkins-artifactory-plugin

Jenkins artifactory plugin
http://jenkins-ci.org/
115 stars 186 forks source link

SKETCH: add step for getting properties #943

Open eaaltonen opened 3 weeks ago

eaaltonen commented 3 weeks ago

Add a groovy script step to fetch custom properties from Artifactory.

NOTE: this is functional, but not suitable to be integrated directly. Some of the changes should be made to https://github.com/jfrog/build-info instead. This PR shows how to serve our use case of accessing our custom metadata and is here to solicit discussion on the API.

This provides Artifactory users with access to their additional metadata associated with artifacts stored in Artifactory, and allows pipelines to make decisions based on that metadata.

This is called roughly as:

artifactory = newArtifactoryServer( ARGS )
def props = artifactoryGetProps(
    server: artifactory,
    relativePath: "PATH/TO/ARTIFACT"
    propertyKeys: ['PROPA', 'PROPB']
)
github-actions[bot] commented 3 weeks ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

eaaltonen commented 3 weeks ago

I have read the CLA Document and I hereby sign the CLA

eyalbe4 commented 3 weeks ago

@eaaltonen, Thank you for your contribution. We are not promoting new features for this plugin. We strongly recommend users switch to the newer JFrog Jenkins Plugin, which offers significantly more features and functionality than this plugin, including the new functionality proposed by this PR. Both plugins can be used side-by-side within the same jobs.

eaaltonen commented 1 week ago

@eyalbe4: there is an issue that is preventing us from switching to the JFrog Jenkins plugin at this point. I've opened an issue via another channel.

If I split the parts from this PR that belong to build-info to a separate PR, would you be open to accepting them while the other issue is resolved?