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

feat: add remote build caching #19390

Merged
merged 2 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Airbyte CI

env:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}

on:
#ability to start task manually in Web UI
workflow_dispatch:
Expand Down
19 changes: 19 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pluginManagement {
// as much information as possible.
plugins {
id "com.gradle.enterprise" version "3.4.1"
id 'com.github.burrunan.s3-build-cache' version "1.5"
}

gradleEnterprise {
Expand All @@ -30,6 +31,24 @@ gradleEnterprise {
}
}

ext.isCiServer = System.getenv().containsKey("CI")

buildCache {
local {
Copy link
Contributor

Choose a reason for hiding this comment

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

@cpdeethree can we enable this? If we are afraid of this edge case, I think education is a better path here.

// Local build cache is dangerous as it might produce inconsistent results
// in case developer modifies files while the build is running
enabled = false
}
remote(com.github.burrunan.s3cache.AwsS3BuildCache) {
region = 'us-east-2'
bucket = 'airbyte-buildcache'
prefix = 'cache/'
push = isCiServer
// Credentials will be taken from S3_BUILD_CACHE_... environment variables
// anonymous access will be used if environment variables are missing
}
}

rootProject.name = 'airbyte'

// definition for dependency resolution
Expand Down