Skip to content

Sending Build Info

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:

  1. GitHub Action (recommended) — for GitHub Actions workflows.
  2. 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.

Obtain AGENT_UUID and AGENT_PASSWORD from your Lineai administrator. These identify a pre-authorized agent that is allowed to submit build metadata.

NameWhereDescription
LINEAI_HOSTGitHub repository variable, Jenkins credential, or CLI --serverLineai server URL without the /lineai/ui/ suffix
AGENT_UUIDGitHub repository secret, Jenkins credential, or CLI --agent-uuidAgent ID from your Lineai administrator
AGENT_PASSWORDGitHub repository secret, Jenkins credential, or CLI --agent-passwordAgent password from your Lineai administrator

For GitHub Actions, configure LINEAI_HOST as a repository variable and AGENT_UUID / AGENT_PASSWORD as repository secrets.

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.

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 Actions

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: 50000
NameTypeDescription
lineai_hostStringThe host address of the Lineai instance without the /lineai/ui/ part.
agent_uuidStringThe UUID of the Agent in Lineai.
agent_passwordStringThe password for the agent.
scan_pathStringAbsolute path to the Git repository root inside the container. Defaults to /github/workspace.
pipeline_systemStringCI/CD system name reported to Lineai. Defaults to GitHub Actions.
job_nameStringJob or workflow name (e.g. ${{ github.workflow }}).
build_numberStringBuild number (e.g. ${{ github.run_number }}).
build_statusStringBuild status (e.g. ${{ job.status }}).
log_fileStringAbsolute path to a build log file inside the container.
log_linesStringTrailing lines to send from the log file (min 5, max 50000). Only used when log_file is set.
timeoutStringNetwork timeout in seconds (min 5, max 300).
dry_runbooleanPrint planned work without executing. Defaults to false.
cleanup_temp_filesbooleanDelete temporary files after completion. Defaults to false.
verbosebooleanEnable extra logging. Defaults to false.
  • Run actions/checkout before this action so .git exists under scan_path.
  • Configure LINEAI_HOST (repository variable), AGENT_UUID, and AGENT_PASSWORD (repository secrets), or pass them via with.
  • scan_path must be an absolute path. For standard GitHub-hosted runners, use /github/workspace.
  • Git repository not found: Ensure checkout ran and scan_path points at the repository root, not a subdirectory without .git.
  • Authentication errors: Verify lineai_host, agent_uuid, and agent_password match credentials provided by your Lineai administrator.
  • Build logs: Write logs under /github/workspace and set log_file to that path. This action cannot add extra Docker volume mounts like a manual docker run -v ...:/log_file_path step.
  • 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.

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:latest

Mount 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.

This pattern is used in Lineai Jenkins pipelines when sending build info after a failed build:

Terminal window
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=60

Requirements:

  • ${WORKSPACE} (or your checkout directory) must contain a .git directory.
  • --server is the Lineai server URL without the /lineai/ui/ suffix.
  • --log-file paths under /log_file_path are combined with the /log_file_path volume mount (see below).
Terminal window
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"

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
Terminal window
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"

Instead of CLI flags, you can pass credentials via environment variables:

Terminal window
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_info

Run the image with help send_build_info or send_build_info --help for the full list of options:

Terminal window
docker run --rm public.ecr.aws/lineai.com/lineai_send-build-info:latest help send_build_info

Common options:

OptionDescription
--server, -sLineai server URL
--agent-uuid, -aAgent UUID
--agent-password, -PAgent password
--path, -pGit repository path (default /scan inside the container)
--log-file, -fBuild log file path
--log-linesTrailing lines to send from the log file
--job-name, -jJob or pipeline name
--build-number, -bBuild number
--build-status, -tBuild status (e.g. SUCCESS, FAILURE)
--pipeline-system, -iCI/CD system name
--timeoutNetwork timeout in seconds
--verbose, -vExtra logging
  • 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.