Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yogch opened this issue Sep 19, 2024 · 6 comments

Comments

@yogch
Copy link

yogch commented Sep 19, 2024

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

@sverdlov93
Copy link
Collaborator

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
Copy link
Author

yogch commented Sep 19, 2024

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:

  • The build.name is both automatically added (the first part) and the second part is something I've added, so I got 2 props. I only want mine.
  • The green one is automatically added, but I don't care.
  • This specific file's path was from inside a git repo, so it got these props. I have other artifacts which aren't from a git repo, so they only get that additional build.name prop.

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
Copy link
Collaborator

sverdlov93 commented Sep 25, 2024

@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
Copy link
Author

yogch commented Sep 25, 2024

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

@sverdlov93
Copy link
Collaborator

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

@yogch
Copy link
Author

yogch commented Sep 26, 2024

#23

@yogch yogch closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants