From fab562f88c094f4b5c4631642a06ff32b9bc27e4 Mon Sep 17 00:00:00 2001 From: Petros Paraskevopoulos Date: Tue, 17 Dec 2024 17:30:54 +0200 Subject: [PATCH] CI: Add a scheduled dependency cache job FYI: This job will be then used by 'buildkite-ci' and configured as a 'buildkite_pipeline_schedule' with a weekly frequency. --- .buildkite/commands/cache-dependencies.sh | 29 +++++++++++++++++++++++ .buildkite/schedules/dependency-cache.yml | 12 ++++++++++ 2 files changed, 41 insertions(+) create mode 100755 .buildkite/commands/cache-dependencies.sh create mode 100644 .buildkite/schedules/dependency-cache.yml diff --git a/.buildkite/commands/cache-dependencies.sh b/.buildkite/commands/cache-dependencies.sh new file mode 100755 index 000000000000..f2ba7cc106a5 --- /dev/null +++ b/.buildkite/commands/cache-dependencies.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -euo pipefail + +echo "--- :rubygems: Setting up Gems" +install_gems + +echo "--- :closed_lock_with_key: Installing Secrets" +bundle exec fastlane run configure_apply + +echo "--- 🛠 Download Mobile App Dependencies [Assemble Jetpack App]" +./gradlew assembleJetpackJalapenoDebug + +echo "--- 🧹 Download Lint Dependencies [Lint Jetpack App]" +./gradlew lintJetpackJalapenoDebug + +echo "--- 🧹 Download Detekt Dependencies [Run Detekt]" +./gradlew detekt + +echo "--- 🧹 Download Checkstyle Dependencies [Run Checkstyle]" +./gradlew checkstyle + +echo "--- 🧪 Download Unit Test Dependencies [Assemble Unit Tests]" +./gradlew assembleJetpackJalapenoDebugUnitTest libs:processors:testClasses libs:image-editor:assembleDebugUnitTest libs:fluxc:assembleDebugUnitTest libs:login:assembleDebugUnitTest + +echo "--- 🧪 Download Android Test Dependencies [Assemble Android Tests]" +./gradlew assembleJetpackJalapenoDebugAndroidTest + +save_gradle_dependency_cache diff --git a/.buildkite/schedules/dependency-cache.yml b/.buildkite/schedules/dependency-cache.yml new file mode 100644 index 000000000000..2798971f6bbd --- /dev/null +++ b/.buildkite/schedules/dependency-cache.yml @@ -0,0 +1,12 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json +--- + +agents: + queue: "android" + +steps: + - label: "dependency cache" + command: | + echo "--- 💾 Caching" + .buildkite/commands/cache-dependencies.sh + plugins: [$CI_TOOLKIT]