jfrog / bamboo-jfrog-plugin

Easy integration between Bamboo and the JFrog Platform.
https://github.com/jfrog/bamboo-jfrog-plugin
Apache License 2.0
10 stars 2 forks source link

Using the plugin automatically creates targetProps on the uploaded artifacts - how do I disable them? #21

Closed yogch closed 3 weeks ago

yogch commented 1 month ago

Using the plugin automatically creates targetProps on the uploaded artifacts. How do I disable them? All of them or some of them?

sverdlov93 commented 1 month ago

Hi @yogch Thanks for reaching out. Can you provide the JFrog CLI command you used, the Props that were added and also if you can the logs from the task run?

yogch commented 1 month ago

Sure. My jfrog command: jf rt upload --insecure-tls --spec ./jfrog.spec

Relevant logs, I hope:

simple  19-Sep-2024 14:11:18    Starting task 'jfrog' of type 'org.jfrog.bamboo.bamboo-jfrog-plugin:JfTask'
simple  19-Sep-2024 14:11:18    [JFrog Plugin] Getting JFrog CLI executable...
simple  19-Sep-2024 14:11:20    [JFrog Plugin] Found existing JFrog CLI executable
simple  19-Sep-2024 14:11:20    [JFrog Plugin] The following JFrog CLI environment variables will be used: {JFROG_CLI_BUILD_NAME=Official - build, JFROG_CLI_USER_AGENT=bamboo-jfrog-plugin/1.0.4, JFROG_CLI_BUILD_NUMBER=122, JFROG_CLI_HOME_DIR=/home/me/bamboo-agent-home/temp/jfrog/DDD-AO-AB-122, JFROG_CLI_SERVER_ID=jfrog-test, JFROG_CLI_DEPENDENCIES_DIR=/home/me/bamboo-agent-home/temp/jfrog/dependencies, JFROG_CLI_BUILD_URL=http://IP:8085/browse/DDD-AO-AB-122, JFROG_CLI_LOG_TIMESTAMP=OFF}
simple  19-Sep-2024 14:11:20    [JFrog Plugin] Working directory: /home/me/bamboo-agent-home/xml-data/build-dir/DDD-AO-AB
simple  19-Sep-2024 14:11:20    [JFrog Plugin] Working Directory: /home/me/bamboo-agent-home/xml-data/build-dir/DDD-AO-AB
simple  19-Sep-2024 14:11:20    [JFrog Plugin] Running command: /home/me/bamboo-agent-home/temp/jfrog/jfrog-cli/jf config add jfrog-test --url=https://jfrog-server --interactive=false --overwrite=true --access-token=***
simple  19-Sep-2024 14:11:21    [JFrog Plugin] Working Directory: /home/me/bamboo-agent-home/xml-data/build-dir/DDD-AO-AB
simple  19-Sep-2024 14:11:21    [JFrog Plugin] Running command: /home/me/bamboo-agent-home/temp/jfrog/jfrog-cli/jf config use jfrog-test
simple  19-Sep-2024 14:11:21    [JFrog Plugin] [Info] Using server ID 'jfrog-test' (https://jfrog-server/)
simple  19-Sep-2024 14:11:21    [JFrog Plugin] Working Directory: /home/me/bamboo-agent-home/xml-data/build-dir/DDD-AO-AB
simple  19-Sep-2024 14:11:21    [JFrog Plugin] Running command: /home/me/bamboo-agent-home/temp/jfrog/jfrog-cli/jf rt upload --insecure-tls --spec ./jfrog.spec
simple  19-Sep-2024 14:11:21    [JFrog Plugin] [Info] [Thread 2] Uploading: /home/me/bamboo-agent-home/xml-data/build-dir/DDD-AO-CHEC/output/artifact.tar
...

Red ones are automatically added props:

image

My jfrog.spec is simple and looks like:

afs_target_props="build.name=my-build-name;build.number=my-build-num;version=my-version"
{
    "files": [
        {
            "pattern": "${output}/artifact.tar",
            "target": "a/path/",
            "targetProps": "${target_props}"
        },
...
sverdlov93 commented 3 weeks ago

@yogch For the build.name you can use JFROG_CLI_BUILD_NAME environment variable instead of setting it from targetprops. Same for build.number - JFROG_CLI_BUILD_NUMBER The vcs info is collected by default currently.

yogch commented 3 weeks ago

Ok, thanks. So there's no way to disable it?

sverdlov93 commented 3 weeks ago

Currently not. However, you can submit a feature request either here or on the JFrog CLI repository.

yogch commented 3 weeks ago

https://github.com/jfrog/bamboo-jfrog-plugin/issues/23