Coder Social home page Coder Social logo

Comments (7)

sbose78 avatar sbose78 commented on August 18, 2024 1

+1 on making it LocalObjectRef, Gabe.
Thanks for pointing out.

The API does need a lot of love, and I'm going to be investing in having it aligned with basic best practices.

Feel free to point out any absurdities.

from build.

bparees avatar bparees commented on August 18, 2024

Not sure what aspect you're suggesting changing, @gabemontero

if you mean the type, yeah, a LocalObjectRef would make sense.

if you mean the name.... "SecretSource" was a poor name choice that we've regretted ever since. (trying to explain "secrets you are using as source input content" vs "secrets you are using to access the source from git" is always painful), so i'd hate for us to carry that name forward.

from build.

gabemontero avatar gabemontero commented on August 18, 2024

from build.

sbose78 avatar sbose78 commented on August 18, 2024

Please feel free to provide more API feedback, this repo is like a google doc proposal, with working code. Happy to make rapid changes to get to an initial good-looking state of the API.

Updated the API to look like this:

---
apiVersion: build.dev/v1alpha1
kind: Build
metadata:
  name: example-build-buildpack
spec:
  # Git Source definition
  source:
    url: https://github.com/sclorg/nodejs-ex
    credentials:
      name: github-auth-sbose78

  # Strategy defined in the buildpacks-v3 CR 
  # in the 'openshift' namespace. Namespace is optional.
  strategy: 
    name: "buildpacks-v3"
    namespace: "openshift"

  # Build to be run in this image.
  builderImage: "cloudfoundry/cnb:bionic"

  # Generated image.
  output:
    image: "image-registry.openshift-image-registry.svc:5000/sbose/nodejs-ex"
    credentials:
      name: github-auth-sbose78

from build.

bparees avatar bparees commented on August 18, 2024

I would not assume "source" will always mean "git source", so tying those fields together(along with the embedded url+ credentials fields) in that way seems to limit future evolution.

I would expect something more like:

source
  sourceType1
    fieldsForSourceType1
  sourceType2
    fieldsForSourceType2

etc.

which

  1. allows you to add new source types (input types?) in the future
  2. allows each to have its own unique urls/credentials/etc
  3. allows you to have multiple sources/inputs

from build.

sbose78 avatar sbose78 commented on August 18, 2024

๐Ÿ‘ Agreed, that's how I was thinking of bringing in API support for things like "I want to build an image out of this jar"

from build.

qu1queee avatar qu1queee commented on August 18, 2024

This issue original concern have been already addressed. Iยดm closing this for now. Feel free to re-open if needed.

from build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.