Export

Auto-generating function pipelines for different workflow orchestrators

Exports a workflow pipeline that runs kpt functions alongside necessary configurations.

Examples #

# Set up workspace for the test.
TEST_HOME=$(mktemp -d)
cd $TEST_HOME
export SRC_REPO=https://github.com/kptdev/kpt.git
kpt pkg get $SRC_REPO/package-examples/helloworld-set DIR/
# read functions from DIR, run them against it as one step.
# write the generated GitHub Actions pipeline to main.yaml.
kpt fn export DIR/ --output main.yaml --workflow github-actions
# discover functions in FUNCTIONS_DIR and run them against resource in DIR.
# write the generated Cloud Build pipeline to stdout.
kpt fn export DIR/ --fn-path FUNCTIONS_DIR/ --workflow cloud-build

Synopsis #

kpt fn export DIR/ [--fn-path FUNCTIONS_DIR/] --workflow ORCHESTRATOR [--output OUTPUT_FILENAME]

DIR:
  Path to a package directory.
FUNCTIONS_DIR:
  Read functions from the directory instead of the DIR/.
ORCHESTRATOR:
  Supported orchestrators are:
    - github-actions
    - cloud-build
    - gitlab-ci
    - jenkins
    - tekton
    - circleci
OUTPUT_FILENAME:
  Specifies the filename of the generated pipeline. If omitted, the default
  output is stdout

Next Steps #

Last modified June 16, 2025: Move docs to hugo (#4215) (2f0d4026)