{"id":43052485,"url":"https://github.com/cloud-native-toolkit/cdk8s-pipelines-lib","last_synced_at":"2026-01-31T10:38:03.768Z","repository":{"id":187331645,"uuid":"676709825","full_name":"cloud-native-toolkit/cdk8s-pipelines-lib","owner":"cloud-native-toolkit","description":"A collection of reusable Pipeline constructs, such as deploying an AWS CDK project","archived":false,"fork":false,"pushed_at":"2024-07-25T13:27:06.000Z","size":836,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-10-11T15:57:44.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud-native-toolkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-09T20:35:22.000Z","updated_at":"2024-05-23T13:40:30.000Z","dependencies_parsed_at":"2024-05-21T20:04:21.435Z","dependency_job_id":null,"html_url":"https://github.com/cloud-native-toolkit/cdk8s-pipelines-lib","commit_stats":null,"previous_names":["cloud-native-toolkit/cdk8s-pipeline-lib"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/cloud-native-toolkit/cdk8s-pipelines-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fcdk8s-pipelines-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fcdk8s-pipelines-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fcdk8s-pipelines-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fcdk8s-pipelines-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-native-toolkit","download_url":"https://codeload.github.com/cloud-native-toolkit/cdk8s-pipelines-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fcdk8s-pipelines-lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28938831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-31T10:38:03.703Z","updated_at":"2026-01-31T10:38:03.758Z","avatar_url":"https://github.com/cloud-native-toolkit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build](https://github.com/cloud-native-toolkit/cdk8s-pipelines-lib/actions/workflows/build.yml/badge.svg)](https://github.com/cloud-native-toolkit/cdk8s-pipelines-lib/actions/workflows/build.yml)\n\n[![View on Construct Hub](https://constructs.dev/badge?package=cdk8s-pipelines-lib)](https://constructs.dev/packages/cdk8s-pipelines-lib)\n\n# Pipeline Library of cdk8s Constructs\n\nThis is a library of several \"pattern\" pipelines that are intended to be\nbasic and therefore easily reusable.\n\nAdditionally, using the `TaskBuilder`, each `Task`\n(see [Tasks](https://tekton.dev/docs/getting-started/tasks/))\nfrom [Tekton Hub](https://hub.tekton.dev/) can be found in this library as a construct.\n\n## Using tasks from Tekton Hub\n\nThe following is an example chart that uses a Tekton Hub Task for\nan [OpenShift client](https://hub.tekton.dev/tekton/task/openshift-client).\n\n```ts\nimport { App, Chart, ChartProps } from 'cdk8s';\nimport { ParameterBuilder, PipelineBuilder } from 'cdk8s-pipelines';\nimport { openshift_client } from 'cdk8s-pipelines-lib';\nimport { Construct } from 'constructs';\n\nexport class MyChart extends Chart {\n  constructor(scope: Construct, id: string, props: ChartProps = {}) {\n    super(scope, id, props);\n\n    const projectName = 'my-project';\n\n    const createProject = openshift_client(this, 'create-project')\n      .withStringParam(new ParameterBuilder('SCRIPT')\n        .withValue(`oc create ${projectName}`));\n\n    new PipelineBuilder(this, 'create-some-namespace')\n      .withDescription('Creates a namespace and then does some other stuff')\n      .withTask(createProject)\n      // ... more tasks go here\n      .buildPipeline({ includeDependencies: true });\n  }\n}\nconst app = new App();\nnew MyChart(app, 'hello');\napp.synth();\n```\n\nThe result of this code will include the dependent tasks. The output will look like this:\n\n```yaml\napiVersion: tekton.dev/v1\nkind: Task\nmetadata:\n  name: openshift-client\nspec:\n  description: null\n  workspaces:\n    - name: manifest-dir\n      description: The workspace which contains kubernetes manifests which we want to apply on the cluster.\n    - name: kubeconfig-dir\n      description: The workspace which contains the the kubeconfig file if in case we want to run the oc command on another cluster.\n  params:\n    - name: SCRIPT\n      description: \"\"\n      default: null\n    - name: VERSION\n      description: The OpenShift Version to use\n      default: \"4.7\"\n  steps:\n    - name: oc\n      image: quay.io/openshift/origin-cli:$(params.VERSION)\n      script: |\n        #!/usr/bin/env bash\n\n        [[ \"$(workspaces.manifest-dir.bound)\" == \"true\" ]] \u0026\u0026 \\\n        cd $(workspaces.manifest-dir.path)\n\n        [[ \"$(workspaces.kubeconfig-dir.bound)\" == \"true\" ]] \u0026\u0026 \\\n        [[ -f $(workspaces.kubeconfig-dir.path)/kubeconfig ]] \u0026\u0026 \\\n        export KUBECONFIG=$(workspaces.kubeconfig-dir.path)/kubeconfig\n\n        $(params.SCRIPT)\n      workingDir: null\n      env: null\n---\napiVersion: tekton.dev/v1\nkind: Pipeline\nmetadata:\n  name: create-some-namespace\nspec:\n  description: Creates a namespace and then does some other stuff\n  params:\n    - name: VERSION\n      type: string\n  workspaces:\n    - name: manifest-dir\n      description: The workspace which contains kubernetes manifests which we want to apply on the cluster.\n    - name: kubeconfig-dir\n      description: The workspace which contains the the kubeconfig file if in case we want to run the oc command on another cluster.\n  tasks:\n    - name: create-project\n      taskRef:\n        name: openshift-client\n      params:\n        - name: SCRIPT\n          value: oc create my-project\n        - name: VERSION\n          value: $(params.VERSION)\n      workspaces:\n        - name: manifest-dir\n          workspace: manifest-dir\n        - name: kubeconfig-dir\n          workspace: kubeconfig-dir\n```\n\n## Using in a build\n\nThe goal of using cdk8s-pipeline and cdk8s-pipeline-lib should be to produce YAML artifacts in a build process that are\nincluded in the release of a project. As an example, see [this example AWS CDK project](https://github.ibm.com/Nathan-Good/example-cdk-aws-ec2-vm),\nwhich demonstrates how to include the output created by the CDK `synth()` in the output of the build as a versioned \nrelease.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-native-toolkit%2Fcdk8s-pipelines-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-native-toolkit%2Fcdk8s-pipelines-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-native-toolkit%2Fcdk8s-pipelines-lib/lists"}