When I go looking in AF, I have plenty more builds than the last 30...
Trying the same thing from command line and posting the output. The following is the non-working case where JFROG_CLI_BUILD_PROJECT is set in the environment:
12:56:08 [Debug] JFrog CLI version: 2.40.0
12:56:08 [Debug] OS/Arch: linux/amd64
12:56:08 [Debug] Usage Report: Sending info...
12:56:09 [🔵Info] Discarding builds...
12:56:09 [Debug] Sending HTTP POST request to: https://artifactory/artifactory/api/build/retention/MyProject?async=false
12:56:09 [Debug] Sending HTTP GET request to: https://artifactory/artifactory/api/system/version
12:56:09 [Debug] Artifactory response: 200
12:56:09 [Debug] JFrog Artifactory version is: 7.41.14
12:56:09 [Debug] Sending HTTP POST request to: https://artifactory/artifactory/api/system/usage
12:56:09 [🔵Info] Builds discarded.
12:56:09 [Debug] Usage Report: Usage info sent successfully. Artifactory response: 200
Next is the working case where I specify the --project parameter on the command line:
12:57:47 [Debug] JFrog CLI version: 2.40.0
12:57:47 [Debug] OS/Arch: linux/amd64
12:57:47 [Debug] Usage Report: Sending info...
12:57:47 [🔵Info] Discarding builds...
12:57:47 [Debug] Sending HTTP POST request to: https://artifactory/artifactory/api/build/retention/MyProject?async=false&project=my-project
12:57:47 [Debug] Sending HTTP GET request to: https://artifactory/artifactory/api/system/version
12:57:47 [Debug] Artifactory response: 200
12:57:47 [Debug] JFrog Artifactory version is: 7.41.14
12:57:47 [Debug] Sending HTTP POST request to: https://artifactory/artifactory/api/system/usage
12:57:47 [Debug] Usage Report: Usage info sent successfully. Artifactory response: 200
Notice the presence of the project= parameter to the REST API
Reproduction steps
See above
Expected behavior
My builds should be discarded and the correct project as specified by the JF_CLI_BUILD_PROJECT environment variable should be passed along to the REST call.
Describe the bug
In an Jenkins pipeline, I specify my environment variables such as:
Then I run the
jf rt bdi --max-builds 30 --delete-artifacts
at the end of my pipeline.Current behavior
When I go looking in AF, I have plenty more builds than the last 30...
Trying the same thing from command line and posting the output. The following is the non-working case where JFROG_CLI_BUILD_PROJECT is set in the environment:
Next is the working case where I specify the --project parameter on the command line:
Notice the presence of the project= parameter to the REST API
Reproduction steps
See above
Expected behavior
My builds should be discarded and the correct project as specified by the JF_CLI_BUILD_PROJECT environment variable should be passed along to the REST call.
JFrog plugin version
1.4.0
JFrog CLI version
2.40.0
Operating system type and version
Ubuntu 22.04
JFrog Artifactory version
No response
JFrog Xray version
No response