Giter Site home page Giter Site logo

Comments (4)

edannenberg avatar edannenberg commented on May 24, 2024 1

build now supports a repeatable --exclude arg

from kubler.

edannenberg avatar edannenberg commented on May 24, 2024

There is indeed an undocumented EXCLUDE env. This will also allow you to quite easily shoot yourself in the foot by skipping images that are required for building other images, though for your case it should be perfectly fine:

$ EXCLUDE=gentoobb/{cadvisor,foo} ./build.sh build gentoobb

Should do the trick, can't remember having ever used it myself though, let me know if it doesn't work. :p

I will leave this open for the upcoming documentation rewrite.

from kubler.

berney avatar berney commented on May 24, 2024

OK great, I thought there might be a proper way I had missed.

I renamed .cadvisor back to cadvisor and I tried EXCLUDE=gentoobb/{cadvisor,foo} ./build.sh build gentoobb and it still tries to build cadvisor, if I just do EXCLUDE=gentoobb/cadvisor ./build.sh build gentoobb it lists cadvisor but no build is attempted.

I also tried EXCLUDE=(gentoobb/{cadvisor,foo}) ./build.sh build gentoobb so that EXCLUDE is a BASH Array but it also tries to build cadvisor. I think the array is working fine: -

$ EXCLUDE=(gentoobb/{cadvisor,foo})
$ for x in ${EXCLUDE[@]}; do echo $x; done
gentoobb/cadvisor
gentoobb/foo

My BASH foo isn't the greatest so I don't understand how the code you linked to works. Could it have a bug or am I doing something wrong? So far I've only needed to skip one image and I have a work-around if I need to skip many.

OH I just worked it out, its because IFS=', '. EXCLUDE=gentoobb/cadvisor,gentoobb/foo ./build.sh build gentoobb works, skips cadvisor. EXCLUDE=(gentoobb/cadvisor,gentoobb/foo) ./build.sh build gentoobbdoesn't work, it tries to build cadvisor.

I don't think it's a big deal, but maybe the code can be updated so that gentoobb/{foo,bar} style can be used.

from kubler.

edannenberg avatar edannenberg commented on May 24, 2024

Yea, as I said, I haven't use this since it's implementation. 😛 Took a closer look and braces expansion is sadly a bit special and doesn't work with variables. So EXCLUDE would have to be implemented as script param instead of env for this to work. build.sh -n build gentoobb/{foo,baz} does work for example.

from kubler.

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.