Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a tool builder to invoke jsonnet commands.

Arguments passed to this builder will be passed to jsonnet directly.

The latest available version of jsonnet is used.


The following example demonstrates using this builder:

Generate JSON

This cloudbuild.yaml uses the wget builder to download a copy of example.jsonnet taken from the website. It uses this Jsonnet builder to conver it to example.json. For convenience, the resulting example.json file is output to the Cloud Builder logs using busybox more and not persisted outside of the build.

// Jsonnet Example
    person1: {
        name: "Alice",
        welcome: "Hello " + + "!",
    person2: self.person1 { name: "Bob" },


- name:
  args: [
- name:${PROJECT_ID}/jsonnet
  args: [
- name: busybox
  args: ["more","./example.yaml"]

Using the Jsonnet builder

This Jsonnet builder takes a single input file and, if the input is correct, will generate a JSON output. Your `cloudbuild.yaml' needs to provide access to the input files and preserve generated JSON files. Typically, you may do use by trigger the Jsonnet builder from a repository change. Triggers copy the repository contents to Cloud Builders "/workspace" directory from where you may reference them. You may wish to commit generated JSON files back to the repository or elsewhere.

You can’t perform that action at this time.