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

[TEP-0079] Implement "install" command for artifact type #757

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

QuanZhang-William
Copy link
Member

@QuanZhang-William QuanZhang-William commented Jan 9, 2023

Part of #692 and based on #752. Prior to this commit, the tkn hub install command is only supported with --type tekton. This commit adds the tkn hub install functionality for --type artifact, which fetches resources from the Artifact Hub and install to user's cluster.

Example:
tkn hub install task golang-build --from tekton-catalog-tasks --version 0.2.0 --type artifact

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run API Unit Tests, Lint Checks, API Design, Golden Files with make api-check
  • Run UI Unit Tests, Lint Checks with make ui-check
  • Commit messages follow commit message best practices

See the contribution guide for more details.

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 9, 2023
@tekton-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 9, 2023
@QuanZhang-William QuanZhang-William marked this pull request as ready for review January 9, 2023 17:05
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 9, 2023
@QuanZhang-William
Copy link
Member Author

/hold until #752 is merged

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 9, 2023
@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 19, 2023
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 19, 2023
@QuanZhang-William
Copy link
Member Author

/cancel hold

@QuanZhang-William
Copy link
Member Author

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 19, 2023
@QuanZhang-William
Copy link
Member Author

Hi @vinamra28 @PuneetPunamiya @sm43. I have rebased and cleaned up the PR. It is now ready for review. PTAL 🙏

Comment on lines +40 to +41
artifactHubTaskType = 7
artifactHubPipelineType = 11
Copy link
Member

Choose a reason for hiding this comment

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

I don't remember why we need this ?

Copy link
Member Author

@QuanZhang-William QuanZhang-William Jan 23, 2023

Choose a reason for hiding this comment

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

Artifact Hub hosts ~10 kinds of resources. Tekton Task and Tekton Pipelines are two of the kinds. So we need to specify the type when doing a search

https://artifacthub.io/docs/api/#/Packages/searchPackages

Copy link
Member

Choose a reason for hiding this comment

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

And this number will remain constant for Task and Pipeline right ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you are right.

Copy link
Member

@PuneetPunamiya PuneetPunamiya left a comment

Choose a reason for hiding this comment

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

Overall the patch looks fine, could you please address the comments

@QuanZhang-William
Copy link
Member Author

Overall the patch looks fine, could you please address the comments

Thanks @PuneetPunamiya and @pratap0007 for the review. I have addressed the comment. Could you please take a look again and help approve?

@pratap0007
Copy link
Contributor

Thank you for addressing the comments.
/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2023
Copy link
Member

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

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

just a minor patch, PR looks good to me

api/pkg/cli/cmd/install/install.go Show resolved Hide resolved
@PuneetPunamiya
Copy link
Member

/approve
@vinamra28 Can you update the comment to get it addressed and then we can get this patch in

Prior to this commit, the tkn hub install command is only supported with --type tekton. This commit adds the tkn hub install functionality for --type artifact, which fetches resources from the Artifact Hub and install to user's cluster.

Example:
tkn hub install task golang-build --from tekton-catalogs-task --version 0.2.0
Copy link
Member

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

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

/lgtm
/meow

@tekton-robot
Copy link

@vinamra28: cat image

In response to this:

/lgtm
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2023
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pratap0007, PuneetPunamiya, vinamra28

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [PuneetPunamiya,pratap0007,vinamra28]

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

@tekton-robot tekton-robot merged commit 22555e2 into tektoncd:main Jan 24, 2023
@QuanZhang-William QuanZhang-William changed the title Implement "install" command for artifact type [TEP-0079] Implement "install" command for artifact type Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants