artifactory-query-lang

Artifactory AQL Get Specific Properties

眉间皱痕 提交于 2021-02-19 04:26:05
问题 I'm using Artifactory 3.5. My artifacts have custom properties. I want to be able to query for all artifacts that have that property and I want the result to show the property and its value. I know I can use: items.find(...).include("property.*") However, this returns all properties for the item matching the find criteria. How can I display only the specific property that I want? 回答1: The include element allows you to include only specific properties in the results For example, the following

Artifactory AQL download artifact

江枫思渺然 提交于 2019-12-21 23:19:13
问题 Is there a way to download an artifact using AQL? I have a query sent with: curl -u user:pass \ -X POST https://artifactoryURL/artifactory/api/search/aql \ -H 'content-type: text/plain' \ -T query.aql And my query.aql : items.find( { "repo":{"$eq":"repo"}, "$and": [ { "path": { "$match": "path/*"}, "name": { "$match": "*.rpm"} } ] } ) .sort({ "$desc": ["modified"] }) .limit(1) Now that I know it returns what I want, Is there a way to change the request from api/search/aql to something like

AQL build domain object does not return results

若如初见. 提交于 2019-12-12 16:24:40
问题 I'm running into an issue where I'm not able to get any of the queries I'm making on the build domain object to return when using AQL When I make the following curl: curl -X GET -H "X-JFrog-Art-Api: myArtifactroyKey" -H "Cache-Control: no-cache" "https://MyArtifactoryServer/artifactory/api/build/" I get a set of results: { "builds": [ { "uri": "/someBuild", "lastStarted": "2017-02-15T22:02:49.066+0000" }, { "uri": "/someOtherBuild", "lastStarted": "2017-02-15T21:45:09.590+0000" }, "uri": "

Is there any automated way to get artifact download URL back from artifactory?

佐手、 提交于 2019-12-11 17:49:45
问题 Is there any automated way to get artifact download URL back ? I'm working with maven projects , I use bamboo for build automation. After successful Build completion, artifacts will be pushed Jfrog artifactory. My requirement here is to get the artifact download URL back in an automated way(Using bamboo Plugins, Rest API, Jfrog CLI, Maven or any other) 回答1: You can use the Build Artifacts Search REST API endpoint. You will need to send the build name + number in the JSON, Artifactory will

Artifactory AQL download artifact

℡╲_俬逩灬. 提交于 2019-12-04 16:44:58
Is there a way to download an artifact using AQL? I have a query sent with: curl -u user:pass \ -X POST https://artifactoryURL/artifactory/api/search/aql \ -H 'content-type: text/plain' \ -T query.aql And my query.aql : items.find( { "repo":{"$eq":"repo"}, "$and": [ { "path": { "$match": "path/*"}, "name": { "$match": "*.rpm"} } ] } ) .sort({ "$desc": ["modified"] }) .limit(1) Now that I know it returns what I want, Is there a way to change the request from api/search/aql to something like api/download/aql and get those items? EDIT: I had also tried doing this with the jfrog cli but they don't

Artifactory aql: find builds of job with given property

烈酒焚心 提交于 2019-11-30 09:41:30
问题 I am trying to query which build number(s) produced artifacts from build foo with artifact property vcs.Revision=aabbccddee123456 . In Artifactory 5.1.3. I was trying like this so far: curl -u user:apikey -i -X POST https://artifactory.foobar.com/artifactory/api/search/aql -H "content-type:text/plain" -T query.json query.json: builds.find( { "module.artifact.item.repo":"snapshot-local", "name":"foo", "module.artifact.item.@vcs.Revision":"aabbccddee123456" } ) However, none of these 3 lines

Artifactory aql: find builds of job with given property

南楼画角 提交于 2019-11-29 16:50:38
I am trying to query which build number(s) produced artifacts from build foo with artifact property vcs.Revision=aabbccddee123456 . In Artifactory 5.1.3. I was trying like this so far: curl -u user:apikey -i -X POST https://artifactory.foobar.com/artifactory/api/search/aql -H "content-type:text/plain" -T query.json query.json: builds.find( { "module.artifact.item.repo":"snapshot-local", "name":"foo", "module.artifact.item.@vcs.Revision":"aabbccddee123456" } ) However, none of these 3 lines seem individually correct: builds.find({"module.artifact.item.repo":"snapshot-local"}) returns nothing,