Skip to content

librarian: redefine the pipeline-state file contract #772

@codyoss

Description

@codyoss

Reference: go/librarian:cli-reimagined

The new name for this file is state.yaml. The schema is the following:

# The name of the image and tag to use.
image: "gcr.io/my-special-project/language-generator:v1.2.5"

# The state of each library which is released within this repository.
libraries:
  - # The library identifier (language-specific format). api_paths configured under a     
    # given id should correspond to a releasable unit in a given language 
    id: "google-cloud-storage-v1"
    # The last version that was released, if any.
    version: "1.15.0"
    # The commit hash (within the API definition repo) at which
    # the repository was last generated.
    last_generated_commit: "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
    # APIs that are bundled as a part of this library.
    apis:
      - # The API path included in this library, relative to the root
        # of the API definition repo, e.g. "google/cloud/functions/v2".
        path: "google/storage/v1"
        # The name of the service config file, relative to the path.
        service_config: "storage.yaml"
    # Directories to which librarian contributes code to. The root of these paths is the
    # lauguage repository.
    source_paths:
      - "src/google/cloud/storage"
      - "test/google/cloud/storage"
    # Directories files in the local repo to leave untouched during copy and remove.
    preserve_regex:
      - "src/google/cloud/storage/generated-dir/HandWrittenFile.java"
    # If configured, these files/dirs will be removed before generated code is copied 
    # over. A more specific `preserve_regex` takes preceidece. If not not set, defaults
    # to the `souce_paths`.
    remove_regex:
      - "src/google/cloud/storage/generated-dir"

As a part of this change we should remove the proto definitions and stubs. Let's add markdown docs describing this schema in the doc folder.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions