Open macjustice opened 4 months ago
When using the plugin with "clone_flags": "--depth 1", as shown in the readme, I get the following error:
Checking out repository | 2024-07-09 20:26:02 UTC | 0 | 2024-07-09 20:26:02 UTC | :::: local clone location = '.' | 2024-07-09 20:26:02 UTC | :::: checkout ref = 'alpha' | 2024-07-09 20:26:02 UTC | :::: git remote url = 'redacted' | 2024-07-09 20:26:02 UTC | :::: ssh key path = '' | 2024-07-09 20:26:02 UTC | :::: clone flags = ' --depth 1 ' | 2024-07-09 20:26:02 UTC | Cloning redacted | 2024-07-09 20:26:02 UTC | error: unknown option `depth 1'
This is going to look a little strange since I'm generating the pipeline definition in Python, but my plugin config looks like this:
plugins=[{ 'hasura/smooth-checkout#v4.4.1': { 'build_checkout_path': from_branch_checkout_path, 'repos': [{ 'config': [{ 'url': os.environ.get('BUILDKITE_REPO'), 'ref': from_branch, 'clone_flags': '--depth 1' }] },]
The only thing that looks off to me is the spacing around --depth 1 in the pipeline logs, but that might be a display artifact.
--depth 1
thanks for raising the issue. can you try the following instead?
... 'clone_flags': ['--depth', '1'] ...
When using the plugin with "clone_flags": "--depth 1", as shown in the readme, I get the following error:
This is going to look a little strange since I'm generating the pipeline definition in Python, but my plugin config looks like this:
The only thing that looks off to me is the spacing around
--depth 1
in the pipeline logs, but that might be a display artifact.