Cargo

kind: cargo

Description

The cargo crawler looks recursively for all cargo crates from a specific root directory. Then for each of them, it tries to update dependencies specified in Cargo.toml.

This crawler can be enabled either automatically with default behavior by running updatecli diff --experimental from a directory containing the files to update. Or by providing a manifest.

Manifests

Parameters

The crawler cargo supports the following parameters:

NameRequiredDefaultDescription

rootdir

current dir

Define root directory to look for Cargo.toml files

only

Define a list of rules to only update a subset of Dockerfile files

only.path

Define a list of Cargo.toml file path to only update

ignore

Define a list of rules to ignore update a subset of dockerfile files

ignore.path

Define a list of Cargo.toml file path to only update

registries

Registgries allows to specify a map of cargo registries credentials

registries.<registry>.auth

Cargo registry auth to use for authentication

registries.<registry>.auth.token

Cargo registry token to use for authentication

registries.<registry>.auth.headerformat

Bearer

Cargo registry header format to use for authentication

registries.<registry>.url

Cargo registry URL to use for authentication

registries.<registry>.rootdir

Cargo registry root directory to use as FS index

registries.<registry>.scmid

Cargo registry scmId to use as FS index

Example

# updatecli.d/default.yaml
name: "Cargo compose autodiscovery using git scm"
scms:
  default:
    kind: git
    spec:
      url: https://github.com/updatecli-test/cargo-lab.git
      branch: "main"
  private-registry:
    kind: git
    spec:
      url: "https://github.com/updatecli-test/fake-cargo-registry.git"
      branch: "main"

autodiscovery:
  scmid: default
  crawlers:
    cargo:
      registries:
        fake-private-git:
          scmid: private-registry
        fake-private-http:
          url: "https://updatecli-test.github.io/fake-cargo-registry/api/v1/crates"

Top