> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/advanced-features/uploading-reports-more-options.md).

# Uploading Reports - More options

## Uploading Git Commit Logs

If you do not work with `github` or cannot provide access to the source folder where the git logs are located, you can generate them on your own and upload them separately to the SeaLights servers.

{% hint style="info" %}
See [Command Reference](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/command-reference.md#inlineextension-upload-report-files)for full parameter details
{% endhint %}

### Generating the commit reports <a href="#generating-the-commit-reports" id="generating-the-commit-reports"></a>

The file must be a JSON file with an array "`commitLog`" of commits. Below, a sample command which generate 2 days of commit logs:

{% code overflow="wrap" lineNumbers="true" %}

```sh
echo "{ \"commitLog\": " > commitLog.json
git log --pretty=format:'{"commit": "%H","authorName": "%an","authorEmail": "%ae","commiterName": "%cn","commiterEmail": "%ce","authorDate": "%at000","commiterDate": "%ct000","title": "%f"},'  --since="2 days ago"  | sed "$ s/,$//" | sed ':a;N;$!ba;s/\r\n\([^{]\)/\\n\1/g'| awk 'BEGIN { print("[") } { print($0) } END { print("]") }' >> commitLog.json
echo "}" >> commitLog.json
```

{% endcode %}

### Upload git generated commit log reports <a href="#upload-git-generated-commit-log-reports" id="upload-git-generated-commit-log-reports"></a>

{% code overflow="wrap" lineNumbers="true" %}

```sh
java -jar sl-test-listener.jar uploadReports --tokenFile /path/to/sltoken.txt --buildSessionIdFile buildSessionId.txt --reportFile commitLog.json --type "commitLog" --source "script"
```

{% endcode %}

***

## Uploading Multiple Files

When uploading report files to the SeaLights server, you might need to upload multiple files rather than only one.

This can be done by either provide a folder where **all** the files existing in it will be uploaded or alternatively upload each single file in a command line loop.

{% hint style="info" %}
See [Command Reference](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/command-reference.md#inlineextension-upload-report-files)for full parameter details
{% endhint %}

{% hint style="warning" %}
An open execution is required in order to upload a report
{% endhint %}

### Upload multiple report files in a folder <a href="#upload-multiple-report-files-in-a-folder" id="upload-multiple-report-files-in-a-folder"></a>

{% code overflow="wrap" lineNumbers="true" %}

```sh
java -jar sl-test-listener.jar uploadReports --tokenFile /path/to/sltoken.txt --buildSessionIdFile buildSessionId.txt --reportFilesFolder "/path/to/reports/" --source "Junit xml report"
```

{% endcode %}

{% hint style="warning" %}
All the files in the specified folder will be uploaded regardless of their extension
{% endhint %}

{% hint style="warning" %}
In Windows, you should make sure to remove any trailing `\` at the end of the path in the value of the `-reportFilesFolder` flag
{% endhint %}

### Upload multiple report files using a command line loop <a href="#upload-multiple-report-files-using-a-command-line-loop" id="upload-multiple-report-files-using-a-command-line-loop"></a>

#### **Sample commands**

{% tabs %}
{% tab title="Bash" %}
{% code overflow="wrap" lineNumbers="true" %}

```sh
for f in /path/to/junit_report_*.xml
do
    java -jar sl-test-listener.jar uploadReports -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -reportFile "$f" -source "Junit xml report"
done
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code overflow="wrap" lineNumbers="true" %}

```sh
for /r %i in (.\tests\Test*.xml) do java -jar sl-test-listener.jar uploadReports -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -reportFile %i -source "Junit xml report"
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/java-agent/advanced-features/uploading-reports-more-options.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
