It is advised to use the below commands only once a week to download the latest version of the Unified Agent for performance reasons and not as part of every build. You can do this using a scheduler task, such as cron. |
Use the following options to download the latest version of the WhiteSource Unified Agent JAR file and configuration file to your local host.
Run the following commands:
curl -LJO "https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar" curl -LJO "https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.config" |
Run the following commands:
powershell bitsadmin /transfer mydownload /dynamic /download /priority FOREGROUND https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar $pwd\wss-unified-agent.jar powershell bitsadmin /transfer mydownload /dynamic /download /priority FOREGROUND https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.config $pwd\wss-unified-agent.config |
Make sure that Background Intelligent Transfer Service (BITS) is enabled if you want to use PowerShell on Windows. |
Linux/Unix
Run the following commands from the Linux/Unix bash prompt :
curl -LJO "https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar" curl -LJO "https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.config" |
Update the configuration file (wss-unified-agent.config) that you downloaded in step 2 according to your specific requirements.
Enable the relevant lines by removing the '#' symbol at the beginning of the lines.
Parameter | Input | default value | description |
---|---|---|---|
docker.gcr.enable | true or false | false | Enable/Disable google container registry resolving. |
docker.gcr.account | account mail | Empty String | Not mandatory. Specifies which account to set active and work on, cloud SDK can have multiple logged in accounts but may have only one active. One account is always active by default. Otherwise, commands will not work. |
docker.gcr.repositories | Host-Name/Project-Id | Empty List | A list of repositories separated by comma. If empty, it will use the default repository. Example value: |
Run the Unified Agent with the modified configuration file via this command:
java -jar wss-unified-agent.jar -apiKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx -c wss-unified-agent.config |
The scanner saves your required images and scans all the file system and installed packages.
It scans all the image layers, and handles archive files in the layers based on the value in the property 'archiveExtractionDepth'.
The Docker image is saved to the temporary directory defined in your environment, and is deleted immediately after the scan.
The scanning results are presented in a new WhiteSource project identified by the name of the image in the following format: <image id> <repository> <tag>.
The project is created in the WhiteSource product specified in the configuration file or command line.