-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Builds: support custom Git checkout command #12412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Initial POC to support this feature. It will allow us to support customers with specific needs. We don't plan to expose this directly to users yet, since there are some internals that need to be met to work: - Use specific environment variables - Clone the repository in `.` to keep with the default workflow - Depending on the repository structure, a custom YAML path and custom `python.install.requirements` may be needed as well. All of this can be documented eventually, but we need an internal way to write these custom commands to onboard customers with these needs. Closes #12313
|
There is a lot of tests failing due to doesn't seem related to my code 🤷🏼 |
Ah, yeah, they are failing in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems minor enough. I think we could make this feature fit into the build jobs feature flow better though, but this is okay for an initial test.
| "readthedocs_yaml_path", | ||
| "clone_token", | ||
| "has_ssh_key_with_write_access", | ||
| "git_checkout_command", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can also frame this as build.jobs.checkout override, so this doesn't need to be another feature this is at odds with the build jobs concept. I originally thought we'd implement this as a project database configuration file, so that projects with old tags/etc might even be able to benefit.
We can always migrate to this pattern later though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in the linked issue we talked about adding this field as first option; that's why I went this way.
Note that adding this feature as a build.jobs.checkout is a larger project that involves adding a new config key, validation, etc but also the build director needs to be modified more in deep. I don't think we need that for now since it's only one customer that requested this and we will be managing it by support request.
As you mentioned, we can migrate to the more generic build.jobs concept in the future if we consider it a good feature and more requested by customers.
Initial POC to support this feature. It will allow us to support customers with specific needs. We don't plan to expose this directly to users yet, since there are some internals that need to be met to work:
.to keep with the default workflowpython.install.requirementsmay be needed as well (I added this commit humitos/rocm-libraries@a393812)All of this can be documented eventually, but we need an internal way to write these custom commands to onboard customers with these needs.
The value for
Project.git_checkout_commandis:[ "env", "echo $READTHEDOCS_GIT_CLONE_URL", "git clone --no-checkout --no-tag --filter=blob:none --depth 1 $READTHEDOCS_GIT_CLONE_URL .", "git sparse-checkout init --cone", "git sparse-checkout set projects/rocblas", "git checkout $READTHEDOCS_GIT_IDENTIFIER" ]Closes #12313