Sending Build Info
Overview
Section titled “Overview”Send build information from your Git repository and CI pipeline to the Lineai server. This is used when build metadata is not available through other means—for example, when artifacts are not publicly accessible or when environmental constraints prevent agents from gathering build information automatically.
The workflow runs in the Git working tree and sends the following information gathered from Git:
- Git author
- Git author email
- Git branch
- Git commit hash
- Git commit message
- Git repository URL
You can also send this information, specified in your pipeline:
- Build log
- Build number
- Build status
- Job name
- Node name
- Pipeline system
Use one of these methods:
- GitHub Action (recommended) — for GitHub Actions workflows.
- Manual Docker — for Jenkins and other CI systems; pull the dedicated image from Lineai public ECR.
Both methods use the lineai_send-build-info image (public.ecr.aws/lineai.com/lineai_send-build-info). Scanning agent images (Java, .NET, SQL, JavaScript, and so on) do not support send_build_info.
Prerequisites
Section titled “Prerequisites”Agent credentials
Section titled “Agent credentials”Obtain AGENT_UUID and AGENT_PASSWORD from your Lineai administrator. These identify a pre-authorized agent that is allowed to submit build metadata.
Configure credentials
Section titled “Configure credentials”| Name | Where | Description |
|---|---|---|
LINEAI_HOST | GitHub repository variable, Jenkins credential, or CLI --server | Lineai server URL without the /lineai/ui/ suffix |
AGENT_UUID | GitHub repository secret, Jenkins credential, or CLI --agent-uuid | Agent ID from your Lineai administrator |
AGENT_PASSWORD | GitHub repository secret, Jenkins credential, or CLI --agent-password | Agent password from your Lineai administrator |
For GitHub Actions, configure LINEAI_HOST as a repository variable and AGENT_UUID / AGENT_PASSWORD as repository secrets.
GitHub Action (Recommended)
Section titled “GitHub Action (Recommended)”The Lineai Send Build Info GitHub Action sends git and build metadata from a workflow to your Lineai server. It runs the lineai_send-build-info image from Lineai public ECR (public.ecr.aws/lineai.com/lineai_send-build-info).
The repository at scan_path must be a Git working tree (typically after actions/checkout). Use if: always() on the step when build info should be sent even when earlier steps fail.
For more information, see GitHub Marketplace - Lineai Send Build Info.
Example workflow
Section titled “Example workflow”name: lineai-build-info
on: push: branches: [ "integration" ] pull_request: branches: [ "integration" ] workflow_dispatch:
jobs: lineai-build-info: name: Send Lineai Build Info environment: Lineai Scan Env runs-on: ubuntu-latest steps: - name: Check out the repo uses: actions/checkout@v4 - name: Send Lineai Build Info if: always() uses: LineaiIncEngineering/lineai-send-build-info-github-action@master with: lineai_host: ${{ vars.LINEAI_HOST }} agent_uuid: ${{ secrets.AGENT_UUID }} agent_password: ${{ secrets.AGENT_PASSWORD }} scan_path: /github/workspace job_name: ${{ github.workflow }} build_number: ${{ github.run_number }} build_status: ${{ job.status }} pipeline_system: GitHub ActionsExample with build log
Section titled “Example with build log”Capture build output to a file under the workspace, then pass it to the action:
- name: Build run: mvn -B package 2>&1 | tee "${GITHUB_WORKSPACE}/build.log" - name: Send Lineai Build Info if: always() uses: LineaiIncEngineering/lineai-send-build-info-github-action@master with: lineai_host: ${{ vars.LINEAI_HOST }} agent_uuid: ${{ secrets.AGENT_UUID }} agent_password: ${{ secrets.AGENT_PASSWORD }} scan_path: /github/workspace job_name: ${{ github.workflow }} build_number: ${{ github.run_number }} build_status: ${{ job.status }} pipeline_system: GitHub Actions log_file: /github/workspace/build.log log_lines: 50000Action inputs
Section titled “Action inputs”| Name | Type | Description |
|---|---|---|
lineai_host | String | The host address of the Lineai instance without the /lineai/ui/ part. |
agent_uuid | String | The UUID of the Agent in Lineai. |
agent_password | String | The password for the agent. |
scan_path | String | Absolute path to the Git repository root inside the container. Defaults to /github/workspace. |
pipeline_system | String | CI/CD system name reported to Lineai. Defaults to GitHub Actions. |
job_name | String | Job or workflow name (e.g. ${{ github.workflow }}). |
build_number | String | Build number (e.g. ${{ github.run_number }}). |
build_status | String | Build status (e.g. ${{ job.status }}). |
log_file | String | Absolute path to a build log file inside the container. |
log_lines | String | Trailing lines to send from the log file (min 5, max 50000). Only used when log_file is set. |
timeout | String | Network timeout in seconds (min 5, max 300). |
dry_run | boolean | Print planned work without executing. Defaults to false. |
cleanup_temp_files | boolean | Delete temporary files after completion. Defaults to false. |
verbose | boolean | Enable extra logging. Defaults to false. |
Requirements
Section titled “Requirements”- Run
actions/checkoutbefore this action so.gitexists underscan_path. - Configure
LINEAI_HOST(repository variable),AGENT_UUID, andAGENT_PASSWORD(repository secrets), or pass them viawith. scan_pathmust be an absolute path. For standard GitHub-hosted runners, use/github/workspace.
Troubleshooting
Section titled “Troubleshooting”- Git repository not found: Ensure checkout ran and
scan_pathpoints at the repository root, not a subdirectory without.git. - Authentication errors: Verify
lineai_host,agent_uuid, andagent_passwordmatch credentials provided by your Lineai administrator. - Build logs: Write logs under
/github/workspaceand setlog_fileto that path. This action cannot add extra Docker volume mounts like a manualdocker run -v ...:/log_file_pathstep. - Code scanning: The send-build-info image only supports sending build info. For code scans, use the Java or .NET GitHub Actions, or other Lineai scanning agents.
Manual Docker
Section titled “Manual Docker”For Jenkins, GitLab CI, Azure DevOps, or other systems that run shell steps, pull and run the dedicated send-build-info image from Lineai public ECR. Do not use scanning agent images (lineai_java, lineai_dotnet, lineai_sql, lineai_javascript, and so on) for build info.
Image:
public.ecr.aws/lineai.com/lineai_send-build-info:latestMount your Git working tree at /scan. The container command is send_build_info. Optionally mount a directory at /log_file_path when sending build logs.
Jenkins example
Section titled “Jenkins example”This pattern is used in Lineai Jenkins pipelines when sending build info after a failed build:
SEND_BUILD_INFO_IMAGE="public.ecr.aws/lineai.com/lineai_send-build-info:latest"
docker run \ --pull always \ --rm \ --volume "${WORKSPACE}:/scan" \ --volume "${WORKSPACE}:/log_file_path" \ "${SEND_BUILD_INFO_IMAGE}" send_build_info \ --agent-password="${AGENT_PASSWORD}" \ --agent-uuid="${AGENT_UUID}" \ --build-number="${BUILD_NUMBER}" \ --build-status="FAILURE" \ --job-name="my-project-${BRANCH_NAME}" \ --log-file="/log_file_path/build-logs-summary.log" \ --pipeline-system="Jenkins" \ --server="https://yourinstance.app.lineai.com" \ --timeout=60Requirements:
${WORKSPACE}(or your checkout directory) must contain a.gitdirectory.--serveris the Lineai server URL without the/lineai/ui/suffix.--log-filepaths under/log_file_pathare combined with the/log_file_pathvolume mount (see below).
Basic example
Section titled “Basic example”SEND_BUILD_INFO_IMAGE="public.ecr.aws/lineai.com/lineai_send-build-info:latest"
docker run --pull always --rm \ --volume "/path/to/your/repo:/scan" \ "${SEND_BUILD_INFO_IMAGE}" send_build_info \ --agent-uuid="agentuuid" \ --agent-password="agentpassword" \ --server="https://yourinstance.app.lineai.com"With build log
Section titled “With build log”When using volume mounts with --log-file, paths are combined with the /log_file_path mount as follows:
-v /opt/lineai/sql/logs:/log_file_path --log-file myLogFile.txt→/log_file_path/myLogFile.txt-v /opt:/log_file_path --log-file lineai/sql/logs/myLogFile.txt→/log_file_path/lineai/sql/logs/myLogFile.txt-v /opt/lineai/sql:/log_file_path --log-file logs/myLogFile.txt→/log_file_path/logs/myLogFile.txt
SEND_BUILD_INFO_IMAGE="public.ecr.aws/lineai.com/lineai_send-build-info:latest"
docker run --pull always --rm \ --volume "/home/user/myproject:/scan" \ --volume "/home/user/logs:/log_file_path" \ "${SEND_BUILD_INFO_IMAGE}" send_build_info \ --agent-uuid="agentuuid" \ --agent-password="agentpassword" \ --server="https://yourinstance.app.lineai.com" \ --log-file="/log_file_path/build.log" \ --build-number="42" \ --build-status="SUCCESS" \ --job-name="my-build" \ --pipeline-system="Jenkins"Environment variables
Section titled “Environment variables”Instead of CLI flags, you can pass credentials via environment variables:
SEND_BUILD_INFO_IMAGE="public.ecr.aws/lineai.com/lineai_send-build-info:latest"
export AGENT_UUID="agentuuid"export AGENT_PASSWORD="agentpassword"export LINEAI_HOST="https://yourinstance.app.lineai.com"
docker run --pull always --rm \ --volume "/home/user/myproject:/scan" \ -e AGENT_UUID \ -e AGENT_PASSWORD \ -e LINEAI_HOST \ "${SEND_BUILD_INFO_IMAGE}" send_build_infoCommand-line options
Section titled “Command-line options”Run the image with help send_build_info or send_build_info --help for the full list of options:
docker run --rm public.ecr.aws/lineai.com/lineai_send-build-info:latest help send_build_infoCommon options:
| Option | Description |
|---|---|
--server, -s | Lineai server URL |
--agent-uuid, -a | Agent UUID |
--agent-password, -P | Agent password |
--path, -p | Git repository path (default /scan inside the container) |
--log-file, -f | Build log file path |
--log-lines | Trailing lines to send from the log file |
--job-name, -j | Job or pipeline name |
--build-number, -b | Build number |
--build-status, -t | Build status (e.g. SUCCESS, FAILURE) |
--pipeline-system, -i | CI/CD system name |
--timeout | Network timeout in seconds |
--verbose, -v | Extra logging |
Docker troubleshooting
Section titled “Docker troubleshooting”- Git repository not found: Mount the repository root at
/scan, not a subdirectory without.git. - Authentication errors: Verify server URL, agent UUID, and password match credentials provided by your Lineai administrator.
- Code scanning: This image only supports
send_build_info. Use the appropriate scanning agent image or GitHub Action for code scans.