-
Notifications
You must be signed in to change notification settings - Fork 136
[Dependency Cache] Enable Dependency Cache on CI #13303
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a877184
CI: Update a8c-ci-toolkit to pr-sha commit (dependency cache)
ParaskP7 684c6e6
CI: Add a scheduled dependency cache job (save cache)
ParaskP7 8e3e0aa
CI: Remove unnecessary echo linting from detekt pipeline job
ParaskP7 fd52a28
CI: Add restore cache and run on targeted pipeline related jobs only
ParaskP7 3547e66
CI: Update a8c-ci-toolkit to 3.9.0
ParaskP7 49d771a
CI: Update a8c-ci-toolkit to pr-sha commit (fix dependency cache)
ParaskP7 6ac4eb4
CI: Update a8c-ci-toolkit to 3.9.1
ParaskP7 cbca6ac
CI: Update save cache to run assemble debug unit test on all lib modules
ParaskP7 4798b63
CI: Move restore cache call to individual .sh script files
ParaskP7 30b5a2d
Merge branch 'trunk' of github.com:woocommerce/woocommerce-android in…
ParaskP7 ead005b
CI: Fix wrongly defined command related double quotes on pipeline jobs
ParaskP7 25a6483
Merge branch 'trunk' of github.com:woocommerce/woocommerce-android in…
ParaskP7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.