|
1 | 1 | load("github.com/SonarSource/cirrus-modules@v3", "load_features") |
| 2 | +load( |
| 3 | + "github.com/SonarSource/cirrus-modules/cloud-native/helper.star@analysis/master", |
| 4 | + "merge_dict" |
| 5 | +) |
| 6 | +load( |
| 7 | + "github.com/SonarSource/cirrus-modules/cloud-native/env.star@analysis/master", |
| 8 | + "cirrus_env", |
| 9 | + "gradle_base_env", |
| 10 | + "gradle_develocity_env", |
| 11 | +) |
| 12 | +load( |
| 13 | + "github.com/SonarSource/cirrus-modules/cloud-native/cache.star@analysis/master", |
| 14 | + "gradle_cache", |
| 15 | + "gradle_wrapper_cache", |
| 16 | + "cleanup_gradle_script", |
| 17 | + "cleanup_gradle_wrapper_cache_script", |
| 18 | +) |
| 19 | +load( |
| 20 | + "github.com/SonarSource/cirrus-modules/cloud-native/platform.star@analysis/master", |
| 21 | + "base_image_container_builder" |
| 22 | +) |
2 | 23 |
|
3 | 24 |
|
4 | 25 | def main(ctx): |
5 | | - return load_features(ctx, only_if=dict()) |
| 26 | + conf = {} |
| 27 | + merge_dict(conf, load_features(ctx)) |
| 28 | + merge_dict(conf, build_task()) |
| 29 | + return conf |
| 30 | + |
| 31 | + |
| 32 | +def build_task(): |
| 33 | + return { |
| 34 | + "build_task": { |
| 35 | + "env": gradle_base_env() | gradle_develocity_env() | { |
| 36 | + "CIRRUS_CLONE_DEPTH": 10, |
| 37 | + }, |
| 38 | + "eks_container": base_image_container_builder(cpu=1, memory="4G"), |
| 39 | + "gradle_cache": gradle_cache(), |
| 40 | + "gradle_wrapper_cache": gradle_wrapper_cache(), |
| 41 | + "build_script": [ |
| 42 | + "./gradlew build" |
| 43 | + ], |
| 44 | + "cleanup_script": cleanup_gradle_script(), |
| 45 | + "cleanup_wrapper_script": cleanup_gradle_wrapper_cache_script(), |
| 46 | + } |
| 47 | + } |
0 commit comments