Skip to content

Commit

Permalink
updating the readMe
Browse files Browse the repository at this point in the history
  • Loading branch information
adityanarayanp committed Dec 11, 2023
1 parent 721500b commit c84921a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 16 deletions.
73 changes: 57 additions & 16 deletions doc/UsageDoc/CA_UsageDocument.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

* [Continuous Clearing Tool Execution Test Mode](#continuous-clearing-tool-execution-test-mode)

* [Artifactory Uploader Release Execution](#artifactory-uploader-release-execution)

* [How to handle multiple project types in same project](#how-to-handle-multiple-project-types-in-same-project)

* [Troubleshoot](#troubleshoot)
Expand Down Expand Up @@ -79,7 +81,7 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
>**_2.Artifactory Token :_**
>>a)For enabling the upload of cleared packages into jfrog artifactory, user's need to have their own jfrog artifactory credentials.This includes a username and an Apikey.
>>a)For enabling the upload of cleared, internal and development packages into jfrog artifactory, user's need to have their own jfrog artifactory credentials.This includes a username and an Apikey.
**Pipeline Configuration :**

Expand Down Expand Up @@ -129,7 +131,8 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
`Note : Since the PackageIdentifier generates an SBOM file both Dev dependency and internal components will be existing in the BOM file.Make sure to set `RemoveDevDependency` Flag as true while running this exe`
>**3. Artifactory Uploader**
- Processes the CycloneDXBOM file(i.e., the output of the SW360PackageCreator) and uploads the already cleared components(clearing state-Report approved) to the siparty release repo in Jfrog Artifactory.The components in the states other than "Report approved" will be handled by the clearing experts via the Continuous Clearing Dashboard.
- This script processes the CycloneDXBOM file generated by the SW360PackageCreator. It targets components with an already cleared status (i.e., "Report approved") and facilitates the copy of these components from the remote repository to the "siparty release" repository in JFrog Artifactory. Additionally, it handles the movement of development components from the remote repository to the "siparty devdep" repository. Furthermore, internal packages are moved from the "energy-dev-" repository to the "energy-release-" repository. Components in states not meeting the above conditions are designated for handling by clearing experts through the Continuous Clearing Dashboard.
`Note: The default setting for the Release flag is False. This flag is present to execute a dry run of the component copy/move operation. This dry run is instrumental in verifying the accuracy of the components' paths and permissions before the actual operation takes place.`

### **Prerequisite for Continuous Clearing Tool execution**

Expand Down Expand Up @@ -210,11 +213,6 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
"SW360URL": "<Insert SW360URL>",
"Fossologyurl": "<Insert Fossologyurl>",
"JFrogApi": "<Insert JFrogApi>",
"JfrogNugetDestRepoName": "<Insert JfrogNugetDestRepoName>",
"JfrogNpmDestRepoName": "<Insert JfrogNpmDestRepoName>",
"JfrogMavenDestRepoName": "<Insert JfrogMavenDestRepoName>",
"JfrogPythonDestRepoName": "<Insert JfrogPythonDestRepoName>",
"JfrogConanDestRepoName": "<Insert ConanDestRepoName>",
"PackageFilePath": "/mnt/Input",
"BomFolderPath": "/mnt/Output",
"BomFilePath":"/mnt/Output/<SW360 Project Name>_Bom.cdx.json",
Expand All @@ -238,7 +236,11 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
"JfrogNpmRepoList": [
"<Npm Remote Cache Repo Name>",//This is a mirror repo for npm registry in JFrog
"<Npm Release Repo Name>", //This should be the release repo in JFrog
"<Npm DevDep Repo Name>" //This should be the development dependency repo in JFrog
],
"JfrogThirdPartyDestRepoName": "<Insert third party NpmDestRepoName>",
"JfrogInternalDestRepoName": "<Insert Internal NpmDestRepoName>",
"JfrogDevDestRepoName": "<Insert Dev NpmDestRepoName>",
"ExcludedComponents": []
},
"Nuget": {
Expand All @@ -247,7 +249,11 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
"JfrogNugetRepoList": [
"<Nuget Remote Cache Repo Name>",//This is a mirror repo for nuget.org in JFrog
"<Nuget Release Repo Name>",//This should be the release repo in JFrog
"<Nuget DevDep Repo Name>" //This should be the development dependency repo in JFrog
],
"JfrogThirdPartyDestRepoName": "<Insert third party NugetDestRepoName>",
"JfrogInternalDestRepoName": "<Insert Internal NugetDestRepoName>",
"JfrogDevDestRepoName": "<Insert Dev NugetDestRepoName>",
"ExcludedComponents": []
},
"Maven": {
Expand All @@ -256,7 +262,11 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
"JfrogMavenRepoList": [
"<Maven Remote Cache Repo Name>",//This is a mirror repo for repo.maven in JFrog
"<Maven Release Repo Name>",//This should be the release repo.maven in JFrog
"<Maven DevDep Repo Name>" //This should be the development dependency repo in JFrog
],
"JfrogThirdPartyDestRepoName": "<Insert third party MavenDestRepoName>",
"JfrogInternalDestRepoName": "<Insert Internal MavenDestRepoName>",
"JfrogDevDestRepoName": "<Insert Dev MavenDestRepoName>",
"ExcludedComponents": []
},
"Debian": {
Expand All @@ -270,7 +280,11 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
"JfrogPythonRepoList": [
"<Python Remote Cache Repo Name>",
"<Python Release Repo Name>",//This should be the release repo in JFrog
"<Python DevDep Repo Name>" //This should be the development dependency repo in JFrog
],
"JfrogThirdPartyDestRepoName": "<Insert third party PythonDestRepoName>",
"JfrogInternalDestRepoName": "<Insert Internal PythonDestRepoName>",
"JfrogDevDestRepoName": "<Insert Dev PythonDestRepoName>",
"ExcludedComponents": []
},
"Conan": {
Expand All @@ -279,7 +293,11 @@ Continuous Clearing Tool reduces the effort in creating components in SW360 and
"JfrogConanRepoList": [
"<Conan Remote Cache Repo Name>",
"<Conan Release Repo Name>",
"<Conan DevDep Repo Name>" //This should be the development dependency repo in JFrog
],
"JfrogThirdPartyDestRepoName": "<Insert third party ConanDestRepoName>",
"JfrogInternalDestRepoName": "<Insert Internal ConanDestRepoName>",
"JfrogDevDestRepoName": "<Insert Dev ConanDestRepoName>",
"ExcludedComponents": []
}
Expand All @@ -306,13 +324,23 @@ Description for the settings in `appSettings.json` file
| 14| --logfolderpath | Path to create log | No| If user wants to give configurable log path this parameter is used |
| 15 | --fossologyurl | Fossology URL | Yes | https://<my_fossology_server> | Yes | | Optional (By default it will take from the Package Creator exe location | |
| 16 | --artifactoryuploaduser | Jfrog User Email | Yes |
| 17 | --jfrognpmdestreponame | The destination folder name for the NPM package to be copied to | Yes |
| 18 | --jfrognugetdestreponame | The destination folder name for the Nuget package to be copied to | Yes |
| 19 | --jfrogmavendestreponame | The destination folder name for the Maven package to be copied to | Yes | |
| 20 | --jfrogpythondestreponame | The destination folder name for the Python package to be copied to | Yes | |
| 21 | --jfrogconandestreponame | The destination folder name for the Conan package to be copied to | Yes | |
| 22 | --timeout | SW360 response timeout value | No | |

|17 | --release | Artifactory Uploader release mode |Optional (By default it will be set to False) | |
| 18 | --npm:jfrogthirdpartydestreponame | The destination folder name for the cleared NPM package to be copied to | Yes |
| 19 | --npm:jfroginternaldestreponame | The destination folder name for the internal NPM package to be moved to | Yes |
| 20 | --npm:jfrogdevdestreponame | The destination folder name for the development NPM package to be copied to | Yes |
| 21 | --nuget:jfrogthirdpartydestreponame | The destination folder name for the cleared Nuget package to be copied to | Yes |
| 22 | --nuget:jfroginternaldestreponame | The destination folder name for the internal Nuget package to be moved to | Yes |
| 23 | --nuget:jfrogdevdestreponame | The destination folder name for the development Nuget package to be copied to | Yes |
| 24 | --maven:jfrogthirdpartydestreponame | The destination folder name for the cleared Maven package to be copied to | Yes |
| 25 | --maven:jfroginternaldestreponame | The destination folder name for the internal Maven package to be moved to | Yes |
| 26 | --maven:jfrogdevdestreponame | The destination folder name for the development Maven package to be copied to | Yes |
| 27 | --python:jfrogthirdpartydestreponame | The destination folder name for the cleared Python package to be copied to | Yes |
| 28 | --python:jfroginternaldestreponame | The destination folder name for the internal Python package to be moved to | Yes |
| 29 | --python:jfrogdevdestreponame | The destination folder name for the development Python package to be copied to | Yes |
| 30 | --conan:jfrogthirdpartydestreponame | The destination folder name for the cleared Conan package to be copied to | Yes |
| 31 | --conan:jfroginternaldestreponame | The destination folder name for the internal Conan package to be moved to | Yes |
| 32 | --conan:jfrogdevdestreponame | The destination folder name for the development Conan package to be copied to | Yes |
| 33 | --timeout | SW360 response timeout value | No | |

#### **Method 2**

Expand Down Expand Up @@ -408,12 +436,25 @@ Continuous Clearing Tool can be executed as container or as binaries,
- In order to execute the tool in test mode we need to pass an extra parameter to the existing
argument list.

**Example** : `docker run --rm -it -v /D/Projects/Output:/mnt/Output -v /D/Projects/DockerLog:/var/log -v /D/Projects/CAConfig:/etc/CATool ghcr.io/siemens/continuous-clearing dotnet ArtifactoryUploader.dll --settingsfilepath /etc/CATool/appSettings.json --mode test`
**Example** : `docker run --rm -it -v /D/Projects/Output:/mnt/Output -v /D/Projects/DockerLog:/var/log -v /D/Projects/CAConfig:/etc/CATool ghcr.io/siemens/continuous-clearing dotnet SW360PackageCreator.dll --settingsfilepath /etc/CATool/appSettings.json --mode test`

or

**Example** : `ArtifactoryUploader.exe --settingsfilepath /<PathToConfig>/appSettings.json --mode test`
**Example** : `SW360PackageCreator.exe --settingsfilepath /<PathToConfig>/appSettings.json --mode test`

# Artifactory Uploader Release Execution

By default, the release mode is set to `False`. This configuration is designed for the routine execution of the Artifactory uploader on a daily basis during the project's development phase. The primary objective is to continuously verify the accuracy of component paths and permissions before actual operations.
When the release mode is set to `True`, it indicates a shift towards deployment in a production environment. In this mode, the Artifactory uploader is prepared for live operations, signaling the transition from the verification stage to the actual copy/move of components.

- In order to execute the tool in release mode we need to pass an extra parameter to the existing
argument list.

**Example** : `docker run --rm -it -v /D/Projects/Output:/mnt/Output -v /D/Projects/DockerLog:/var/log -v /D/Projects/CAConfig:/etc/CATool ghcr.io/siemens/continuous-clearing dotnet ArtifactoryUploader.dll --settingsfilepath /etc/CATool/appSettings.json --release true`

or

**Example** : `ArtifactoryUploader.exe --settingsfilepath /<PathToConfig>/appSettings.json --release true`

# How to handle multiple project types in same project

Expand Down
Binary file modified doc/usagedocimg/artifactoryuploader.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c84921a

Please sign in to comment.