Skip to content

Commit

Permalink
CI: Add a scheduled dependency cache job
Browse files Browse the repository at this point in the history
FYI: This job will be then used by 'buildkite-ci' and configured as a
'buildkite_pipeline_schedule' with a weekly frequency.
  • Loading branch information
ParaskP7 committed Dec 17, 2024
1 parent 1440f35 commit fab562f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .buildkite/commands/cache-dependencies.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions .buildkite/schedules/dependency-cache.yml
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit fab562f

Please sign in to comment.