github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/site/reference/cli/fn/export/README.md (about) 1 --- 2 title: "Export" 3 linkTitle: "export" 4 type: docs 5 description: > 6 Auto-generating function pipelines for different workflow orchestrators 7 --- 8 9 <!--mdtogo:Short 10 Auto-generating function pipelines for different workflow orchestrators 11 --> 12 13 Exports a workflow pipeline that runs kpt functions alongside necessary 14 configurations. 15 16 ### Examples 17 18 {{% hide %}} 19 20 <!-- @makeWorkplace @verifyExamples--> 21 22 ``` 23 # Set up workspace for the test. 24 TEST_HOME=$(mktemp -d) 25 cd $TEST_HOME 26 ``` 27 28 <!-- @fetchPackage @verifyExamples--> 29 30 ```shell 31 export SRC_REPO=https://github.com/GoogleContainerTools/kpt.git 32 kpt pkg get $SRC_REPO/package-examples/helloworld-set DIR/ 33 ``` 34 35 {{% /hide %}} 36 37 <!--mdtogo:Examples--> 38 39 <!-- @fnExport @verifyExamples--> 40 41 ```shell 42 # read functions from DIR, run them against it as one step. 43 # write the generated GitHub Actions pipeline to main.yaml. 44 kpt fn export DIR/ --output main.yaml --workflow github-actions 45 ``` 46 47 <!-- @fnExport @verifyExamples--> 48 49 ```shell 50 # discover functions in FUNCTIONS_DIR and run them against resource in DIR. 51 # write the generated Cloud Build pipeline to stdout. 52 kpt fn export DIR/ --fn-path FUNCTIONS_DIR/ --workflow cloud-build 53 ``` 54 55 <!--mdtogo--> 56 57 ### Synopsis 58 59 <!--mdtogo:Long--> 60 61 ```shell 62 kpt fn export DIR/ [--fn-path FUNCTIONS_DIR/] --workflow ORCHESTRATOR [--output OUTPUT_FILENAME] 63 64 DIR: 65 Path to a package directory. 66 FUNCTIONS_DIR: 67 Read functions from the directory instead of the DIR/. 68 ORCHESTRATOR: 69 Supported orchestrators are: 70 - github-actions 71 - cloud-build 72 - gitlab-ci 73 - jenkins 74 - tekton 75 - circleci 76 OUTPUT_FILENAME: 77 Specifies the filename of the generated pipeline. If omitted, the default 78 output is stdout 79 ``` 80 81 <!--mdtogo--> 82 83 ## Next Steps 84 85 - Get detailed tutorials on how to use `kpt fn export` from the [Export a 86 Workflow] guide. 87 88 [export a workflow]: https://kpt.dev#todo