Giter Site home page Giter Site logo

Comments (12)

toolmantim avatar toolmantim commented on July 17, 2024 1

@blueimp can you give the bootstrap from #168 a go? I've added a BUILDKITE_DISABLE_GIT_SUBMODULES environment variable for disabling the git submodule checkout commands.

from agent.

keithpitt avatar keithpitt commented on July 17, 2024

Yeah sounds sensible! I'll look at adding it to the default bootstrap.sh, thanks!

from agent.

sj26 avatar sj26 commented on July 17, 2024

The clone and fetches should probably --recurse-submodules, then the checkout should just work(tm).

from agent.

keithpitt avatar keithpitt commented on July 17, 2024

The only thing I'm unsure about is checking out commits with submodules. If I start a repo git clone --recurse-submodules then a git fetch --recurse-submodules, and then git checkout x, will the git checkout change the git submodules to the right commit? I've never used them before.

from agent.

tarragon avatar tarragon commented on July 17, 2024

Nope, you still need to do a git submodule update or to be safer you can git submodule update --init.

from agent.

sj26 avatar sj26 commented on July 17, 2024

Yep, but if you recurse submodules on the clone and fetch there shouldn't be any network involvement :-)

from agent.

ahawkins avatar ahawkins commented on July 17, 2024

Please do the git submodule update --init approach. I found this out the hard way today. If you use --recurse on git clone, that only works on the first build (since the repo hasn't been cloned yet). Branches that introduce submodules will still need git submodule update --init.

from agent.

keithpitt avatar keithpitt commented on July 17, 2024

@ahawkins are you doing a git submodule update --init in your bootstrap.sh file?

from agent.

keithpitt avatar keithpitt commented on July 17, 2024

I've added it to our bootstrap.sh for the upcoming 1.0 release of the agents: https://github.com/buildkite/agent/blob/master/templates/bootstrap.sh#L107

from agent.

keithpitt avatar keithpitt commented on July 17, 2024

If you'd like similar behaviour now, just copy those 3 lines into your current bootstrap.sh

Thanks everyone for your help!! 👯

from agent.

blueimp avatar blueimp commented on July 17, 2024

Sorry to comment on a closed issue, but would it be possible to disable the git submodule calls with a buildkite configuration setting or an environment variable?

This would be useful for minimal agents without perl installed (git submodules require perl).

Tasks on an agent without perl don't break, but they still display error messages like this:

/usr/libexec/git-core/git-submodule: line 1: /usr/bin/perl: not found

Currently I'm disabling git submodule calls with the following command, but that's rather brittle:

sed -i 's/\(git submodule\)/true \1/g' /buildkite/bootstrap.sh

from agent.

blueimp avatar blueimp commented on July 17, 2024

Thanks, I've added my comment to #168

from agent.

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.