dpfdev

command module
v0.0.0-...-608af11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

DPF Development CLI

A command-line tool for DPF development operations.

Installation

make install-dpfdev

Configuration

dpfdev accepts a config file with the form:

{
    "gitlab": {
        "endpoint": "https://gitlab-master.XXXX.com/api/v4", // NVIDIA GitLab endpoint
        "projectID": "XXX", // GitLab project ID for the repo
        "jobHistoryFile": "" // Path to the file containing job history.
    }
}

By default it will expect this config file to be at ~/.config/dfpdev.json. The location of the config file can be set with the --config flag.

Commands

Config Command

The config command guides you through creating or updating the dpfdev configuration file.

dpfdev config

This interactive command will:

  1. Prompt for the configuration file path (defaults to $HOME/.config/dpfdev.json)
  2. Load existing configuration if available
  3. Guide you through setting up GitLab configuration:
    • GitLab API endpoint
    • Project ID
    • Job history file location

You can also specify a custom configuration file path using the global --config flag:

dpfdev config --config /path/to/custom/config.json

For more details, use the help command:

dpfdev config --help
Test Commands

Commands for running tests and validations.

Test Documentation

Test markdown documentation by executing bash or shell commands in code blocks.

dpfdev test docs --file <path-to-markdown>
Custom Code Block Tags

You can tag code blocks with custom identifiers to selectively execute them. This is useful for testing different scenarios (e.g., OCI vs HTTP registries, dev vs production, etc.).

Tagging Code Blocks:

Add space-separated tags after the language identifier (e.g., ```shell oci```). Multiple tags can be specified, and blocks are included if ANY tag matches the filter.

Example Markdown with Tagged Code Blocks
```shell oci
# This block only runs with --tags oci
helm upgrade --install -n dpf-operator-system dpf-operator $REGISTRY/dpf-operator --version=$TAG
```

```shell http
# This block only runs with --tags http
helm repo add --force-update dpf-repository ${REGISTRY}
helm repo update
helm upgrade --install -n dpf-operator-system dpf-operator dpf-repository/dpf-operator --version=$TAG
```

```shell no-exec
# This block is skipped unless you explicitly enable it with --tags no-exec
# Useful for examples that shouldn't run by default
rm -rf /
```

```shell
# This block always runs (no tags = always executes)
echo "Hello World"
```
# Run only blocks tagged with 'oci' (plus all untagged blocks)
dpfdev test docs --file <path-to-markdown> --tags oci

Block Execution Rules:

  1. Untagged blocks (e.g., ```shell```) always execute regardless of filters
  2. Tagged blocks (e.g., ```shell oci```) only execute if at least one tag matches --tags
  3. When --tags is not specified: only untagged blocks execute
  4. Multiple tags in --tags act as OR logic: any match includes the block

You can see more information about the tool with:

dpfdev --help
Output Format

The command will:

  1. Show each command with its line number
  2. Indicate success (✓) or failure (✗) for each command
  3. Show command output if:
    • The command failed
    • Verbose mode is enabled
  4. Show a summary of failed commands at the end

Example output:

L7 > echo "Hello World"
  ✓ Success
L8 > ls -la
  ✓ Success
L12 > invalid-command
  ✗ Failed: error executing command 'invalid-command' (line 12): exit status 127
Output: bash: line 1: invalid-command: command not found

Summary: 1 command(s) failed
Markdown Format

The tool looks for or shell code blocks in the markdown file:

```bash
echo "Hello bash"
ls -la
```

```shell
echo "Hello shell"
ls -la
```

```sh
echo "Hello sh"
ls -la
```

Each line in a bash or shell code block is treated as a separate command to execute.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
gitlab
Package gitlab holds the "dpfdev gitlab" command group: subcommands that talk to the GitLab API (pipeline schedules today, runners and others over time).
Package gitlab holds the "dpfdev gitlab" command group: subcommands that talk to the GitLab API (pipeline schedules today, runners and others over time).
pkg
htmlreport
Package htmlreport generates a static HTML viewer for artifact directories collected by dpfdev collect.
Package htmlreport generates a static HTML viewer for artifact directories collected by dpfdev collect.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL