-
Notifications
You must be signed in to change notification settings - Fork 15
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
Task: CLI artifact add command rstuf artifact add
#39
Comments
|
Requires for implementation: Add targets (Feature)
Import targets (Feature) |
I updated the Issue description and the comment above. |
I think we can close that one, am I right @kairoaraujo? |
We added only part of this.
|
Sorry, but the comment you are referring to has three todo items and all of them are marked as complete. |
There are two feauteres there (subtitles) there: Add targets (Feature) and Import targets (Feature) |
rstuf artifact add
I suggest breaking down this feature into three sub-tasks
So we can delivery small features and discuss more details in each. |
@kairoaraujo good point! I was thinking of breaking it similarly as well. I was also considering that giving file information can also be substituted with giving JSON file with information for only one file. Adding an actual file I see the immediate value, but do you think we need both JSON file and file info as well? |
The JSON file is for adding a list of files, but it is a low priority. |
Yeah, my point is one file is also a list of one. So, do we want both JSON file and passing file information? |
Implement to the rstuf CLI the functionality to add artifacts.
Two specific features to add targets:
Add Artifact (Feature)
This target adds the target using the RSTUF REST API. This feature is an interface to add targets using the command line.
1. Simple one artifact file
Note: the user can use the token (
-t/--token
) when API requires authentication/authorization, if the user usesrstuf --auth
it ignores the token parameter.Giving the artifact
rstuf artifact add <file> [-p/--path <file-path>, -c/--custom, -t/--token <token>]
Example:
rstuf artifact add file-v1.0.3.tar.gz -p projectA/download/
It gets from the file the hash, size and add a custom path in the metadata
projectA/download/file-v1.0.3.tar.gz
Without file, just the information
rstuf artifact add -p/--path [file-path], -l/lenght [length] -h/hashes [b2sum] -c/--custom
2. From JSON
rstuf artifact add -d @file.json
It should return the task id.
Import targets (Feature)
This feature adds a huge amount of targets, importing from CSV directly to RSTUF Database
The feature description is detailed in these links
The text was updated successfully, but these errors were encountered: