Comments (12)
@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.
Yeah sounds sensible! I'll look at adding it to the default bootstrap.sh
, thanks!
from agent.
The clone and fetches should probably --recurse-submodules
, then the checkout should just work(tm).
from agent.
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.
Nope, you still need to do a git submodule update
or to be safer you can git submodule update --init
.
from agent.
Yep, but if you recurse submodules on the clone and fetch there shouldn't be any network involvement :-)
from agent.
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.
@ahawkins are you doing a git submodule update --init
in your bootstrap.sh file?
from agent.
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.
If you'd like similar behaviour now, just copy those 3 lines into your current bootstrap.sh
Thanks everyone for your help!! 👯
from agent.
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.
Thanks, I've added my comment to #168
from agent.
Related Issues (20)
- Git Mirroring doesn't respect `BUILDKITE_REFSPEC` HOT 1
- Agent Parsing doesn't allow parameterized keys after v3.44.0 HOT 3
- Bug: Windows install script missing default value for $version HOT 1
- Buildkite build script is broken HOT 2
- Use of `FETCH_HEAD` is unreliable in conjunction with multiple refspecs in `BUILDKITE_REFSPEC` HOT 1
- Show how many jobs ahead of job in queue HOT 1
- Control the order of annotations HOT 1
- Buildkite agent for MacOS errors out on extraction HOT 2
- Adding custom attributes to traces at step runtime HOT 2
- buildkite-agent annotate command should redact secrets HOT 1
- Support matrix values in step keys and concurrency groups HOT 1
- `Checkout failed!` retry times appear miscalculated HOT 1
- Print a checksum of the artifact when uploading and downloading it HOT 3
- hooks failed to run because it was already open (on `NixOS`)
- Signed Pipelines fail to verify when using interpolated environment variables HOT 3
- Race condition with socket on startup of kubernetes agent HOT 1
- Newer versions don't respect `BUILDKITE_CANCEL_GRACE_PERIOD` HOT 2
- Downloading multiple artifacts with the same file name corrupts them. HOT 1
- Buildkite Agent PTY randomly failed with fork/exec... operation not permitted
- Provide checksums of or sign releases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agent.