Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 112 Current »

Downloading the latest agent version

Agent Files

There are two agent files

  • Build Scanner - sl-build-scanner.jar

  • Test Listener - sl-test-listener.jar

Download them from: https://agents.sealights.co/sealights-java/sealights-java-latest.zip

If you want to query the latest version you can do so with the following sample command: curl https://agents.sealights.co/sealights-java/sealights-java-version.txt

If you have a limitation accessing the endpoint agents.sealights.co and are limited to your specific servers DNS, then you can also get the agent from https://{company}.sealights.co/agents/sealights-java/sealights-java-latest.zip
Replace {company} with your company dns prefix

Sample commands for download

Unix (Shell)

wget -nv https://agents.sealights.co/sealights-java/sealights-java-latest.zip
unzip -oq sealights-java-latest.zip

#curl tool can also be used
#curl -L "https://agents.sealights.co/sealights-java/sealights-java-latest.zip" --output sealights-java-latest.zip

Windows (Powershell 5+)

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
iwr https://agents.sealights.co/sealights-java/sealights-java-latest.zip  -OutFile sealights-java-latest.zip -ErrorAction Continue
if (Test-Path -Path sealights-java-latest.zip -PathType Leaf) {
  Expand-Archive .\sealights-java-latest.zip
}

Downloading the specific agent version defined in Customer settings

Existing Customers can also download agents using the API below, which requires the use of an Agent or API token from the customer's Sealights dashboard. For Customers that need to set a specific recommended agent version other than the default latest, the API will download the recommended agent that has been set on the dashboard.

In the following examples, replace $DOMAIN with your domain and $SL_TOKEN with your SeaLights agent token

wget -nv -O sealights-java-agents.zip --header "accept: application/json" --header "Authorization: Bearer $SL_TOKEN" https://$DOMAIN/api/v2/agents/sealights-java/recommended/download 
#curl tool can also be used
#curl -X GET "https://$DOMAIN/api/v2/agents/sealights-java/recommended/download" -H "accept: application/json" -H "Authorization: Bearer $SL_TOKEN" -L --output sealights-java-agents.zip

unzip -oq sealights-java-agents.zip

Downloading a single agent from a local repo

In certain cases where you want to download just a single agent, or even if you want to download both from a local repo, you can use the sealights API to get the recommended version and then download the file directly.

In the following examples, replace $DOMAIN with your domain and $SL_TOKEN with your SeaLights agent token

AGENT_VERSION=$(curl -s -X GET "https://$DOMAIN/sl-api/v1/agent-apis/agents/types/sealights-java/default-version"  -H "accept: application/json" -H "Authorization: Bearer $SL_TOKEN" | sed 's/.*"version":"\([0-9\.]*\).*/\1/')
wget -O sl-build-scanner.jar https://oss.sonatype.org/service/local/repositories/releases/content/io/sealights/on-premise/agents/sl-build-scanner/${AGENT_VERSION}/sl-build-scanner-${AGENT_VERSION}.jar
wget -O sl-test-listener.jar https://oss.sonatype.org/service/local/repositories/releases/content/io/sealights/on-premise/agents/sl-test-listener/${AGENT_VERSION}/sl-test-listener-${AGENT_VERSION}.jar

Managing the recommended agent version

The agent version can be managed on the dashboard under the Settings / Cockpit and Onboarding / Agent versions section below.

Please refer to the following troubleshooting page to manage/update agents versions deployed locally: https://sealights.atlassian.net/l/cp/51c9X2dy

  • No labels