Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added documentation for testing pipelines created from library. #40

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,27 @@ import { ParameterBuilder, PipelineBuilder, TaskBuilder, WorkspaceBuilder } from
import { Construct } from 'constructs';
```

## Testing your pipeline locally

Once you have added code to create the pipeline, use the `npx projen build`
command to compile the TypeScript code and run the `cdk8s synth` command to
create the YAML output. The file will be written to the _dist_ folder and named
_chart-id.yml_, where _chart-id_ the string value passed to your class
that extends `Chart`. For example, in this code:

```typescript
const app = new App();
new MyInstallPipeline(app, 'my-install-pipeline');
app.synth();
```

The output file after running `npx projen build` will be _dist/my-install-pipeline.yml_.

Apply this file to a Kubernetes or OpenShift cluster using `oc apply -f dist/my-install-pipeline.yml`,
substituting the name of your output file in the command. If using OpenShift
Container Platform (OCP), you must have the OpenShift Pipelines operator installed.
If using Kubernetes, make sure you have [Tekton installed](https://tekton.dev/docs/installation/).

## Examples

Shown here is an example of using one of the primitive Tekton objects--a
Expand Down
Loading