-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13303 from woocommerce/ci/enable-dependency-cache…
…-on-ci-final [Dependency Cache] Enable Dependency Cache on CI
- Loading branch information
Showing
9 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "--- 💾 Restore Cache" | ||
restore_gradle_dependency_cache || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash -eu | ||
|
||
.buildkite/commands/restore-cache.sh | ||
|
||
echo "--- :rubygems: Setting up Gems" | ||
install_gems | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/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 | ||
|
||
# .buildkite/commands/prototype-build.sh -> build_and_upload_prototype_build | ||
# -> prototype_flavor = 'Jalapeno' | ||
# -> prototype_build_type = 'Debug' | ||
echo "--- 🛠 Download Mobile App Dependencies [Assemble Mobile App]" | ||
./gradlew :WooCommerce:assembleJalapenoDebug | ||
echo "" | ||
|
||
# .buildkite/commands/prototype-build.sh -> build_and_upload_prototype_build | ||
# -> prototype_flavor = 'Jalapeno' | ||
# -> prototype_build_type = 'Debug' | ||
echo "--- 🛠 Download Wear App Dependencies [Assemble Wear App]" | ||
./gradlew :WooCommerce-Wear:assembleJalapenoDebug | ||
echo "" | ||
|
||
# .buildkite/commands/lint.sh -> ./gradlew :WooCommerce:lintJalapenoDebug | ||
echo "--- 🧹 Download Lint Dependencies [Lint Mobile App]" | ||
./gradlew :WooCommerce:lintJalapenoDebug | ||
echo "" | ||
|
||
# .buildkite/commands/run-unit-tests.sh -> ./gradlew testJalapenoDebugUnitTest testDebugUnitTest | ||
echo "--- 🧪 Download Unit Test Dependencies [Assemble Unit Tests]" | ||
./gradlew assembleJalapenoDebugUnitTest assembleDebugUnitTest | ||
echo "" | ||
|
||
# .buildkite/commands/run-instrumented-tests.sh -> build_and_instrumented_test | ||
# -> gradle(tasks: %w[assembleVanillaDebug assembleVanillaDebugAndroidTest]) | ||
echo "--- 🧪 Download Android Test Dependencies [Assemble Android Tests]" | ||
./gradlew assembleJalapenoDebugAndroidTest | ||
echo "" | ||
|
||
echo "--- 💾 Save Cache" | ||
save_gradle_dependency_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "dependency cache" | ||
command: | | ||
echo "--- 💾 Download and Cache Dependencies" | ||
.buildkite/commands/save-cache.sh | ||
plugins: [$CI_TOOLKIT] | ||
|
||
notify: | ||
- slack: | ||
channels: | ||
- "#android-core-notifs" | ||
message: "The dependency cache has been updated." | ||
if: build.state == "passed" | ||
- slack: | ||
channels: | ||
- "#android-core-notifs" | ||
message: "Failure to update the dependency cache." | ||
if: build.state == "failed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters