Skip to content

Sending Build Info

Overview

Send build information from your Git repository and CI pipeline to the CodeLogic 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

Important: Build info submission only works with pre-authorized agents. Obtain agent credentials from your CodeLogic administrator before configuring your pipeline.

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 CodeLogic public ECR.

Both methods use the codelogic_send-build-info image (public.ecr.aws/codelogic.com/codelogic_send-build-info). Scanning agent images (Java, .NET, SQL, JavaScript, and so on) do not support send_build_info.

Prerequisites

Agent credentials

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

Configure credentials

Name Where Description
CODELOGIC_HOST GitHub repository variable, Jenkins credential, or CLI --server CodeLogic server URL without the /codelogic/ui/ suffix
AGENT_UUID GitHub repository secret, Jenkins credential, or CLI --agent-uuid Agent ID from your CodeLogic administrator
AGENT_PASSWORD GitHub repository secret, Jenkins credential, or CLI --agent-password Agent password from your CodeLogic administrator

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

The CodeLogic Send Build Info GitHub Action sends git and build metadata from a workflow to your CodeLogic server. It runs the codelogic_send-build-info image from CodeLogic public ECR (public.ecr.aws/codelogic.com/codelogic_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 - CodeLogic Send Build Info.

Example workflow

name: codelogic-build-info

on:
  push:
    branches: [ "integration" ]
  pull_request:
    branches: [ "integration" ]
  workflow_dispatch:

jobs:
  codelogic-build-info:
    name: Send CodeLogic Build Info
    environment: CodeLogic Scan Env
    runs-on: ubuntu-latest
    steps:
      - name: Check out the repo
        uses: actions/checkout@v4
      - name: Send CodeLogic Build Info
        if: always()
        uses: CodeLogicIncEngineering/codelogic-send-build-info-github-action@master
        with:
          codelogic_host: ${{ vars.CODELOGIC_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

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 CodeLogic Build Info
        if: always()
        uses: CodeLogicIncEngineering/codelogic-send-build-info-github-action@master
        with:
          codelogic_host: ${{ vars.CODELOGIC_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

Action inputs

Name Type Description
codelogic_host String The host address of the CodeLogic instance without the /codelogic/ui/ part.
agent_uuid String The UUID of the Agent in CodeLogic.
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 CodeLogic. 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

  • Run actions/checkout before this action so .git exists under scan_path.
  • Configure CODELOGIC_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.

Troubleshooting

  • Git repository not found: Ensure checkout ran and scan_path points at the repository root, not a subdirectory without .git.
  • Authentication errors: Verify codelogic_host, agent_uuid, and agent_password match credentials provided by your CodeLogic 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 CodeLogic scanning agents.

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 CodeLogic public ECR. Do not use scanning agent images (codelogic_java, codelogic_dotnet, codelogic_sql, codelogic_javascript, and so on) for build info.

Image:

public.ecr.aws/codelogic.com/codelogic_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.

Jenkins example

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

SEND_BUILD_INFO_IMAGE="public.ecr.aws/codelogic.com/codelogic_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.codelogic.com"  \
    --timeout=60

Requirements:

  • ${WORKSPACE} (or your checkout directory) must contain a .git directory.
  • --server is the CodeLogic server URL without the /codelogic/ui/ suffix.
  • --log-file paths under /log_file_path are combined with the /log_file_path volume mount (see below).

Basic example

SEND_BUILD_INFO_IMAGE="public.ecr.aws/codelogic.com/codelogic_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.codelogic.com"

With build log

When using volume mounts with --log-file, paths are combined with the /log_file_path mount as follows:

  • -v /opt/codelogic/sql/logs:/log_file_path --log-file myLogFile.txt/log_file_path/myLogFile.txt
  • -v /opt:/log_file_path --log-file codelogic/sql/logs/myLogFile.txt/log_file_path/codelogic/sql/logs/myLogFile.txt
  • -v /opt/codelogic/sql:/log_file_path --log-file logs/myLogFile.txt/log_file_path/logs/myLogFile.txt
SEND_BUILD_INFO_IMAGE="public.ecr.aws/codelogic.com/codelogic_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.codelogic.com"  \
    --log-file="/log_file_path/build.log"              \
    --build-number="42"                                \
    --build-status="SUCCESS"                           \
    --job-name="my-build"                              \
    --pipeline-system="Jenkins"

Environment variables

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

SEND_BUILD_INFO_IMAGE="public.ecr.aws/codelogic.com/codelogic_send-build-info:latest"

export AGENT_UUID="agentuuid"
export AGENT_PASSWORD="agentpassword"
export CODELOGIC_HOST="https://yourinstance.app.codelogic.com"

docker run --pull always --rm                          \
    --volume "/home/user/myproject:/scan"              \
    -e AGENT_UUID                                      \
    -e AGENT_PASSWORD                                  \
    -e CODELOGIC_HOST                                  \
    "${SEND_BUILD_INFO_IMAGE}" send_build_info

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/codelogic.com/codelogic_send-build-info:latest help send_build_info

Common options:

Option Description
--server, -s CodeLogic 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

  • 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 CodeLogic administrator.
  • Code scanning: This image only supports send_build_info. Use the appropriate scanning agent image or GitHub Action for code scans.