-
Notifications
You must be signed in to change notification settings - Fork 131
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
[AndroidManifest] Reveal Manifest Changes in PR #13582
base: trunk
Are you sure you want to change the base?
Changes from all commits
29e5c47
1d65933
e125094
092b40f
6168a04
8cae53e
43a9989
ff780ca
2a17b40
780f4c7
a8c288b
f4eac59
545e874
79c4ff0
a0cce29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
BUILD_VARIANT=$1 | ||
|
||
"$(dirname "${BASH_SOURCE[0]}")/restore-merged-manifest.sh" "WooCommerce" ${BUILD_VARIANT} | ||
|
||
"$(dirname "${BASH_SOURCE[0]}")/restore-merged-manifest.sh" "WooCommerce-Wear" ${BUILD_VARIANT} | ||
|
||
"$(dirname "${BASH_SOURCE[0]}")/restore-cache.sh" | ||
|
||
set -euo pipefail | ||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Ordering and Error Handling of Cache Restoration |
||
|
||
echo "--- :rubygems: Setting up Gems" | ||
install_gems | ||
|
||
echo "--- :closed_lock_with_key: Installing Secrets" | ||
bundle exec fastlane run configure_apply | ||
|
||
echo "--- 📦 Create Merged Manifest (Build Variant: ${BUILD_VARIANT})" | ||
./gradlew process"${BUILD_VARIANT^}"Manifest | ||
echo "" | ||
|
||
echo "--- 💾 Diff Merged Manifest (Module: WooCommerce, Build Variant: ${BUILD_VARIANT})" | ||
comment_with_manifest_diff "WooCommerce" ${BUILD_VARIANT} | ||
|
||
echo "--- 💾 Diff Merged Manifest (Module: WooCommerce-Wear, Build Variant: ${BUILD_VARIANT})" | ||
comment_with_manifest_diff "WooCommerce-Wear" ${BUILD_VARIANT} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -e | ||
|
||
MODULE=$1 | ||
BUILD_VARIANT=$2 | ||
|
||
echo "--- 💾 Restore Merged Manifest (Module: ${MODULE}, Build Variant: ${BUILD_VARIANT})" | ||
restore_android_merged_manifest ${MODULE} ${BUILD_VARIANT} || true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
BUILD_VARIANT=$1 | ||
|
||
"$(dirname "${BASH_SOURCE[0]}")/restore-cache.sh" | ||
|
||
set -euo pipefail | ||
|
||
echo "--- :rubygems: Setting up Gems" | ||
install_gems | ||
|
||
echo "--- :closed_lock_with_key: Installing Secrets" | ||
bundle exec fastlane run configure_apply | ||
|
||
echo "--- 📦 Create Merged Manifest (Build Variant: ${BUILD_VARIANT})" | ||
./gradlew assemble"${BUILD_VARIANT^}" | ||
echo "" | ||
|
||
echo "--- 💾 Save Merged Manifest (Module: WooCommerce, Build Variant: ${BUILD_VARIANT})" | ||
save_android_merged_manifest "WooCommerce" ${BUILD_VARIANT} | ||
|
||
echo "--- 💾 Save Merged Manifest (Module: WooCommerce-Wear, Build Variant: ${BUILD_VARIANT})" | ||
save_android_merged_manifest "WooCommerce-Wear" ${BUILD_VARIANT} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,12 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
# Nodes with values to reuse in the pipeline. | ||
common_params: | ||
# Common plugin settings to use with the `plugins` key. | ||
- &test_collector_common_params | ||
files: "WooCommerce/build/buildkite-test-analytics/*.xml" | ||
format: "junit" | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: Gradle Wrapper Validation | ||
command: validate_gradle_wrapper | ||
agents: | ||
queue: linter | ||
|
||
# Wait for Gradle Wrapper to be validated before running any other jobs | ||
- wait | ||
|
||
######################################## | ||
- group: "🕵️ Linters" | ||
steps: | ||
|
||
- label: "☢️ Danger - PR Check" | ||
command: danger | ||
key: danger | ||
if: "build.pull_request.id != null" | ||
retry: | ||
manual: | ||
permit_on_passed: true | ||
agents: | ||
queue: "linter" | ||
|
||
- label: "detekt" | ||
command: ./gradlew detektAll | ||
plugins: [$CI_TOOLKIT] | ||
artifact_paths: | ||
- "**/build/reports/detekt/detekt.html" | ||
|
||
- label: "lint" | ||
command: .buildkite/commands/lint.sh | ||
plugins: [$CI_TOOLKIT] | ||
artifact_paths: | ||
- "**/build/reports/lint-results*.*" | ||
|
||
- label: "Dependency Tree Diff" | ||
command: comment_with_dependency_diff 'woocommerce' 'vanillaReleaseRuntimeClasspath' | ||
if: build.pull_request.id != null | ||
plugins: [$CI_TOOLKIT] | ||
artifact_paths: | ||
- "**/build/reports/diff/*" | ||
|
||
######################################## | ||
- group: "🛠 Prototype Builds" | ||
steps: | ||
|
||
- label: "🛠 Prototype Build: Mobile App" | ||
command: ".buildkite/commands/prototype-build.sh WooCommerce" | ||
if: build.pull_request.id != null | ||
plugins: [$CI_TOOLKIT] | ||
|
||
- label: "🛠 Prototype Build: Wear App" | ||
command: ".buildkite/commands/prototype-build.sh WooCommerce-Wear" | ||
if: build.pull_request.id != null | ||
plugins: [$CI_TOOLKIT] | ||
|
||
######################################## | ||
- group: "🔬 Tests" | ||
steps: | ||
|
||
- label: "Unit tests" | ||
command: .buildkite/commands/run-unit-tests.sh | ||
plugins: | ||
- $CI_TOOLKIT | ||
- $TEST_COLLECTOR : | ||
<<: *test_collector_common_params | ||
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS" | ||
artifact_paths: | ||
- "**/build/test-results/merged-test-results.xml" | ||
|
||
- label: "Instrumented tests" | ||
command: .buildkite/commands/run-instrumented-tests.sh | ||
plugins: | ||
- $CI_TOOLKIT | ||
- $TEST_COLLECTOR : | ||
<<: *test_collector_common_params | ||
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_INSTRUMENTED_TESTS" | ||
artifact_paths: | ||
- "**/build/instrumented-tests/**/*" | ||
- label: "💾 Restore and Diff Merged Manifest" | ||
command: ".buildkite/commands/diff-merged-manifest.sh jalapenoDebug" | ||
plugins: [$CI_TOOLKIT] | ||
artifact_paths: | ||
- "**/build/reports/diff_manifest/**/**/*" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "💾 Create and Store Merged Manifest" | ||
command: ".buildkite/commands/save-merged-manifest.sh jalapenoDebug" | ||
plugins: [$CI_TOOLKIT] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Position Strict Error Handling Early
The script currently sets the strict error handling (
set -euo pipefail
) on line 11. To ensure that all commands (including the initial restore commands) are executed with strict error handling, consider moving this setting immediately after the shebang, at the top of the script.