Dagger
Search

dagbench-ci

No long description provided.

Installation

dagger install github.com/TomChv/dagbench/.dagger/ci@v0.0.1

Entrypoint

Return Type
Go !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Project source directory
versionString "1.25.1"Go version
moduleCacheCacheVolume -Use a custom module cache
buildCacheCacheVolume -Use a custom build cache
baseContainer -Use a custom base container. The container must have Go installed.
ldflags[String ! ] -Pass arguments to 'go build -ldflags''
values[String ! ] -Add string value definition of the form importpath.name=value Example: "github.com/my/module.Foo=bar"
cgoBoolean -Enable CGO
raceBoolean -Enable race detector. Implies cgo=true
experiment[String ! ] -Enable go experiments https://pkg.go.dev/internal/goexperiment
Example
Function Go.Constructor is not accessible from the dagbench-ci module
Function Go.Constructor is not accessible from the dagbench-ci module
Function Go.Constructor is not accessible from the dagbench-ci module
Function Go.Constructor is not accessible from the dagbench-ci module

Types

Go 🔗

A Go project

version() 🔗

Go version

Return Type
String !
Example
Function Go.version is not accessible from the dagbench-ci module
Function Go.version is not accessible from the dagbench-ci module
Function Go.version is not accessible from the dagbench-ci module
Function Go.version is not accessible from the dagbench-ci module

source() 🔗

Project source directory

Return Type
Directory !
Example
Function Go.source is not accessible from the dagbench-ci module
Function Go.source is not accessible from the dagbench-ci module
Function Go.source is not accessible from the dagbench-ci module
Function Go.source is not accessible from the dagbench-ci module

moduleCache() 🔗

Go module cache

Return Type
CacheVolume !
Example
Function Go.moduleCache is not accessible from the dagbench-ci module
Function Go.moduleCache is not accessible from the dagbench-ci module
Function Go.moduleCache is not accessible from the dagbench-ci module
Function Go.moduleCache is not accessible from the dagbench-ci module

buildCache() 🔗

Go build cache

Return Type
CacheVolume !
Example
Function Go.buildCache is not accessible from the dagbench-ci module
Function Go.buildCache is not accessible from the dagbench-ci module
Function Go.buildCache is not accessible from the dagbench-ci module
Function Go.buildCache is not accessible from the dagbench-ci module

base() 🔗

Base container from which to run all operations

Return Type
Container !
Example
Function Go.base is not accessible from the dagbench-ci module
Function Go.base is not accessible from the dagbench-ci module
Function Go.base is not accessible from the dagbench-ci module
Function Go.base is not accessible from the dagbench-ci module

ldflags() 🔗

Pass arguments to ‘go build -ldflags”

Return Type
[String ! ] !
Example
Function Go.ldflags is not accessible from the dagbench-ci module
Function Go.ldflags is not accessible from the dagbench-ci module
Function Go.ldflags is not accessible from the dagbench-ci module
Function Go.ldflags is not accessible from the dagbench-ci module

values() 🔗

Add string value definition of the form importpath.name=value

Return Type
[String ! ] !
Example
Function Go.values is not accessible from the dagbench-ci module
Function Go.values is not accessible from the dagbench-ci module
Function Go.values is not accessible from the dagbench-ci module
Function Go.values is not accessible from the dagbench-ci module

cgo() 🔗

Enable CGO

Return Type
Boolean !
Example
Function Go.cgo is not accessible from the dagbench-ci module
Function Go.cgo is not accessible from the dagbench-ci module
Function Go.cgo is not accessible from the dagbench-ci module
Function Go.cgo is not accessible from the dagbench-ci module

race() 🔗

Enable race detector

Return Type
Boolean !
Example
Function Go.race is not accessible from the dagbench-ci module
Function Go.race is not accessible from the dagbench-ci module
Function Go.race is not accessible from the dagbench-ci module
Function Go.race is not accessible from the dagbench-ci module

experiment() 🔗

Enable go experiments

Return Type
[String ! ] !
Example
Function Go.experiment is not accessible from the dagbench-ci module
Function Go.experiment is not accessible from the dagbench-ci module
Function Go.experiment is not accessible from the dagbench-ci module
Function Go.experiment is not accessible from the dagbench-ci module

download() 🔗

Download dependencies into the module cache

Return Type
Go !
Example
Function Go.download is not accessible from the dagbench-ci module
Function Go.download is not accessible from the dagbench-ci module
Function Go.download is not accessible from the dagbench-ci module
Function Go.download is not accessible from the dagbench-ci module

env() 🔗

Prepare a build environment for the given Go source code: - Build a base container with Go tooling installed and configured - Apply configuration - Mount the source code

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
platformScalar -No description provided
Example
Function Go.env is not accessible from the dagbench-ci module
Function Go.env is not accessible from the dagbench-ci module
Function Go.env is not accessible from the dagbench-ci module
Function Go.env is not accessible from the dagbench-ci module

tests() 🔗

List tests

Return Type
String !
Arguments
NameTypeDefault ValueDescription
pkgs[String ! ] ["./..."]Packages to list tests from (default all packages)
Example
Function Go.tests is not accessible from the dagbench-ci module
Function Go.tests is not accessible from the dagbench-ci module
Function Go.tests is not accessible from the dagbench-ci module
Function Go.tests is not accessible from the dagbench-ci module

build() 🔗

Build the given main packages, and return the build directory

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
pkgs[String ! ] ["./..."]Which targets to build (default all main packages)
noSymbolsBoolean -Disable symbol table
noDwarfBoolean -Disable DWARF generation
platformScalar -Target build platform
outputString "./bin/"Output directory
Example
Function Go.build is not accessible from the dagbench-ci module
Function Go.build is not accessible from the dagbench-ci module
Function Go.build is not accessible from the dagbench-ci module
Function Go.build is not accessible from the dagbench-ci module

binary() 🔗

Build a single main package, and return the compiled binary

Return Type
File !
Arguments
NameTypeDefault ValueDescription
pkgString !-Which package to build
noSymbolsBoolean -Disable symbol table
noDwarfBoolean -Disable DWARF generation
platformScalar -Target build platform
Example
Function Go.binary is not accessible from the dagbench-ci module
Function Go.binary is not accessible from the dagbench-ci module
Function Go.binary is not accessible from the dagbench-ci module
Function Go.binary is not accessible from the dagbench-ci module

test() 🔗

Run tests for the given packages

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
runString -Only run these tests
skipString -Skip these tests
failfastBoolean -Abort test run on first failure
parallelInteger 0How many tests to run in parallel - defaults to the number of CPUs
timeoutString "30m"How long before timing out the test run
countInteger 1No description provided
pkgs[String ! ] ["./..."]Which packages to test
Example
Function Go.test is not accessible from the dagbench-ci module
Function Go.test is not accessible from the dagbench-ci module
Function Go.test is not accessible from the dagbench-ci module
Function Go.test is not accessible from the dagbench-ci module

listPackages() 🔗

List packages matching the specified criteria

Return Type
[String ! ] !
Arguments
NameTypeDefault ValueDescription
pkgs[String ! ] ["./..."]Filter by name or pattern. Example './foo/...'
onlyMainBoolean -Only list main packages
Example
Function Go.listPackages is not accessible from the dagbench-ci module
Function Go.listPackages is not accessible from the dagbench-ci module
Function Go.listPackages is not accessible from the dagbench-ci module
Function Go.listPackages is not accessible from the dagbench-ci module

lint() 🔗

Lint the project

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
packages[String ! ] -No description provided
Example
Function Go.lint is not accessible from the dagbench-ci module
Function Go.lint is not accessible from the dagbench-ci module
Function Go.lint is not accessible from the dagbench-ci module
Function Go.lint is not accessible from the dagbench-ci module