Git Product home page Git Product logo

Comments (3)

vrabbi avatar vrabbi commented on June 14, 2024 1

another option is to use apply_cmd_bat as well in the tiltfile
the relevant part could look like:

  apply_cmd="tanzu apps workload apply -f config/workload.yaml --debug --live-update" +
            " --local-path " + LOCAL_PATH +
            " --source-image " + SOURCE_IMAGE +
            " --namespace " + NAMESPACE +
            " --build-env BP_DEBUG_ENABLED=true" +
            " --yes " +
            " > /dev/null " +
            " && kubectl get workload " + NAME + " --namespace " + NAMESPACE + " -o yaml",
  apply_cmd_bat="tanzu apps workload apply -f config/workload.yaml --debug --live-update" +
            " --local-path " + LOCAL_PATH +
            " --source-image " + SOURCE_IMAGE +
            " --namespace " + NAMESPACE +
            " --build-env BP_DEBUG_ENABLED=true" +
            " --yes " +
            " > NUL " +
            " && kubectl get workload " + NAME + " --namespace " + NAMESPACE + " -o yaml",

based on tilt docs:

apply_cmd_bat ( Union [ str , List [ str ]]) – If non-empty and on Windows, takes precedence over apply_cmd . Ignored on other platforms. If a string, executed as a Windows batch command executed with cmd /S /C ; if a list, will be passed to the operating system as program name and args.

This will allow the accelerator Tilt config to work on any OS. while i hardcoded the values, there could be 2 VARS set at the top something like:

OUTPUT_TO_NULL_COMMAND_WIN = ' > NUL '
OUTPUT_TO_NULL_COMMAND = ' > /dev/null '

from application-accelerator-samples.

andrew-woosnam avatar andrew-woosnam commented on June 14, 2024

Update: we should be able to override this env var before invoking tilt up (making it runnable on Windows), but in general I'm guessing NUL might be a friendlier default than /dev/null, assuming a majority of folks using this accelerator will be using Windows?

from application-accelerator-samples.

TimHess avatar TimHess commented on June 14, 2024

@trisberg I think this issue can be closed now that tanzu apps has added -oyaml

from application-accelerator-samples.

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.