Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Info

In the following examplesexample below, replace $DOMAIN with your domain and $SL_TOKEN with your SeaLights agent token and the repo URL to your internal one.
Currently, the lines below download the Java agents (scanner and listener) from Maven Central.

Code Block
languagebash
#!/bin/bash
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" | jq sed-r 's/.*"version":"\([0-9\.]*\).*/\1/')
wget -O)
# Loop over the two agent artifact names and download each
for artifact in sl-build-scanner sl-test-listener; do
    wget -O "${artifact}.jar" "https://oss.sonatype.org/service/local/repositories/releases/content/io/sealights/on-premise/agents/sl-build-scanner${artifact}/${AGENT_VERSION}/sl-build-scanner-${artifact}-${AGENT_VERSION}.jar
wget"
done
#curl tool can also be used
#curl -OL sl-test-listener-o "${artifact}.jar" "https://oss.sonatype.org/service/local/repositories/releases/content/io/sealights/on-premise/agents/sl-test-listener${artifact}/${AGENT_VERSION}/sl-test-listener-${artifact}-${AGENT_VERSION}.jar"

Managing the recommended agent version

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

...

Info

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

...