Skip to content
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

Add gradle-remote to execute gradle builds on a build server #8760

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wmontwe
Copy link
Member

@wmontwe wmontwe commented Jan 20, 2025

This adds a gradle-remote script that executes Gradle commands on a remote build server. It uses rsync to transfer the project files to the server and then connects via SSH to run the Gradle command remotely. Once the execution is complete, the contents of the build folder are synced back to the local machine.

Please note that this script is quite basic and not recommended for use with public build servers. Since rsync transfers all project files from the developer's machine, including potentially sensitive information like secrets or configuration files, it should be used with care.

@wmontwe wmontwe requested a review from cketti as a code owner January 20, 2025 16:26
gradle-remote Outdated Show resolved Hide resolved
gradle-remote Outdated
@@ -0,0 +1,35 @@
#!/bin/bash

# Please note that this script is quite basic and not recommended for use with public build servers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're adding this file top-level instead of hidden in the build scripts folder, I think we should echo this message and prompt before continuing, optionally with a -y argument or env var to skip the prompt.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a prompt defeats the purpose of a drop-in replacement for Gradle calls.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking more of the first time use case. If you use an environment variable to subvert the prompt, then you can simply set GRADLE_REMOTE_ACCEPT_PITFALLS=y or something like that and you can use it as a drop-in.

gradle-remote Show resolved Hide resolved
Copy link
Member

@kewisch kewisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ with above comments considered

@wmontwe wmontwe force-pushed the add-gradle-remote-execution branch from 41ff535 to b0b8246 Compare January 21, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants