-
Notifications
You must be signed in to change notification settings - Fork 48
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
Appetite for abstraction to other build environments #502
Comments
This adds a new pattern for abstracting away the "github action"-specific code within the github actions. The overall intention is to perform this change for all of the `@actions/xxx` libraries in use to enable implementation of these features within other environments (e.g. Jenkins, BuildKite, GitLab). Part of gradle#502.
Following #18, we finish replacing all usages. This was split to enable easier review and acknowledge there's a couple small behaviour changes using `true.toString()` for example. Part of gradle#502.
In order to support more environments, we abstract away `@actions/core`'s logging functionality behind it's own type. This allows replacement with environment-specific versions. Note: This PR does not replace all, there is a follow-up to finish replacing. The intention is to have the new content reviewed vs. the "find and replace" PR following. Part of gradle#502.
Following #TODO, we replace all usages of logging calls with their equivalent abstracted versions. Part of gradle#502.
Following #18, we finish replacing all usages. This was split to enable easier review and acknowledge there's a couple small behaviour changes using `true.toString()` for example. Part of gradle#502.
In order to support more environments, we abstract away `@actions/core`'s logging functionality behind it's own type. This allows replacement with environment-specific versions. Note: This PR does not replace all, there is a follow-up to finish replacing. The intention is to have the new content reviewed vs. the "find and replace" PR following. Part of gradle#502.
Following #TODO, we replace all usages of logging calls with their equivalent abstracted versions. Part of gradle#502.
In order to support more environments, we abstract away `@actions/core`'s logging functionality behind it's own type. This allows replacement with environment-specific versions. Note: This PR does not replace all, there is a follow-up to finish replacing. The intention is to have the new content reviewed vs. the "find and replace" PR following. Part of gradle#502.
Following #TODO, we replace all usages of logging calls with their equivalent abstracted versions. Part of gradle#502.
Following #18, we finish replacing all usages. This was split to enable easier review and acknowledge there's a couple small behaviour changes using `true.toString()` for example. Part of gradle#502.
In order to support more environments, we abstract away `@actions/core`'s logging functionality behind it's own type. This allows replacement with environment-specific versions. Note: This PR does not replace all, there is a follow-up to finish replacing. The intention is to have the new content reviewed vs. the "find and replace" PR following. Part of gradle#502.
Following #TODO, we replace all usages of logging calls with their equivalent abstracted versions. Part of gradle#502.
@Nava2 Thanks for your interest in the project. Indeed it could be useful to be able to apply similar logic to other CI platforms. However, there are features of GitHub Actions that we depend on that mean this isn't so simple. I can see value in abstracting away from the direct use of GitHub APIs for logging and other features, but before commencing this project I think it would be helpful to consider some of the core features that we rely on in GitHub Actions. A primary use case for So as a first step to making the Are you interested in helping push things forward in that direction? |
Is there specific ones of concern? Reimplementing the cache save/restore is definitely more effort but doesn't seem particularly sophisticated in my very ignorant and open minded view 😅
Which features in particular are you referencing? I think with enough elbow grease anything could technically be implemented.
We're exactly aligned. With a proper abstraction layer in place, this seems like a reasonable thing to try and implement. Without a layer, it gets tough.
Absolutely, I've been chipping away at abstracting the environment in a fork for awhile now. It's not too difficult to do easily without impacting the GitHub actions version. |
https://github.com/Nava2/gradle-actions/pull/18/files here is an example of some abstraction |
some properties of the GitHub Actions cache Implementing this won't be a simple matter of adapting to a different API, but will require re-design and re-implementation of some of the features. I'd like to have a plan for implementing caching on a regular key-value store before investing much effort into the simpler process of abstraction away basic APIs. And if we have a plan then we could implement something on top of S3 (or another store): this would be hugely beneficial to current users of |
Ah, apologies that original link wasn't directly linking on mobile. I see where you're coming from. It seems like for each case listed there's some possibilities:
Pardon my ignorance, but this seems like a good thing for consistency purposes 😅
This seems a bit more tricky to implement and a little surprising. Though, could also decide to abstract and avoid this feature.
Seems like some providers have this support: Seems reasonable -- more than I even expected 🤔 All in, I'm aligned that a proper design would be beneficial to ensuring we're iterating with a purpose. |
Docker's build cache supports a variety of these backends, perhaps something there can be used as a reference. |
We use non-Github Actions CI pipelines for our build systems. We'd love to be able to contribute and leverage the existing tooling within the Gradle GitHub actions within other CI tools.
I wonder if there is appetite to refactor components of the GitHub actions to be published as npm packages and abstract the GitHub actions aspects away such that the common code can be reused within other environments.
I'd be willing to take on some of this refactoring as we would be able to reuse caching particularly in our environments!
The text was updated successfully, but these errors were encountered: