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

Github action for generating typescript models automatically from crds #384

Merged
merged 4 commits into from
Mar 25, 2021

Conversation

JPinkney
Copy link
Contributor

What does this PR do?

This PR introduces a github action for automatically generating typescript models from crds. It contains two things:

  1. A python script for processing the crds and putting them into a format that kubernetes-client/gen understands
  2. A github action that uses the python script and kubernetes-client/gen to generate a typescript package with typescript models

This approach makes it possible to generate types for any other language that is supported by kubernetes-client/gen. The only difference would be the release process.

@elsony Is it possible for someone from the devfile api team to create an organization on npm and add the npm token to this repo so that this github action can reference it?

What issues does this PR fix or reference?

#353

Is your PR tested? Consider putting some instruction how to test your changes

The github action was tested on my fork: https://github.com/JPinkney/api/actions

Docs PR

@JPinkney
Copy link
Contributor Author

cc @benoitf since you were interested in this as well but I'm unable to add you as a reviewer

@benoitf
Copy link
Contributor

benoitf commented Mar 25, 2021

@sleshchenko so let's try ?

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not review the code in details, but in general LGTM.

I'm going to merge it but feel free to leave comments if any and they will be addressed in further PR

@sleshchenko
Copy link
Member

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JPinkney, sleshchenko

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sleshchenko sleshchenko merged commit e3d20ef into devfile:master Mar 25, 2021
@sleshchenko
Copy link
Member

Merged. First job run failed due unclear reason https://github.com/devfile/api/runs/2191535613?check_suite_focus=true, but the rerun by Florent helped and now types are available https://www.npmjs.com/package/@devfile/api.
Florent just has better luck )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants