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: Allow buildRun to support buildSpec to enable one-shot builds #929

Closed

Conversation

jaideepr97
Copy link

Changes

This is a WIP proof of concept PR to support embedding buildSpec directly into a buildRun which would allow users to create a one-shot build and reduce the process to a single-step process, without having to first create a build object and then reference it from a buildRun object

This involves updating buildRef to be an optional field now, and introducing buildRun.spec.buildSpec
Each buildRun must specify exactly 1 of either buildRun.spec.buildRef or buildRun.spec.buildSpec, and may not provide any overrides if defining a new buildSpec within the buildRun

Fixes #677

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Example one-shot buildRun:


cat <<EOF | kubectl create -f -
apiVersion: shipwright.io/v1alpha1
kind: BuildRun
metadata:
  generateName: buildpack-nodejs-buildrun-
spec:
  buildSpec:
    source:
      url: https://github.com/shipwright-io/sample-nodejs
      contextDir: source-build
    strategy:
      name: buildpacks-v3
      kind: ClusterBuildStrategy
    output:
      image: docker.io/${REGISTRY_ORG}/sample-nodejs:latest
      credentials:
        name: push-secret
EOF

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Label for when a PR has specified a release note labels Nov 1, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 1, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign saschaschwarze0 after the PR has been reviewed.
You can assign the PR to them by writing /assign @saschaschwarze0 in a comment when ready.

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 26, 2021

@jaideepr97: PR needs rebase.

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.

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 26, 2021
@adambkaplan
Copy link
Member

@jaideepr97 this pull request needs to rebase. Are you still working on this?

@jaideepr97
Copy link
Author

Hey @adambkaplan, I haven't been working on this
my understanding was that this was meant to be a POC to help facilitate the conversation around whether this feature should be implemented or not (at least at the time), so I implemented it and marked it as a draft PR
Is this something you're looking to be able to merge?

@adambkaplan
Copy link
Member

/close

@jaideepr97 based on further community discussion, we need additional input from the community (via a SHIP) before proceeding further on this feature. We're therefore closing this pull request.

@openshift-ci openshift-ci bot closed this Feb 23, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 23, 2022

@adambkaplan: Closed this PR.

In response to this:

/close

@jaideepr97 based on further community discussion, we need additional input from the community (via a SHIP) before proceeding further on this feature. We're therefore closing this pull request.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a shipwright developer, I want to ensure BuildRuns can support the Build Spec
3 participants