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

Shared Flags for Build and BuildRun #17

Merged

Conversation

otaviof
Copy link
Member

@otaviof otaviof commented Jun 7, 2021

Continue the work started on flags package to centralize all flag definitions in a single location, and using those on shp build create, shp build run and shp buildrun create, so they all rely in the same flags.

For instance:

$ shp build create --help

Creates a new Build instance using the informed first argument as its name. For example:

	$ shp build create my-app --source-url="..." --output-image="..."

Usage:
  shp build create <name> [flags]

Flags:
      --builder-credentials-secret string   name of the secret with builder-image pull credentials
      --builder-image string                image employed during the building process
      --dockerfile string                   path to dockerfile relative to repository
  -h, --help                                help for create
      --output-credentials-secret string    name of the secret with builder-image pull credentials
      --output-image string                 image employed during the building process
      --source-context-dir string           use a inner directory as context directory
      --source-credentials-secret string    name of the secret with git repository credentials
      --source-revision string              git repository source revision
      --source-url string                   git repository source URL
      --strategy-apiversion string          kubernetes api-version of the build-strategy resource (default "v1alpha1")
      --strategy-kind string                build-strategy kind (default "ClusterBuildStrategy")
      --strategy-name string                build-strategy name (default "buildpacks-v3")
      --timeout duration                    build process timeout

Additionally, improving doc-comments and getting started with long-descriptions.

otaviof added 2 commits June 7, 2021 10:15
Extending `flags` package to support Build and BuildRun objects, reusing
shared flags among resources. Adding more tests and documentation.
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 7, 2021
@openshift-ci openshift-ci bot requested review from imjasonh and qu1queee June 7, 2021 08:29
@otaviof
Copy link
Member Author

otaviof commented Jun 7, 2021

/retitle Build and BuildRun Create Sub-commands

@openshift-ci openshift-ci bot changed the title [WIP] Build and BuildRun Create Sub-commands Build and BuildRun Create Sub-commands Jun 7, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 7, 2021
@otaviof
Copy link
Member Author

otaviof commented Jun 7, 2021

/cc @alicerum

@openshift-ci openshift-ci bot requested a review from alicerum June 7, 2021 08:33
@otaviof
Copy link
Member Author

otaviof commented Jun 7, 2021

/retitle [WIP] Build and BuildRun Create Sub-commands

I'm going to have a look shp build run as well, make sure it's aligned.

@openshift-ci openshift-ci bot changed the title Build and BuildRun Create Sub-commands [WIP] Build and BuildRun Create Sub-commands Jun 7, 2021
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 7, 2021
@otaviof otaviof force-pushed the b-and-br-create-flags branch from 52a55d5 to a903843 Compare June 7, 2021 10:17
@otaviof
Copy link
Member Author

otaviof commented Jun 7, 2021

/retitle Shared Flags for Build and BuildRun

@openshift-ci openshift-ci bot changed the title [WIP] Build and BuildRun Create Sub-commands Shared Flags for Build and BuildRun Jun 7, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 7, 2021
@otaviof otaviof requested a review from adambkaplan June 7, 2021 13:13
@alicerum
Copy link
Member

alicerum commented Jun 8, 2021

/lgtm

this is awesome, thanks :D

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2021
Copy link
Member

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

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

Mainly grammar nits and doc clean up comments. I really like the refactoring in this PR, this will help make the CLI more maintainable.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2021
Extending `flags` package to support Build and BuildRun objects, reusing
shared flags among resources. Adding more tests and documentation.

Co-authored-by: Adam Kaplan <[email protected]>
@otaviof otaviof force-pushed the b-and-br-create-flags branch from 06831f8 to 5fc9a64 Compare June 8, 2021 14:00
@otaviof otaviof requested a review from adambkaplan June 8, 2021 14:00
Additionally making sure "build run" also uses the same machinery.

Co-authored-by: Adam Kaplan <[email protected]>
@otaviof otaviof force-pushed the b-and-br-create-flags branch from 5fc9a64 to 0548273 Compare June 8, 2021 14:19
@alicerum
Copy link
Member

alicerum commented Jun 8, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2021
@otaviof otaviof requested a review from gabemontero June 9, 2021 05:35
@gabemontero
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gabemontero

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 16, 2021
@openshift-merge-robot openshift-merge-robot merged commit ef8366a into shipwright-io:main Jun 16, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants