Zips the content of the path
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| path | string | - | |
| outputPath | string | - |
Output Schema
| Property | Type | Description | Required |
|---|---|---|---|
| outputPath | string | - |
Usage Examples
Zip Kubernetes manifests into a distributable archive
This example zips a service’s Kubernetes manifests into a versioned archive placed under dist. Use it to package deployable configuration generated during scaffolding.
steps:
- id: fetch-base
action: fetch:template
input:
url: ./skeleton
- id: zip-manifests
action: roadiehq:utils:zip
input:
path: ./k8s/manifests
outputPath: ./dist/${{ parameters.serviceName }}-manifests-${{ parameters.version }}.zip
- id: log-zip-path
action: debug:log
input:
message: Created archive at ${{ steps.zip-manifests.output.outputPath }}Zip the entire generated source tree for distribution
This example zips the whole workspace after fetching a template and writes the archive to an artifacts directory. Use it when you need a single archive of the generated project.
steps:
- id: fetch-template
action: fetch:template
input:
url: ./templates/service
- id: zip-source
action: roadiehq:utils:zip
input:
path: .
outputPath: ./artifacts/${{ parameters.name }}-starter.zip
- id: log
action: debug:log
input:
message: Source archive ready at ${{ steps.zip-source.output.outputPath }}