@invarn/cibuild 2.9.5 → 2.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-35SI42CD.mjs +1 -0
- package/dist/chunk-IC45KVLJ.mjs +1 -0
- package/dist/chunk-XDY4V23V.mjs +1 -0
- package/dist/cli.cjs +14 -14
- package/dist/commands.mjs +1 -0
- package/dist/lib.mjs +3934 -0
- package/package.json +6 -10
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -399
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts +0 -38
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.js +0 -222
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts +0 -41
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.js +0 -324
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts +0 -2
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts.map +0 -1
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.js +0 -382
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts +0 -29
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts.map +0 -1
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.js +0 -160
- package/dist/src/commands/android-gms-guard.test.d.ts +0 -9
- package/dist/src/commands/android-gms-guard.test.d.ts.map +0 -1
- package/dist/src/commands/android-gms-guard.test.js +0 -78
- package/dist/src/commands/android-java-version.test.d.ts +0 -12
- package/dist/src/commands/android-java-version.test.d.ts.map +0 -1
- package/dist/src/commands/android-java-version.test.js +0 -209
- package/dist/src/commands/android-scanner-java.test.d.ts +0 -2
- package/dist/src/commands/android-scanner-java.test.d.ts.map +0 -1
- package/dist/src/commands/android-scanner-java.test.js +0 -130
- package/dist/src/commands/android-scanner.d.ts +0 -250
- package/dist/src/commands/android-scanner.d.ts.map +0 -1
- package/dist/src/commands/android-scanner.js +0 -1639
- package/dist/src/commands/build.d.ts +0 -215
- package/dist/src/commands/build.d.ts.map +0 -1
- package/dist/src/commands/build.js +0 -1433
- package/dist/src/commands/build.test.d.ts +0 -13
- package/dist/src/commands/build.test.d.ts.map +0 -1
- package/dist/src/commands/build.test.js +0 -121
- package/dist/src/commands/detect-platform.d.ts +0 -13
- package/dist/src/commands/detect-platform.d.ts.map +0 -1
- package/dist/src/commands/detect-platform.js +0 -51
- package/dist/src/commands/detect-project.d.ts +0 -7
- package/dist/src/commands/detect-project.d.ts.map +0 -1
- package/dist/src/commands/detect-project.js +0 -12
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts +0 -26
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts.map +0 -1
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.js +0 -196
- package/dist/src/commands/edit.d.ts +0 -12
- package/dist/src/commands/edit.d.ts.map +0 -1
- package/dist/src/commands/edit.js +0 -652
- package/dist/src/commands/edit.test.d.ts +0 -6
- package/dist/src/commands/edit.test.d.ts.map +0 -1
- package/dist/src/commands/edit.test.js +0 -45
- package/dist/src/commands/fidelity-trim.d.ts +0 -13
- package/dist/src/commands/fidelity-trim.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.js +0 -21
- package/dist/src/commands/fidelity-trim.test.d.ts +0 -8
- package/dist/src/commands/fidelity-trim.test.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.test.js +0 -79
- package/dist/src/commands/file-secret-collector.d.ts +0 -50
- package/dist/src/commands/file-secret-collector.d.ts.map +0 -1
- package/dist/src/commands/file-secret-collector.js +0 -217
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts +0 -38
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts.map +0 -1
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.js +0 -300
- package/dist/src/commands/github-workflow.d.ts +0 -5
- package/dist/src/commands/github-workflow.d.ts.map +0 -1
- package/dist/src/commands/github-workflow.js +0 -45
- package/dist/src/commands/index.d.ts +0 -33
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -33
- package/dist/src/commands/init.d.ts +0 -20
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js +0 -264
- package/dist/src/commands/ios-scanner.d.ts +0 -104
- package/dist/src/commands/ios-scanner.d.ts.map +0 -1
- package/dist/src/commands/ios-scanner.js +0 -492
- package/dist/src/commands/ios-scheme-ranking.test.d.ts +0 -2
- package/dist/src/commands/ios-scheme-ranking.test.d.ts.map +0 -1
- package/dist/src/commands/ios-scheme-ranking.test.js +0 -264
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts +0 -30
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/local-properties-reaches-every-workflow.test.js +0 -146
- package/dist/src/commands/reset.d.ts +0 -7
- package/dist/src/commands/reset.d.ts.map +0 -1
- package/dist/src/commands/reset.js +0 -81
- package/dist/src/commands/run.d.ts +0 -22
- package/dist/src/commands/run.d.ts.map +0 -1
- package/dist/src/commands/run.js +0 -141
- package/dist/src/commands/secrets-sync-workflow.d.ts +0 -15
- package/dist/src/commands/secrets-sync-workflow.d.ts.map +0 -1
- package/dist/src/commands/secrets-sync-workflow.js +0 -255
- package/dist/src/commands/secrets-upload.d.ts +0 -21
- package/dist/src/commands/secrets-upload.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.js +0 -177
- package/dist/src/commands/secrets-upload.test.d.ts +0 -5
- package/dist/src/commands/secrets-upload.test.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.test.js +0 -60
- package/dist/src/commands/validate.d.ts +0 -10
- package/dist/src/commands/validate.d.ts.map +0 -1
- package/dist/src/commands/validate.js +0 -46
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -47
- package/dist/src/envman/cli.d.ts +0 -21
- package/dist/src/envman/cli.d.ts.map +0 -1
- package/dist/src/envman/cli.js +0 -240
- package/dist/src/envman/envman.d.ts +0 -83
- package/dist/src/envman/envman.d.ts.map +0 -1
- package/dist/src/envman/envman.js +0 -361
- package/dist/src/envman/envman.test.d.ts +0 -5
- package/dist/src/envman/envman.test.d.ts.map +0 -1
- package/dist/src/envman/envman.test.js +0 -236
- package/dist/src/envman/envstore-round-trip.test.d.ts +0 -27
- package/dist/src/envman/envstore-round-trip.test.d.ts.map +0 -1
- package/dist/src/envman/envstore-round-trip.test.js +0 -130
- package/dist/src/envman/index.d.ts +0 -23
- package/dist/src/envman/index.d.ts.map +0 -1
- package/dist/src/envman/index.js +0 -23
- package/dist/src/envman/shim.d.ts +0 -16
- package/dist/src/envman/shim.d.ts.map +0 -1
- package/dist/src/envman/shim.js +0 -66
- package/dist/src/envman/types.d.ts +0 -55
- package/dist/src/envman/types.d.ts.map +0 -1
- package/dist/src/envman/types.js +0 -12
- package/dist/src/lib.d.ts +0 -33
- package/dist/src/lib.d.ts.map +0 -1
- package/dist/src/lib.js +0 -37
- package/dist/src/pipeline.d.ts +0 -3
- package/dist/src/pipeline.d.ts.map +0 -1
- package/dist/src/pipeline.js +0 -57
- package/dist/src/runner-node-step.test.d.ts +0 -12
- package/dist/src/runner-node-step.test.d.ts.map +0 -1
- package/dist/src/runner-node-step.test.js +0 -61
- package/dist/src/runner.d.ts +0 -31
- package/dist/src/runner.d.ts.map +0 -1
- package/dist/src/runner.js +0 -240
- package/dist/src/shared/detect-project.d.ts +0 -57
- package/dist/src/shared/detect-project.d.ts.map +0 -1
- package/dist/src/shared/detect-project.js +0 -219
- package/dist/src/shared/detect-project.test.d.ts +0 -2
- package/dist/src/shared/detect-project.test.d.ts.map +0 -1
- package/dist/src/shared/detect-project.test.js +0 -161
- package/dist/src/shared/git.d.ts +0 -25
- package/dist/src/shared/git.d.ts.map +0 -1
- package/dist/src/shared/git.js +0 -53
- package/dist/src/shared/git.test.d.ts +0 -9
- package/dist/src/shared/git.test.d.ts.map +0 -1
- package/dist/src/shared/git.test.js +0 -66
- package/dist/src/shared/gitignore.d.ts +0 -6
- package/dist/src/shared/gitignore.d.ts.map +0 -1
- package/dist/src/shared/gitignore.js +0 -26
- package/dist/src/shared/gradle-settings.d.ts +0 -49
- package/dist/src/shared/gradle-settings.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.js +0 -138
- package/dist/src/shared/gradle-settings.test.d.ts +0 -2
- package/dist/src/shared/gradle-settings.test.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.test.js +0 -65
- package/dist/src/shared/prompts.d.ts +0 -30
- package/dist/src/shared/prompts.d.ts.map +0 -1
- package/dist/src/shared/prompts.js +0 -121
- package/dist/src/shared/xcode-container.test.d.ts +0 -2
- package/dist/src/shared/xcode-container.test.d.ts.map +0 -1
- package/dist/src/shared/xcode-container.test.js +0 -123
- package/dist/src/step-marker.d.ts +0 -12
- package/dist/src/step-marker.d.ts.map +0 -1
- package/dist/src/step-marker.js +0 -29
- package/dist/src/step-marker.test.d.ts +0 -11
- package/dist/src/step-marker.test.d.ts.map +0 -1
- package/dist/src/step-marker.test.js +0 -45
- package/dist/src/types.d.ts +0 -58
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts +0 -28
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts.map +0 -1
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.js +0 -223
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts +0 -20
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.js +0 -201
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts +0 -37
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.js +0 -255
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts +0 -32
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts.map +0 -1
- package/dist/src/yaml/a-missing-credential-is-loud.test.js +0 -301
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts +0 -18
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts.map +0 -1
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.js +0 -66
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts +0 -34
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.js +0 -218
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts +0 -27
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.js +0 -126
- package/dist/src/yaml/bitrise-compat.d.ts +0 -65
- package/dist/src/yaml/bitrise-compat.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.js +0 -206
- package/dist/src/yaml/bitrise-compat.test.d.ts +0 -5
- package/dist/src/yaml/bitrise-compat.test.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.test.js +0 -347
- package/dist/src/yaml/cache-key-missing-file.test.d.ts +0 -12
- package/dist/src/yaml/cache-key-missing-file.test.d.ts.map +0 -1
- package/dist/src/yaml/cache-key-missing-file.test.js +0 -116
- package/dist/src/yaml/converter.d.ts +0 -103
- package/dist/src/yaml/converter.d.ts.map +0 -1
- package/dist/src/yaml/converter.js +0 -420
- package/dist/src/yaml/converter.test.d.ts +0 -5
- package/dist/src/yaml/converter.test.d.ts.map +0 -1
- package/dist/src/yaml/converter.test.js +0 -548
- package/dist/src/yaml/e2e.test.d.ts +0 -6
- package/dist/src/yaml/e2e.test.d.ts.map +0 -1
- package/dist/src/yaml/e2e.test.js +0 -446
- package/dist/src/yaml/env-resolver.d.ts +0 -218
- package/dist/src/yaml/env-resolver.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.js +0 -591
- package/dist/src/yaml/env-resolver.test.d.ts +0 -5
- package/dist/src/yaml/env-resolver.test.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.test.js +0 -502
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts +0 -16
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts.map +0 -1
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.js +0 -126
- package/dist/src/yaml/fidelity-input-digest.d.ts +0 -37
- package/dist/src/yaml/fidelity-input-digest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.js +0 -208
- package/dist/src/yaml/fidelity-input-digest.test.d.ts +0 -2
- package/dist/src/yaml/fidelity-input-digest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.test.js +0 -167
- package/dist/src/yaml/fidelity-manifest.d.ts +0 -126
- package/dist/src/yaml/fidelity-manifest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.js +0 -134
- package/dist/src/yaml/fidelity-manifest.test.d.ts +0 -12
- package/dist/src/yaml/fidelity-manifest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.test.js +0 -251
- package/dist/src/yaml/interactive-prompts.d.ts +0 -71
- package/dist/src/yaml/interactive-prompts.d.ts.map +0 -1
- package/dist/src/yaml/interactive-prompts.js +0 -260
- package/dist/src/yaml/meta-helpers.d.ts +0 -28
- package/dist/src/yaml/meta-helpers.d.ts.map +0 -1
- package/dist/src/yaml/meta-helpers.js +0 -46
- package/dist/src/yaml/missing-env-handler.d.ts +0 -45
- package/dist/src/yaml/missing-env-handler.d.ts.map +0 -1
- package/dist/src/yaml/missing-env-handler.js +0 -64
- package/dist/src/yaml/parser.d.ts +0 -33
- package/dist/src/yaml/parser.d.ts.map +0 -1
- package/dist/src/yaml/parser.js +0 -148
- package/dist/src/yaml/parser.test.d.ts +0 -5
- package/dist/src/yaml/parser.test.d.ts.map +0 -1
- package/dist/src/yaml/parser.test.js +0 -83
- package/dist/src/yaml/pipeline-with-secrets.d.ts +0 -25
- package/dist/src/yaml/pipeline-with-secrets.d.ts.map +0 -1
- package/dist/src/yaml/pipeline-with-secrets.js +0 -76
- package/dist/src/yaml/platform-detector.d.ts +0 -83
- package/dist/src/yaml/platform-detector.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.js +0 -189
- package/dist/src/yaml/platform-detector.test.d.ts +0 -5
- package/dist/src/yaml/platform-detector.test.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.test.js +0 -525
- package/dist/src/yaml/preflight-validation.d.ts +0 -29
- package/dist/src/yaml/preflight-validation.d.ts.map +0 -1
- package/dist/src/yaml/preflight-validation.js +0 -21
- package/dist/src/yaml/secrets-manager.d.ts +0 -87
- package/dist/src/yaml/secrets-manager.d.ts.map +0 -1
- package/dist/src/yaml/secrets-manager.js +0 -230
- package/dist/src/yaml/shell-assignments.d.ts +0 -40
- package/dist/src/yaml/shell-assignments.d.ts.map +0 -1
- package/dist/src/yaml/shell-assignments.js +0 -77
- package/dist/src/yaml/step-validator-check-failure.test.d.ts +0 -24
- package/dist/src/yaml/step-validator-check-failure.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-check-failure.test.js +0 -130
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts +0 -23
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-self-assigned.test.js +0 -191
- package/dist/src/yaml/step-validator.d.ts +0 -67
- package/dist/src/yaml/step-validator.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.js +0 -466
- package/dist/src/yaml/step-validator.test.d.ts +0 -18
- package/dist/src/yaml/step-validator.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.test.js +0 -140
- package/dist/src/yaml/steps/android-sign.d.ts +0 -35
- package/dist/src/yaml/steps/android-sign.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-sign.js +0 -147
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts +0 -2
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-variant-resolution.test.js +0 -260
- package/dist/src/yaml/steps/android-version.d.ts +0 -26
- package/dist/src/yaml/steps/android-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.js +0 -128
- package/dist/src/yaml/steps/android-version.test.d.ts +0 -5
- package/dist/src/yaml/steps/android-version.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.test.js +0 -196
- package/dist/src/yaml/steps/android.d.ts +0 -156
- package/dist/src/yaml/steps/android.d.ts.map +0 -1
- package/dist/src/yaml/steps/android.js +0 -1092
- package/dist/src/yaml/steps/app-store-deploy.d.ts +0 -48
- package/dist/src/yaml/steps/app-store-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/app-store-deploy.js +0 -167
- package/dist/src/yaml/steps/base.d.ts +0 -263
- package/dist/src/yaml/steps/base.d.ts.map +0 -1
- package/dist/src/yaml/steps/base.js +0 -380
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts +0 -26
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.js +0 -200
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.test.js +0 -280
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts +0 -22
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.js +0 -144
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.test.js +0 -331
- package/dist/src/yaml/steps/bitrise-slack.d.ts +0 -49
- package/dist/src/yaml/steps/bitrise-slack.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.js +0 -280
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.test.js +0 -484
- package/dist/src/yaml/steps/bitrise-ssh.d.ts +0 -27
- package/dist/src/yaml/steps/bitrise-ssh.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.js +0 -134
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.test.js +0 -205
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-daemon.test.js +0 -212
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts +0 -42
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.js +0 -209
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-push-daemon.test.js +0 -171
- package/dist/src/yaml/steps/cache.d.ts +0 -59
- package/dist/src/yaml/steps/cache.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache.js +0 -1027
- package/dist/src/yaml/steps/capture-injection.d.ts +0 -30
- package/dist/src/yaml/steps/capture-injection.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.js +0 -88
- package/dist/src/yaml/steps/capture-injection.test.d.ts +0 -2
- package/dist/src/yaml/steps/capture-injection.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.test.js +0 -163
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts +0 -42
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.js +0 -140
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts +0 -11
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.js +0 -176
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts +0 -22
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.js +0 -97
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.js +0 -282
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.js +0 -132
- package/dist/src/yaml/steps/envstore-loader.test.d.ts +0 -15
- package/dist/src/yaml/steps/envstore-loader.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/envstore-loader.test.js +0 -143
- package/dist/src/yaml/steps/fastlane.d.ts +0 -27
- package/dist/src/yaml/steps/fastlane.d.ts.map +0 -1
- package/dist/src/yaml/steps/fastlane.js +0 -79
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts +0 -53
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.js +0 -72
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts +0 -11
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.js +0 -50
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts +0 -87
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.js +0 -111
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts +0 -22
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.js +0 -118
- package/dist/src/yaml/steps/file.d.ts +0 -52
- package/dist/src/yaml/steps/file.d.ts.map +0 -1
- package/dist/src/yaml/steps/file.js +0 -108
- package/dist/src/yaml/steps/flutter.d.ts +0 -63
- package/dist/src/yaml/steps/flutter.d.ts.map +0 -1
- package/dist/src/yaml/steps/flutter.js +0 -215
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts +0 -16
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.js +0 -127
- package/dist/src/yaml/steps/git-clone.d.ts +0 -32
- package/dist/src/yaml/steps/git-clone.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone.js +0 -171
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts +0 -10
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.js +0 -162
- package/dist/src/yaml/steps/git-fetch-retry.d.ts +0 -62
- package/dist/src/yaml/steps/git-fetch-retry.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.js +0 -155
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts +0 -5
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.test.js +0 -86
- package/dist/src/yaml/steps/google-play-deploy.d.ts +0 -37
- package/dist/src/yaml/steps/google-play-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.js +0 -193
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts +0 -5
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.test.js +0 -310
- package/dist/src/yaml/steps/gradle-memory.d.ts +0 -61
- package/dist/src/yaml/steps/gradle-memory.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.js +0 -386
- package/dist/src/yaml/steps/gradle-memory.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-memory.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.test.js +0 -344
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts +0 -28
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.js +0 -107
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.js +0 -183
- package/dist/src/yaml/steps/index.d.ts +0 -10
- package/dist/src/yaml/steps/index.d.ts.map +0 -1
- package/dist/src/yaml/steps/index.js +0 -1461
- package/dist/src/yaml/steps/ios-deps.d.ts +0 -78
- package/dist/src/yaml/steps/ios-deps.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.js +0 -279
- package/dist/src/yaml/steps/ios-deps.test.d.ts +0 -5
- package/dist/src/yaml/steps/ios-deps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.test.js +0 -90
- package/dist/src/yaml/steps/ios-signing.d.ts +0 -31
- package/dist/src/yaml/steps/ios-signing.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-signing.js +0 -144
- package/dist/src/yaml/steps/ios-version.d.ts +0 -47
- package/dist/src/yaml/steps/ios-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-version.js +0 -151
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts +0 -10
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/java-home-version-spec.test.js +0 -58
- package/dist/src/yaml/steps/linting.d.ts +0 -47
- package/dist/src/yaml/steps/linting.d.ts.map +0 -1
- package/dist/src/yaml/steps/linting.js +0 -148
- package/dist/src/yaml/steps/phase2.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase2.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase2.test.js +0 -197
- package/dist/src/yaml/steps/phase3.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase3.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase3.test.js +0 -144
- package/dist/src/yaml/steps/phase4.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase4.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase4.test.js +0 -166
- package/dist/src/yaml/steps/phase5.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase5.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase5.test.js +0 -263
- package/dist/src/yaml/steps/registry.d.ts +0 -88
- package/dist/src/yaml/steps/registry.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.js +0 -125
- package/dist/src/yaml/steps/registry.test.d.ts +0 -5
- package/dist/src/yaml/steps/registry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.test.js +0 -235
- package/dist/src/yaml/steps/release.d.ts +0 -50
- package/dist/src/yaml/steps/release.d.ts.map +0 -1
- package/dist/src/yaml/steps/release.js +0 -154
- package/dist/src/yaml/steps/render-post-processor.d.ts +0 -100
- package/dist/src/yaml/steps/render-post-processor.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.js +0 -270
- package/dist/src/yaml/steps/render-post-processor.test.d.ts +0 -13
- package/dist/src/yaml/steps/render-post-processor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.test.js +0 -220
- package/dist/src/yaml/steps/script.d.ts +0 -23
- package/dist/src/yaml/steps/script.d.ts.map +0 -1
- package/dist/src/yaml/steps/script.js +0 -63
- package/dist/src/yaml/steps/spec-validation.test.d.ts +0 -6
- package/dist/src/yaml/steps/spec-validation.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/spec-validation.test.js +0 -130
- package/dist/src/yaml/steps/steps.test.d.ts +0 -6
- package/dist/src/yaml/steps/steps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/steps.test.js +0 -881
- package/dist/src/yaml/steps/structural-facts.d.ts +0 -992
- package/dist/src/yaml/steps/structural-facts.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.js +0 -3276
- package/dist/src/yaml/steps/structural-facts.test.d.ts +0 -12
- package/dist/src/yaml/steps/structural-facts.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.test.js +0 -3039
- package/dist/src/yaml/steps/test-config.d.ts +0 -5
- package/dist/src/yaml/steps/test-config.d.ts.map +0 -1
- package/dist/src/yaml/steps/test-config.js +0 -25
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts +0 -28
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align-corpus.test.js +0 -383
- package/dist/src/yaml/steps/trim-align.d.ts +0 -87
- package/dist/src/yaml/steps/trim-align.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.js +0 -367
- package/dist/src/yaml/steps/trim-align.test.d.ts +0 -11
- package/dist/src/yaml/steps/trim-align.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.test.js +0 -261
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts +0 -66
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.js +0 -251
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts +0 -13
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.js +0 -302
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts +0 -134
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.js +0 -173
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts +0 -11
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.test.js +0 -210
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts +0 -155
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.js +0 -1389
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts +0 -2
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.js +0 -1106
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts +0 -230
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.js +0 -1597
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts +0 -18
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.test.js +0 -1871
- package/dist/src/yaml/steps/xcode-app-product.d.ts +0 -90
- package/dist/src/yaml/steps/xcode-app-product.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.js +0 -247
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts +0 -2
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.test.js +0 -202
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts +0 -30
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-derived-data.test.js +0 -279
- package/dist/src/yaml/steps/xcode-destination.d.ts +0 -47
- package/dist/src/yaml/steps/xcode-destination.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.js +0 -202
- package/dist/src/yaml/steps/xcode-destination.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-destination.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.test.js +0 -227
- package/dist/src/yaml/steps/xcode-new.test.d.ts +0 -5
- package/dist/src/yaml/steps/xcode-new.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-new.test.js +0 -211
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-resolve-retry.test.js +0 -146
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts +0 -53
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.js +0 -98
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts +0 -21
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.test.js +0 -155
- package/dist/src/yaml/steps/xcode.d.ts +0 -230
- package/dist/src/yaml/steps/xcode.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode.js +0 -1350
- package/dist/src/yaml/types.d.ts +0 -76
- package/dist/src/yaml/types.d.ts.map +0 -1
- package/dist/src/yaml/types.js +0 -5
- package/dist/src/yaml/validation-types.d.ts +0 -102
- package/dist/src/yaml/validation-types.d.ts.map +0 -1
- package/dist/src/yaml/validation-types.js +0 -8
- package/dist/src/yaml/yaml-updater.d.ts +0 -24
- package/dist/src/yaml/yaml-updater.d.ts.map +0 -1
- package/dist/src/yaml/yaml-updater.js +0 -128
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Play deploy step implementation
|
|
3
|
-
* Uploads APK/AAB to Google Play using fastlane supply
|
|
4
|
-
*/
|
|
5
|
-
import { BaseStepExecutor } from './base.js';
|
|
6
|
-
/**
|
|
7
|
-
* Google Play deploy step executor
|
|
8
|
-
* Maps google-play-deploy to fastlane supply
|
|
9
|
-
*/
|
|
10
|
-
export class GooglePlayDeployStepExecutor extends BaseStepExecutor {
|
|
11
|
-
isSkippedInLocalMode() {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
getValidationRequirements(inputs, env, _config) {
|
|
15
|
-
const requirements = [];
|
|
16
|
-
// service_account_json_key_path only required when JSON content is not available via secret
|
|
17
|
-
const jsonVarName = inputs.service_account_json_var || 'GOOGLE_PLAY_SERVICE_ACCOUNT_JSON';
|
|
18
|
-
if (!env[jsonVarName]) {
|
|
19
|
-
requirements.push(this.requireInput('service_account_json_key_path', inputs, 'Path to service account JSON key file'));
|
|
20
|
-
}
|
|
21
|
-
requirements.push(this.requireInput('package_name', inputs, 'Android app package name'));
|
|
22
|
-
requirements.push(this.requireCommand('fastlane', 'Fastlane for Google Play deployment', 'Install with: gem install fastlane'));
|
|
23
|
-
return requirements;
|
|
24
|
-
}
|
|
25
|
-
async execute(inputs, env, config) {
|
|
26
|
-
const stepName = 'google-play-deploy';
|
|
27
|
-
const commands = [];
|
|
28
|
-
// In local mode, skip entirely — no Google Play credentials available
|
|
29
|
-
if (config.local) {
|
|
30
|
-
commands.push('echo "⏭️ google-play-deploy: skipped in local mode"');
|
|
31
|
-
commands.push('echo " Google Play upload requires CI credentials."');
|
|
32
|
-
const script = this.createBashScriptFromCommands(commands, stepName);
|
|
33
|
-
return this.createScriptStep(script, stepName);
|
|
34
|
-
}
|
|
35
|
-
const packageName = this.getInput(inputs, 'package_name', '');
|
|
36
|
-
const artifactType = this.getInput(inputs, 'artifact_type', 'apk');
|
|
37
|
-
const isAab = artifactType === 'aab';
|
|
38
|
-
const defaultAppPath = isAab
|
|
39
|
-
? '$CIBUILD_AAB_PATH\n$CIBUILD_APK_PATH'
|
|
40
|
-
: '$CIBUILD_APK_PATH\n$CIBUILD_AAB_PATH';
|
|
41
|
-
const appPath = this.getInput(inputs, 'app_path', defaultAppPath);
|
|
42
|
-
const track = this.getInput(inputs, 'track', 'alpha');
|
|
43
|
-
const userFraction = this.getInput(inputs, 'user_fraction', '');
|
|
44
|
-
const status = this.getInput(inputs, 'status', '');
|
|
45
|
-
const whatsnewsDir = this.getInput(inputs, 'whatsnews_dir', '');
|
|
46
|
-
const mappingFile = this.getInput(inputs, 'mapping_file', '$CIBUILD_MAPPING_PATH');
|
|
47
|
-
const dryRun = this.getInput(inputs, 'dry_run', 'false');
|
|
48
|
-
const verboseLog = this.getInput(inputs, 'verbose_log', 'false');
|
|
49
|
-
commands.push('# google-play-deploy step → fastlane supply');
|
|
50
|
-
commands.push('echo "🚀 Deploying to Google Play..."');
|
|
51
|
-
commands.push('');
|
|
52
|
-
// Service account JSON: prefer content from secret, fall back to file path
|
|
53
|
-
const jsonVarName = this.getInput(inputs, 'service_account_json_var', 'GOOGLE_PLAY_SERVICE_ACCOUNT_JSON');
|
|
54
|
-
const jsonContent = env[jsonVarName] || '';
|
|
55
|
-
if (jsonContent) {
|
|
56
|
-
const encoded = Buffer.from(jsonContent).toString('base64');
|
|
57
|
-
commands.push('# Write service account JSON from GOOGLE_PLAY_SERVICE_ACCOUNT_JSON secret');
|
|
58
|
-
commands.push('_SA_TEMP_FILE=""');
|
|
59
|
-
commands.push('_cleanup_sa() { [ -n "$_SA_TEMP_FILE" ] && rm -f "$_SA_TEMP_FILE" 2>/dev/null || true; }');
|
|
60
|
-
commands.push('trap _cleanup_sa EXIT');
|
|
61
|
-
commands.push('_SA_TEMP_FILE="$(mktemp /tmp/google-play-sa-XXXXXX.json)"');
|
|
62
|
-
commands.push(`printf '%s' '${encoded}' | base64 -d > "$_SA_TEMP_FILE"`);
|
|
63
|
-
commands.push('SERVICE_ACCOUNT_KEY="$_SA_TEMP_FILE"');
|
|
64
|
-
commands.push('echo "Service account JSON written to temp file"');
|
|
65
|
-
commands.push('');
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
const serviceAccountKey = this.getInput(inputs, 'service_account_json_key_path', '');
|
|
69
|
-
commands.push(`SERVICE_ACCOUNT_KEY="${this.escapeBash(serviceAccountKey)}"`);
|
|
70
|
-
commands.push('');
|
|
71
|
-
}
|
|
72
|
-
commands.push(`PACKAGE_NAME="${this.escapeBash(packageName)}"`);
|
|
73
|
-
commands.push('');
|
|
74
|
-
commands.push('if [ -z "$SERVICE_ACCOUNT_KEY" ]; then');
|
|
75
|
-
commands.push(' echo "❌ Error: service_account_json_key_path is required"');
|
|
76
|
-
commands.push(' echo " Or set GOOGLE_PLAY_SERVICE_ACCOUNT_JSON in your CI secrets"');
|
|
77
|
-
commands.push(' exit 1');
|
|
78
|
-
commands.push('fi');
|
|
79
|
-
commands.push('');
|
|
80
|
-
commands.push('if [ ! -f "$SERVICE_ACCOUNT_KEY" ]; then');
|
|
81
|
-
commands.push(' echo "❌ Error: Service account key file not found: $SERVICE_ACCOUNT_KEY"');
|
|
82
|
-
commands.push(' exit 1');
|
|
83
|
-
commands.push('fi');
|
|
84
|
-
commands.push('');
|
|
85
|
-
commands.push('if [ -z "$PACKAGE_NAME" ]; then');
|
|
86
|
-
commands.push(' echo "❌ Error: package_name is required"');
|
|
87
|
-
commands.push(' exit 1');
|
|
88
|
-
commands.push('fi');
|
|
89
|
-
commands.push('');
|
|
90
|
-
// Resolve app file from app_path (newline-separated list)
|
|
91
|
-
commands.push('# Locate app file (APK or AAB)');
|
|
92
|
-
commands.push('APP_FILE=""');
|
|
93
|
-
commands.push('');
|
|
94
|
-
// Build a list of candidates from app_path
|
|
95
|
-
const appPathLines = appPath.split('\n').map(l => l.trim()).filter(l => l.length > 0);
|
|
96
|
-
if (appPathLines.length > 0) {
|
|
97
|
-
commands.push('# Check configured app_path candidates');
|
|
98
|
-
for (const candidate of appPathLines) {
|
|
99
|
-
commands.push(`if [ -z "$APP_FILE" ] && [ -f "${this.escapeBash(candidate)}" ]; then`);
|
|
100
|
-
commands.push(` APP_FILE="${this.escapeBash(candidate)}"`);
|
|
101
|
-
commands.push('fi');
|
|
102
|
-
}
|
|
103
|
-
commands.push('');
|
|
104
|
-
}
|
|
105
|
-
// Fall back to env-var resolved paths at runtime (order matches artifact_type preference)
|
|
106
|
-
commands.push('# Fall back to environment variable paths if not yet resolved');
|
|
107
|
-
const primaryEnv = isAab ? 'CIBUILD_AAB_PATH' : 'CIBUILD_APK_PATH';
|
|
108
|
-
const fallbackEnv = isAab ? 'CIBUILD_APK_PATH' : 'CIBUILD_AAB_PATH';
|
|
109
|
-
commands.push(`if [ -z "$APP_FILE" ] && [ -n "\${${primaryEnv}:-}" ] && [ -f "$${primaryEnv}" ]; then`);
|
|
110
|
-
commands.push(` APP_FILE="$${primaryEnv}"`);
|
|
111
|
-
commands.push('fi');
|
|
112
|
-
commands.push(`if [ -z "$APP_FILE" ] && [ -n "\${${fallbackEnv}:-}" ] && [ -f "$${fallbackEnv}" ]; then`);
|
|
113
|
-
commands.push(` APP_FILE="$${fallbackEnv}"`);
|
|
114
|
-
commands.push('fi');
|
|
115
|
-
commands.push('');
|
|
116
|
-
commands.push('if [ -z "$APP_FILE" ]; then');
|
|
117
|
-
commands.push(' echo "❌ Error: No APK or AAB file found."');
|
|
118
|
-
commands.push(' echo " Set app_path input or ensure CIBUILD_APK_PATH / CIBUILD_AAB_PATH is set."');
|
|
119
|
-
commands.push(' exit 1');
|
|
120
|
-
commands.push('fi');
|
|
121
|
-
commands.push('');
|
|
122
|
-
commands.push('echo "App file: $APP_FILE"');
|
|
123
|
-
commands.push('');
|
|
124
|
-
// Detect AAB vs APK
|
|
125
|
-
commands.push('# Detect format: AAB or APK');
|
|
126
|
-
commands.push('APP_FLAG=""');
|
|
127
|
-
commands.push('if [[ "$APP_FILE" == *.aab ]]; then');
|
|
128
|
-
commands.push(' APP_FLAG="--aab"');
|
|
129
|
-
commands.push(' echo "Format: AAB (Android App Bundle)"');
|
|
130
|
-
commands.push('else');
|
|
131
|
-
commands.push(' APP_FLAG="--apk"');
|
|
132
|
-
commands.push(' echo "Format: APK"');
|
|
133
|
-
commands.push('fi');
|
|
134
|
-
commands.push('');
|
|
135
|
-
// Resolve mapping file at runtime
|
|
136
|
-
commands.push('# Resolve mapping file');
|
|
137
|
-
commands.push(`MAPPING_FILE="${this.escapeBash(mappingFile)}"`);
|
|
138
|
-
commands.push('MAPPING_FLAG=""');
|
|
139
|
-
commands.push('if [ -n "$MAPPING_FILE" ] && [ -f "$MAPPING_FILE" ]; then');
|
|
140
|
-
commands.push(' MAPPING_FLAG="--mapping \\"$MAPPING_FILE\\""');
|
|
141
|
-
commands.push(' echo "Mapping file: $MAPPING_FILE"');
|
|
142
|
-
commands.push('fi');
|
|
143
|
-
commands.push('');
|
|
144
|
-
// Build fastlane supply command
|
|
145
|
-
commands.push('# Build fastlane supply command');
|
|
146
|
-
commands.push(`TRACK="${this.escapeBash(track)}"`);
|
|
147
|
-
commands.push('');
|
|
148
|
-
commands.push('SUPPLY_CMD="fastlane supply"');
|
|
149
|
-
commands.push('SUPPLY_CMD="$SUPPLY_CMD --json_key \\"$SERVICE_ACCOUNT_KEY\\""');
|
|
150
|
-
commands.push('SUPPLY_CMD="$SUPPLY_CMD --package_name \\"$PACKAGE_NAME\\""');
|
|
151
|
-
commands.push('SUPPLY_CMD="$SUPPLY_CMD $APP_FLAG \\"$APP_FILE\\""');
|
|
152
|
-
commands.push('SUPPLY_CMD="$SUPPLY_CMD --track \\"$TRACK\\""');
|
|
153
|
-
commands.push('');
|
|
154
|
-
if (status) {
|
|
155
|
-
commands.push(`SUPPLY_CMD="$SUPPLY_CMD --release_status \\"${this.escapeBash(status)}\\""`);
|
|
156
|
-
}
|
|
157
|
-
if (userFraction) {
|
|
158
|
-
commands.push(`SUPPLY_CMD="$SUPPLY_CMD --rollout \\"${this.escapeBash(userFraction)}\\""`);
|
|
159
|
-
}
|
|
160
|
-
if (whatsnewsDir) {
|
|
161
|
-
commands.push(`SUPPLY_CMD="$SUPPLY_CMD --whatsnew_paths \\"${this.escapeBash(whatsnewsDir)}\\""`);
|
|
162
|
-
}
|
|
163
|
-
commands.push('if [ -n "$MAPPING_FLAG" ]; then');
|
|
164
|
-
commands.push(' SUPPLY_CMD="$SUPPLY_CMD $MAPPING_FLAG"');
|
|
165
|
-
commands.push('fi');
|
|
166
|
-
commands.push('');
|
|
167
|
-
if (verboseLog === 'true') {
|
|
168
|
-
commands.push('SUPPLY_CMD="$SUPPLY_CMD --verbose"');
|
|
169
|
-
}
|
|
170
|
-
if (dryRun === 'true') {
|
|
171
|
-
commands.push('SUPPLY_CMD="$SUPPLY_CMD --dry_run"');
|
|
172
|
-
}
|
|
173
|
-
commands.push('');
|
|
174
|
-
commands.push('echo "Running: $SUPPLY_CMD"');
|
|
175
|
-
commands.push('echo ""');
|
|
176
|
-
commands.push('');
|
|
177
|
-
commands.push('# Execute fastlane supply');
|
|
178
|
-
commands.push('eval "$SUPPLY_CMD"');
|
|
179
|
-
commands.push('SUPPLY_EXIT=$?');
|
|
180
|
-
commands.push('');
|
|
181
|
-
commands.push('if [ $SUPPLY_EXIT -eq 0 ]; then');
|
|
182
|
-
commands.push(' echo ""');
|
|
183
|
-
commands.push(' echo "✅ Successfully deployed to Google Play (track: $TRACK)"');
|
|
184
|
-
commands.push('else');
|
|
185
|
-
commands.push(' echo ""');
|
|
186
|
-
commands.push(' echo "❌ Failed to deploy to Google Play (exit code: $SUPPLY_EXIT)"');
|
|
187
|
-
commands.push(' exit 1');
|
|
188
|
-
commands.push('fi');
|
|
189
|
-
const script = this.createBashScriptFromCommands(commands, stepName);
|
|
190
|
-
return this.createScriptStep(script, stepName);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
//# sourceMappingURL=google-play-deploy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-play-deploy.test.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/google-play-deploy.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for Google Play deploy step
|
|
3
|
-
*/
|
|
4
|
-
import { describe, test, expect } from '@jest/globals';
|
|
5
|
-
import { GooglePlayDeployStepExecutor } from './google-play-deploy.js';
|
|
6
|
-
describe('GooglePlayDeployStepExecutor', () => {
|
|
7
|
-
const mockConfig = {
|
|
8
|
-
artifactsDir: '/ci/artifacts',
|
|
9
|
-
interpreters: {
|
|
10
|
-
python: '/usr/bin/python3',
|
|
11
|
-
ruby: '/usr/bin/ruby',
|
|
12
|
-
node: '/usr/bin/node',
|
|
13
|
-
bash: '/bin/bash',
|
|
14
|
-
},
|
|
15
|
-
maxConcurrentJobs: 4,
|
|
16
|
-
paths: {
|
|
17
|
-
buildsDir: '/ci/builds',
|
|
18
|
-
cacheDir: '/ci/cache',
|
|
19
|
-
derivedDataDir: '/ci/derived_data',
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
const localConfig = { ...mockConfig, local: true };
|
|
23
|
-
describe('Basic functionality', () => {
|
|
24
|
-
test('should create a script step with correct name', async () => {
|
|
25
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
26
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
27
|
-
expect(result.kind).toBe('script');
|
|
28
|
-
expect(result.name).toBe('google-play-deploy');
|
|
29
|
-
});
|
|
30
|
-
test('should call fastlane supply', async () => {
|
|
31
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
32
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
33
|
-
expect(result.script).toContain('fastlane supply');
|
|
34
|
-
});
|
|
35
|
-
test('should include step label', async () => {
|
|
36
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
37
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
38
|
-
expect(result.script).toContain('google-play-deploy step → fastlane supply');
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
describe('Local mode', () => {
|
|
42
|
-
test('should skip in local mode', async () => {
|
|
43
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
44
|
-
const result = await executor.execute({}, {}, localConfig);
|
|
45
|
-
expect(result.script).toContain('skipped in local mode');
|
|
46
|
-
expect(result.script).not.toContain('fastlane supply');
|
|
47
|
-
});
|
|
48
|
-
test('isSkippedInLocalMode should return true', () => {
|
|
49
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
50
|
-
expect(executor.isSkippedInLocalMode()).toBe(true);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
describe('Required input validation', () => {
|
|
54
|
-
test('should error if service_account_json_key_path is empty', async () => {
|
|
55
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
56
|
-
const result = await executor.execute({ package_name: 'com.example.app' }, {}, mockConfig);
|
|
57
|
-
expect(result.script).toContain('service_account_json_key_path is required');
|
|
58
|
-
expect(result.script).toContain('exit 1');
|
|
59
|
-
});
|
|
60
|
-
test('should check that service account key file exists on disk', async () => {
|
|
61
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
62
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
63
|
-
expect(result.script).toContain('Service account key file not found');
|
|
64
|
-
expect(result.script).toContain('if [ ! -f "$SERVICE_ACCOUNT_KEY" ]');
|
|
65
|
-
});
|
|
66
|
-
test('should error if package_name is empty', async () => {
|
|
67
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
68
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json' }, {}, mockConfig);
|
|
69
|
-
expect(result.script).toContain('package_name is required');
|
|
70
|
-
expect(result.script).toContain('exit 1');
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
describe('App file handling', () => {
|
|
74
|
-
test('should use provided app_path', async () => {
|
|
75
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
76
|
-
const result = await executor.execute({
|
|
77
|
-
service_account_json_key_path: '/keys/service.json',
|
|
78
|
-
package_name: 'com.example.app',
|
|
79
|
-
app_path: '/build/app-release.apk',
|
|
80
|
-
}, {}, mockConfig);
|
|
81
|
-
expect(result.script).toContain('/build/app-release.apk');
|
|
82
|
-
});
|
|
83
|
-
test('should fall back to CIBUILD_AAB_PATH env var', async () => {
|
|
84
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
85
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
86
|
-
expect(result.script).toContain('CIBUILD_AAB_PATH');
|
|
87
|
-
});
|
|
88
|
-
test('should fall back to CIBUILD_APK_PATH env var', async () => {
|
|
89
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
90
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
91
|
-
expect(result.script).toContain('CIBUILD_APK_PATH');
|
|
92
|
-
});
|
|
93
|
-
test('should error if no app file found', async () => {
|
|
94
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
95
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
96
|
-
expect(result.script).toContain('No APK or AAB file found');
|
|
97
|
-
expect(result.script).toContain('exit 1');
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
describe('AAB vs APK detection', () => {
|
|
101
|
-
test('should use --aab flag for .aab files', async () => {
|
|
102
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
103
|
-
const result = await executor.execute({
|
|
104
|
-
service_account_json_key_path: '/keys/service.json',
|
|
105
|
-
package_name: 'com.example.app',
|
|
106
|
-
app_path: '/build/app-release.aab',
|
|
107
|
-
}, {}, mockConfig);
|
|
108
|
-
expect(result.script).toContain('APP_FLAG="--aab"');
|
|
109
|
-
expect(result.script).toContain('*.aab');
|
|
110
|
-
});
|
|
111
|
-
test('should use --apk flag for non-.aab files', async () => {
|
|
112
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
113
|
-
const result = await executor.execute({
|
|
114
|
-
service_account_json_key_path: '/keys/service.json',
|
|
115
|
-
package_name: 'com.example.app',
|
|
116
|
-
app_path: '/build/app-release.apk',
|
|
117
|
-
}, {}, mockConfig);
|
|
118
|
-
expect(result.script).toContain('APP_FLAG="--apk"');
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
describe('Track input', () => {
|
|
122
|
-
test('should default to alpha track', async () => {
|
|
123
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
124
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
125
|
-
expect(result.script).toContain('TRACK="alpha"');
|
|
126
|
-
});
|
|
127
|
-
test('should use provided track value', async () => {
|
|
128
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
129
|
-
const result = await executor.execute({
|
|
130
|
-
service_account_json_key_path: '/keys/service.json',
|
|
131
|
-
package_name: 'com.example.app',
|
|
132
|
-
track: 'production',
|
|
133
|
-
}, {}, mockConfig);
|
|
134
|
-
expect(result.script).toContain('TRACK="production"');
|
|
135
|
-
});
|
|
136
|
-
test('should pass track to fastlane supply', async () => {
|
|
137
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
138
|
-
const result = await executor.execute({
|
|
139
|
-
service_account_json_key_path: '/keys/service.json',
|
|
140
|
-
package_name: 'com.example.app',
|
|
141
|
-
track: 'internal',
|
|
142
|
-
}, {}, mockConfig);
|
|
143
|
-
expect(result.script).toContain('--track \\"$TRACK\\"');
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
describe('Optional inputs', () => {
|
|
147
|
-
test('should pass user_fraction for staged rollout', async () => {
|
|
148
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
149
|
-
const result = await executor.execute({
|
|
150
|
-
service_account_json_key_path: '/keys/service.json',
|
|
151
|
-
package_name: 'com.example.app',
|
|
152
|
-
user_fraction: '0.1',
|
|
153
|
-
}, {}, mockConfig);
|
|
154
|
-
expect(result.script).toContain('--rollout \\"0.1\\"');
|
|
155
|
-
});
|
|
156
|
-
test('should pass status when provided', async () => {
|
|
157
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
158
|
-
const result = await executor.execute({
|
|
159
|
-
service_account_json_key_path: '/keys/service.json',
|
|
160
|
-
package_name: 'com.example.app',
|
|
161
|
-
status: 'draft',
|
|
162
|
-
}, {}, mockConfig);
|
|
163
|
-
expect(result.script).toContain('--release_status \\"draft\\"');
|
|
164
|
-
});
|
|
165
|
-
test('should pass whatsnews_dir when provided', async () => {
|
|
166
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
167
|
-
const result = await executor.execute({
|
|
168
|
-
service_account_json_key_path: '/keys/service.json',
|
|
169
|
-
package_name: 'com.example.app',
|
|
170
|
-
whatsnews_dir: './changelogs',
|
|
171
|
-
}, {}, mockConfig);
|
|
172
|
-
expect(result.script).toContain('--whatsnew_paths \\"./changelogs\\"');
|
|
173
|
-
});
|
|
174
|
-
test('should attempt to resolve mapping_file', async () => {
|
|
175
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
176
|
-
const result = await executor.execute({
|
|
177
|
-
service_account_json_key_path: '/keys/service.json',
|
|
178
|
-
package_name: 'com.example.app',
|
|
179
|
-
mapping_file: './mapping.txt',
|
|
180
|
-
}, {}, mockConfig);
|
|
181
|
-
expect(result.script).toContain('MAPPING_FILE="./mapping.txt"');
|
|
182
|
-
expect(result.script).toContain('--mapping');
|
|
183
|
-
});
|
|
184
|
-
test('should not pass user_fraction if not provided', async () => {
|
|
185
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
186
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
187
|
-
expect(result.script).not.toContain('--rollout');
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
describe('Dry run', () => {
|
|
191
|
-
test('should pass --dry_run when dry_run is true', async () => {
|
|
192
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
193
|
-
const result = await executor.execute({
|
|
194
|
-
service_account_json_key_path: '/keys/service.json',
|
|
195
|
-
package_name: 'com.example.app',
|
|
196
|
-
dry_run: 'true',
|
|
197
|
-
}, {}, mockConfig);
|
|
198
|
-
expect(result.script).toContain('--dry_run');
|
|
199
|
-
});
|
|
200
|
-
test('should not pass --dry_run by default', async () => {
|
|
201
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
202
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
203
|
-
expect(result.script).not.toContain('--dry_run');
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
describe('Verbose logging', () => {
|
|
207
|
-
test('should pass --verbose when verbose_log is true', async () => {
|
|
208
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
209
|
-
const result = await executor.execute({
|
|
210
|
-
service_account_json_key_path: '/keys/service.json',
|
|
211
|
-
package_name: 'com.example.app',
|
|
212
|
-
verbose_log: 'true',
|
|
213
|
-
}, {}, mockConfig);
|
|
214
|
-
expect(result.script).toContain('--verbose');
|
|
215
|
-
});
|
|
216
|
-
test('should not pass --verbose by default', async () => {
|
|
217
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
218
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
219
|
-
expect(result.script).not.toContain('--verbose');
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
describe('Script structure', () => {
|
|
223
|
-
test('should include bash error handling directives', async () => {
|
|
224
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
225
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
226
|
-
expect(result.script).toContain('#!/bin/bash');
|
|
227
|
-
expect(result.script).toContain('set -e');
|
|
228
|
-
expect(result.script).toContain('set -o pipefail');
|
|
229
|
-
});
|
|
230
|
-
test('should include success message', async () => {
|
|
231
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
232
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
233
|
-
expect(result.script).toContain('Successfully deployed to Google Play');
|
|
234
|
-
});
|
|
235
|
-
test('should include failure message and exit 1', async () => {
|
|
236
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
237
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
238
|
-
expect(result.script).toContain('Failed to deploy to Google Play');
|
|
239
|
-
expect(result.script).toContain('exit 1');
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
describe('Validation requirements', () => {
|
|
243
|
-
test('should require service_account_json_key_path input when secret is not set', () => {
|
|
244
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
245
|
-
const requirements = executor.getValidationRequirements({}, {}, mockConfig);
|
|
246
|
-
const inputReqs = requirements.filter(r => r.category === 'input');
|
|
247
|
-
expect(inputReqs.some(r => r.name === 'service_account_json_key_path')).toBe(true);
|
|
248
|
-
});
|
|
249
|
-
test('should not require service_account_json_key_path when GOOGLE_PLAY_SERVICE_ACCOUNT_JSON is set', () => {
|
|
250
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
251
|
-
const requirements = executor.getValidationRequirements({}, { GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: '{"type":"service_account"}' }, mockConfig);
|
|
252
|
-
const inputReqs = requirements.filter(r => r.category === 'input');
|
|
253
|
-
expect(inputReqs.some(r => r.name === 'service_account_json_key_path')).toBe(false);
|
|
254
|
-
});
|
|
255
|
-
test('should not require service_account_json_key_path when custom service_account_json_var secret is set', () => {
|
|
256
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
257
|
-
const requirements = executor.getValidationRequirements({ service_account_json_var: 'MY_CUSTOM_SA_JSON' }, { MY_CUSTOM_SA_JSON: '{"type":"service_account"}' }, mockConfig);
|
|
258
|
-
const inputReqs = requirements.filter(r => r.category === 'input');
|
|
259
|
-
expect(inputReqs.some(r => r.name === 'service_account_json_key_path')).toBe(false);
|
|
260
|
-
});
|
|
261
|
-
test('should require package_name input', () => {
|
|
262
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
263
|
-
const requirements = executor.getValidationRequirements({}, {}, mockConfig);
|
|
264
|
-
const inputReqs = requirements.filter(r => r.category === 'input');
|
|
265
|
-
expect(inputReqs.some(r => r.name === 'package_name')).toBe(true);
|
|
266
|
-
});
|
|
267
|
-
test('should require fastlane command', () => {
|
|
268
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
269
|
-
const requirements = executor.getValidationRequirements({}, {}, mockConfig);
|
|
270
|
-
const commandReqs = requirements.filter(r => r.category === 'command');
|
|
271
|
-
expect(commandReqs.some(r => r.name === 'fastlane')).toBe(true);
|
|
272
|
-
});
|
|
273
|
-
});
|
|
274
|
-
describe('GOOGLE_PLAY_SERVICE_ACCOUNT_JSON secret', () => {
|
|
275
|
-
const jsonSecret = '{"type":"service_account","project_id":"my-project"}';
|
|
276
|
-
test('should write secret to temp file when GOOGLE_PLAY_SERVICE_ACCOUNT_JSON is set', async () => {
|
|
277
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
278
|
-
const result = await executor.execute({ package_name: 'com.example.app' }, { GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: jsonSecret }, mockConfig);
|
|
279
|
-
expect(result.script).toContain('GOOGLE_PLAY_SERVICE_ACCOUNT_JSON secret');
|
|
280
|
-
expect(result.script).toContain('mktemp');
|
|
281
|
-
expect(result.script).toContain('base64 -d');
|
|
282
|
-
expect(result.script).toContain('SERVICE_ACCOUNT_KEY="$_SA_TEMP_FILE"');
|
|
283
|
-
});
|
|
284
|
-
test('should embed base64-encoded JSON content in the script', async () => {
|
|
285
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
286
|
-
const result = await executor.execute({ package_name: 'com.example.app' }, { GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: jsonSecret }, mockConfig);
|
|
287
|
-
const expected = Buffer.from(jsonSecret).toString('base64');
|
|
288
|
-
expect(result.script).toContain(expected);
|
|
289
|
-
});
|
|
290
|
-
test('should set up EXIT trap to clean up temp file', async () => {
|
|
291
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
292
|
-
const result = await executor.execute({ package_name: 'com.example.app' }, { GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: jsonSecret }, mockConfig);
|
|
293
|
-
expect(result.script).toContain('trap _cleanup_sa EXIT');
|
|
294
|
-
expect(result.script).toContain('rm -f "$_SA_TEMP_FILE"');
|
|
295
|
-
});
|
|
296
|
-
test('should not require service_account_json_key_path when secret is provided', async () => {
|
|
297
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
298
|
-
const result = await executor.execute({ package_name: 'com.example.app' }, { GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: jsonSecret }, mockConfig);
|
|
299
|
-
// Should still call fastlane supply successfully (no early exit from missing path)
|
|
300
|
-
expect(result.script).toContain('fastlane supply');
|
|
301
|
-
});
|
|
302
|
-
test('should still use file path when secret is not set', async () => {
|
|
303
|
-
const executor = new GooglePlayDeployStepExecutor();
|
|
304
|
-
const result = await executor.execute({ service_account_json_key_path: '/keys/service.json', package_name: 'com.example.app' }, {}, mockConfig);
|
|
305
|
-
expect(result.script).toContain('SERVICE_ACCOUNT_KEY="/keys/service.json"');
|
|
306
|
-
expect(result.script).not.toContain('mktemp');
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
|
-
//# sourceMappingURL=google-play-deploy.test.js.map
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gradle's daemon heaps, fitted to the machine the build runs on.
|
|
3
|
-
*
|
|
4
|
-
* A project's `gradle.properties` sizes its heaps for a developer laptop. On a
|
|
5
|
-
* 10 GiB build guest, `org.gradle.jvmargs=-Xmx8G` (which the Kotlin daemon
|
|
6
|
-
* inherits) or `-Xmx6g` beside `kotlin.daemon.jvmargs=-Xmx8g` asks for more
|
|
7
|
-
* than the machine has, and the kernel kills a daemon mid-build. All the log
|
|
8
|
-
* then says is "Gradle build daemon disappeared unexpectedly". IacobIonut01/ReFra
|
|
9
|
-
* and vitorpamplona/amethyst are the two measured cases; ReFra's own CI lowers
|
|
10
|
-
* its heap to 4g before building.
|
|
11
|
-
*
|
|
12
|
-
* Two things, both at run time, in the Gradle project directory:
|
|
13
|
-
*
|
|
14
|
-
* 1. **Cap.** Read the machine's memory and the declared `-Xmx` of the Gradle
|
|
15
|
-
* daemon and the Kotlin daemon. When their sum is past
|
|
16
|
-
* `GRADLE_HEAP_SHARE_PERCENT` of memory, run one heap instead: the Gradle
|
|
17
|
-
* daemon gets the whole budget (`-Dorg.gradle.jvmargs=`) and Kotlin
|
|
18
|
-
* compiles in it (`-Pkotlin.compiler.execution.strategy=in-process`). One
|
|
19
|
-
* line names the old values and the new. Two heaps did not fit: halved,
|
|
20
|
-
* ReFra's Kotlin compile ran out of heap; split 60/40, its Kotlin daemon
|
|
21
|
-
* was lost mid-compile, and mifos-mobile's Gradle daemon ran out of its
|
|
22
|
-
* 40 % on a 6 GiB guest.
|
|
23
|
-
* 2. **Say so.** When a Gradle run exits 137, its output says the daemon
|
|
24
|
-
* disappeared, or the Kotlin daemon was lost mid-compile, print the
|
|
25
|
-
* kernel's out-of-memory lines and one sentence with the machine's memory
|
|
26
|
-
* and what the build asked for.
|
|
27
|
-
* 3. **Workers.** A heap cap does not bound what runs beside the heaps:
|
|
28
|
-
* off-heap memory, and native compilers run in parallel. IacobIonut01/ReFra
|
|
29
|
-
* was killed again at a capped -Xmx3712m, one JVM holding ~5.1 GiB
|
|
30
|
-
* resident; its own CI also sets `org.gradle.workers.max=2`. A pipeline
|
|
31
|
-
* may ask for a worker count, passed as `--max-workers=<n>`.
|
|
32
|
-
*
|
|
33
|
-
* Precedence, measured with Gradle 8.14.3 and 9.5.0 (daemon and --no-daemon):
|
|
34
|
-
* `-Dorg.gradle.jvmargs` on the command line beats both the Gradle user
|
|
35
|
-
* home's and the project's `gradle.properties` for the daemon's heap, and
|
|
36
|
-
* `-P` beats `gradle.properties` for a Gradle property, which is how the
|
|
37
|
-
* Kotlin Gradle plugin reads `kotlin.daemon.jvmargs` and
|
|
38
|
-
* `kotlin.compiler.execution.strategy`: with
|
|
39
|
-
* `-Pkotlin.compiler.execution.strategy=in-process`, no Kotlin daemon starts
|
|
40
|
-
* even where the project's file says `daemon`. `--max-workers` beats
|
|
41
|
-
* `org.gradle.workers.max` in both files (`gradle.startParameter.maxWorkerCount`).
|
|
42
|
-
* `GRADLE_OPTS` is not used: it sizes the client JVM, not the daemon.
|
|
43
|
-
*
|
|
44
|
-
* Written as shell functions so what ships is what the tests run. Its lines
|
|
45
|
-
* start with "Gradle memory:", never with a step-progress marker.
|
|
46
|
-
*/
|
|
47
|
-
/** The share of the machine's memory the two daemon heaps may take together. */
|
|
48
|
-
export declare const GRADLE_HEAP_SHARE_PERCENT = 75;
|
|
49
|
-
export declare const GRADLE_MEMORY_FUNCTIONS = "# This machine's memory in MiB, or nothing when it cannot be read.\ncibuild_mem_mib() {\n if [ -r /proc/meminfo ]; then\n awk '/^MemTotal:/ { print int($2 / 1024); exit }' /proc/meminfo\n else\n local bytes\n bytes=$(sysctl -n hw.memsize 2>/dev/null || true)\n if [ -n \"$bytes\" ]; then echo $(( bytes / 1048576 )); fi\n fi\n}\n\n# $1 a .properties file, $2 a key. Prints \"<line number><TAB><value>\" for the\n# last assignment of the key, or nothing.\ncibuild_prop_line() {\n [ -f \"$1\" ] || return 0\n awk -v key=\"$2\" '\n { line = $0; sub(/^[ \\t]+/, \"\", line) }\n line ~ /^[#!]/ { next }\n {\n k = line; sub(/[ \\t]*[=:].*$/, \"\", k)\n if (k == key) { v = line; sub(/^[^=:]*[=:][ \\t]*/, \"\", v); sub(/[ \\t\\r]+$/, \"\", v); found = NR \"\\t\" v }\n }\n END { if (found != \"\") print found }\n ' \"$1\"\n}\n\n# The -Xmx of a JVM argument string in MiB (the last one wins, as in the JVM),\n# or nothing when it has none.\ncibuild_xmx_mib() {\n printf '%s\\n' \"$1\" | tr ' \\t' '\\n\\n' | awk '\n /^-Xmx[0-9]+[kKmMgGtT]?$/ {\n n = substr($0, 5); u = substr(n, length(n))\n if (u ~ /[0-9]/) { v = n / 1048576 }\n else {\n n = substr(n, 1, length(n) - 1)\n if (u ~ /[kK]/) v = n / 1024\n else if (u ~ /[mM]/) v = n\n else if (u ~ /[gG]/) v = n * 1024\n else v = n * 1048576\n }\n r = int(v)\n }\n END { if (r != \"\") print r }'\n}\n\n# The -XX:MaxMetaspaceSize of a JVM argument string in MiB (the last one\n# wins), or nothing when it has none.\ncibuild_metaspace_mib() {\n printf '%s\\n' \"$1\" | tr ' \\t,' '\\n\\n\\n' | awk '\n /^-XX:MaxMetaspaceSize=[0-9]+[kKmMgGtT]?$/ {\n n = substr($0, 22); u = substr(n, length(n))\n if (u ~ /[0-9]/) { v = n / 1048576 }\n else {\n n = substr(n, 1, length(n) - 1)\n if (u ~ /[kK]/) v = n / 1024\n else if (u ~ /[mM]/) v = n\n else if (u ~ /[gG]/) v = n * 1024\n else v = n * 1048576\n }\n r = int(v)\n }\n END { if (r != \"\") print r }'\n}\n\n# $1 a JVM argument string, $2 a size in MiB: the same arguments with every\n# -XX:MaxMetaspaceSize replaced by that one.\ncibuild_with_metaspace() (\n set -f\n out=\"\"\n replaced=0\n for arg in $1; do\n case \"$arg\" in\n -XX:MaxMetaspaceSize=*) if [ \"$replaced\" -eq 0 ]; then out=\"$out -XX:MaxMetaspaceSize=${2}m\"; replaced=1; fi ;;\n *) out=\"$out $arg\" ;;\n esac\n done\n printf '%s' \"${out# }\"\n)\n\n# $1 a JVM argument string, $2 a heap in MiB: the same arguments with every\n# -Xmx replaced by that one (added in front when there was none).\ncibuild_with_xmx() (\n set -f\n out=\"\"\n replaced=0\n for arg in $1; do\n case \"$arg\" in\n -Xmx*) if [ \"$replaced\" -eq 0 ]; then out=\"$out -Xmx${2}m\"; replaced=1; fi ;;\n *) out=\"$out $arg\" ;;\n esac\n done\n [ \"$replaced\" -eq 1 ] || out=\" -Xmx${2}m$out\"\n printf '%s' \"${out# }\"\n)\n\n# MiB as GiB with one decimal.\ncibuild_gib() {\n awk -v m=\"$1\" 'BEGIN { printf \"%.1f\", m / 1024 }'\n}\n\n# A heap scaled by budget/total, rounded down to 64 MiB, never below 512 MiB.\ncibuild_scaled_heap() {\n local v=$(( $1 * $2 / $3 / 64 * 64 ))\n [ \"$v\" -ge 512 ] || v=512\n echo \"$v\"\n}\n\n# The plan, from its inputs only, so a test can run it:\n# $1 this machine's memory in MiB (empty when unknown)\n# $2 the project's gradle.properties $3 the Gradle user home's\n# $4 JVM arguments the pipeline asks for instead (may be empty)\n# Sets CIBUILD_GRADLE_MEMORY_ARGS (extra Gradle arguments),\n# CIBUILD_GRADLE_MEMORY_LINE (what to print before Gradle runs; empty when\n# nothing changes) and CIBUILD_GRADLE_MEMORY_SENTENCE (what to print if a\n# daemon is killed).\n#\n# Precedence is Gradle's own: the command line beats GRADLE_USER_HOME's\n# gradle.properties, which beats the project's. A Kotlin daemon with no -Xmx of\n# its own inherits the Gradle daemon's, and in-process compilation has no\n# Kotlin daemon at all.\ncibuild_gradle_memory_plan() {\n local mem=\"$1\" project=\"$2\" user=\"$3\" preferred=\"$4\" l\n local jvm=\"\" jvm_at=\"\" kd=\"\" kd_at=\"\" strategy=\"\"\n CIBUILD_GRADLE_MEMORY_ARGS=()\n CIBUILD_GRADLE_MEMORY_LINE=\"\"\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"\"\n\n if [ -n \"$preferred\" ]; then jvm=\"$preferred\"; jvm_at=\"the pipeline\"; fi\n for f in \"$user\" \"$project\"; do\n if [ -z \"$jvm_at\" ]; then\n l=$(cibuild_prop_line \"$f\" org.gradle.jvmargs)\n if [ -n \"$l\" ]; then jvm=\"${l#*\t}\"; jvm_at=\"$f:${l%%\t*}\"; fi\n fi\n if [ -z \"$kd_at\" ]; then\n l=$(cibuild_prop_line \"$f\" kotlin.daemon.jvmargs)\n if [ -n \"$l\" ]; then kd=\"${l#*\t}\"; kd_at=\"$f:${l%%\t*}\"; fi\n fi\n if [ -z \"$strategy\" ]; then\n l=$(cibuild_prop_line \"$f\" kotlin.compiler.execution.strategy)\n strategy=\"${l#*\t}\"\n fi\n done\n\n local g k kd_own=\"\"\n g=$(cibuild_xmx_mib \"$jvm\")\n [ -n \"$g\" ] || g=512\n if [ \"$strategy\" = \"in-process\" ]; then\n k=0\n else\n kd_own=$(cibuild_xmx_mib \"$kd\")\n k=\"${kd_own:-$g}\"\n fi\n local total=$(( g + k ))\n\n local asked\n if [ -n \"$jvm_at\" ]; then asked=\"org.gradle.jvmargs=$jvm at ${jvm_at}\"; else asked=\"Gradle's default -Xmx512m\"; fi\n if [ \"$k\" -eq 0 ]; then\n asked=\"$asked; Kotlin compiles in-process\"\n elif [ -n \"$kd_own\" ]; then\n asked=\"$asked, kotlin.daemon.jvmargs=$kd at ${kd_at}\"\n else\n asked=\"$asked; the Kotlin daemon inherits its -Xmx\"\n fi\n\n if [ -z \"$mem\" ]; then\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"This build's Gradle and Kotlin daemons asked for $(cibuild_gib \"$total\") GiB ($asked); this machine's memory could not be read.\"\n if [ -n \"$preferred\" ]; then CIBUILD_GRADLE_MEMORY_ARGS=(\"-Dorg.gradle.jvmargs=$preferred\"); fi\n return 0\n fi\n\n local budget=$(( mem * 75 / 100 ))\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"The build machine has $(cibuild_gib \"$mem\") GiB; this build's Gradle and Kotlin daemons asked for $(cibuild_gib \"$total\") GiB ($asked).\"\n\n if [ \"$total\" -le \"$budget\" ]; then\n if [ -n \"$preferred\" ]; then\n CIBUILD_GRADLE_MEMORY_ARGS=(\"-Dorg.gradle.jvmargs=$preferred\")\n CIBUILD_GRADLE_MEMORY_LINE=\"Gradle memory: org.gradle.jvmargs=$preferred, as the pipeline asks (-Dorg.gradle.jvmargs on the command line).\"\n fi\n return 0\n fi\n\n case \"$jvm\" in\n *\\\\)\n CIBUILD_GRADLE_MEMORY_LINE=\"Gradle memory: the declared heaps ask for $(cibuild_gib \"$total\") GiB of this machine's $(cibuild_gib \"$mem\") GiB, but org.gradle.jvmargs at ${jvm_at} continues onto another line, so it is left as it is.\"\n return 0\n ;;\n esac\n\n # One heap, the whole budget. Two did not fit: ReFra's Kotlin daemon was\n # lost mid-compile at a 60/40 split, and mifos-mobile's Gradle daemon ran out\n # of its 40 %. In-process, Kotlin compiles in the Gradle daemon's heap.\n local ng now newjvm mg mk\n ng=$(cibuild_scaled_heap \"$budget\" 1 1)\n newjvm=$(cibuild_with_xmx \"$jvm\" \"$ng\")\n now=\"Gradle -Xmx${ng}m\"\n if [ \"$k\" -gt 0 ]; then\n # One JVM now holds what two did, so a Metaspace cap Gradle declared must\n # hold Kotlin's too: the Kotlin daemon's own (kotlin.daemon.jvmargs, or\n # -Dkotlin.daemon.jvm.options in Gradle's), else the Gradle one it\n # inherits. GetStream/whatsApp-clone-compose capped Gradle at 512m and gave\n # Kotlin 1g, and in-process compileDebugKotlin ran out of Metaspace\n # (nightly-baseline 79). No Gradle cap, nothing to raise.\n mg=$(cibuild_metaspace_mib \"$jvm\")\n if [ -n \"$mg\" ]; then\n mk=$(cibuild_metaspace_mib \"$kd\")\n [ -n \"$mk\" ] || mk=$(cibuild_metaspace_mib \"$(printf '%s\\n' \"$jvm\" | tr ' \\t' '\\n\\n' | sed -n 's/^-Dkotlin\\.daemon\\.jvm\\.options=//p')\")\n [ -n \"$mk\" ] || mk=\"$mg\"\n newjvm=$(cibuild_with_metaspace \"$newjvm\" $(( mg + mk )))\n now=\"$now with -XX:MaxMetaspaceSize=$(( mg + mk ))m (Gradle's ${mg}m and Kotlin's ${mk}m, in one JVM now)\"\n fi\n now=\"$now and Kotlin compiled in-process in it (kotlin.compiler.execution.strategy=in-process: one heap, not a Gradle and a Kotlin daemon)\"\n fi\n CIBUILD_GRADLE_MEMORY_ARGS=(\"-Dorg.gradle.jvmargs=$newjvm\")\n if [ \"$k\" -gt 0 ]; then\n CIBUILD_GRADLE_MEMORY_ARGS+=(\"-Pkotlin.compiler.execution.strategy=in-process\")\n fi\n CIBUILD_GRADLE_MEMORY_LINE=\"Gradle memory: this machine has $(cibuild_gib \"$mem\") GiB and the declared heaps ask for $(cibuild_gib \"$total\") GiB ($asked), past the $(cibuild_gib \"$budget\") GiB this build allows them. Running with $now, set on the command line.\"\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"$CIBUILD_GRADLE_MEMORY_SENTENCE This build ran them capped: $now.\"\n}\n\n# $1 the project's gradle.properties, $2 the Gradle user home's. A JDK path the\n# project pins with org.gradle.java.home that is not on this machine \u2014 a\n# developer's own, like SEAbdulbasit/MusicApp-KMP's\n# /Users/abdulbasit/Library/Java/... (nightly-baseline 83) \u2014 stops Gradle\n# before it starts: \"given for org.gradle.java.home Gradle property is\n# invalid\". On the command line, -Dorg.gradle.java.home beats both files\n# (measured, Gradle 8.14.3), so the build's own JDK is passed instead. A path\n# that exists is left alone. Sets CIBUILD_GRADLE_JAVA_HOME_LINE.\ncibuild_gradle_java_home_plan() {\n local l v=\"\" at=\"\"\n CIBUILD_GRADLE_JAVA_HOME_LINE=\"\"\n for f in \"$2\" \"$1\"; do\n l=$(cibuild_prop_line \"$f\" org.gradle.java.home)\n if [ -n \"$l\" ]; then v=\"${l#*\t}\"; at=\"$f:${l%%\t*}\"; break; fi\n done\n [ -n \"$v\" ] || return 0\n [ -d \"$v\" ] && return 0\n [ -n \"${JAVA_HOME:-}\" ] && [ -d \"$JAVA_HOME\" ] || return 0\n CIBUILD_GRADLE_MEMORY_ARGS+=(\"-Dorg.gradle.java.home=$JAVA_HOME\")\n CIBUILD_GRADLE_JAVA_HOME_LINE=\"Gradle: org.gradle.java.home=$v at $at is not on this machine; running with this build's JDK, $JAVA_HOME (-Dorg.gradle.java.home on the command line).\"\n}\n\n# $1 the number of Gradle workers the pipeline asks for (may be empty). Adds\n# --max-workers to the plan's arguments; run after cibuild_gradle_memory_plan.\n# Sets CIBUILD_GRADLE_WORKERS_LINE (what to print; empty when nothing asked).\ncibuild_gradle_workers_plan() {\n CIBUILD_GRADLE_WORKERS_LINE=\"\"\n [ -n \"$1\" ] || return 0\n case \"$1\" in\n *[!0-9]*|0*)\n CIBUILD_GRADLE_WORKERS_LINE=\"Gradle memory: max_workers=$1 is not a positive whole number, so it is not passed and Gradle picks its own worker count.\"\n return 0\n ;;\n esac\n CIBUILD_GRADLE_MEMORY_ARGS+=(\"--max-workers=$1\")\n CIBUILD_GRADLE_WORKERS_LINE=\"Gradle memory: running with --max-workers=$1, as the pipeline asks (set on the command line, over any org.gradle.workers.max).\"\n CIBUILD_GRADLE_MEMORY_SENTENCE=\"$CIBUILD_GRADLE_MEMORY_SENTENCE Gradle ran with --max-workers=$1.\"\n}\n\n# The kernel's out-of-memory lines, if this user may read the kernel log.\n# Linux guests restrict dmesg to root by default; their build user has\n# non-interactive sudo, so that is the second try.\ncibuild_kernel_oom_lines() {\n { dmesg 2>/dev/null || sudo -n dmesg 2>/dev/null || true; } |\n grep -i -E 'out of memory|oom-kill|oom_reaper|killed process' | tail -n 20 || true\n}\n\n# $1 Gradle's exit status, $2 a file holding its output. Says so when the\n# failure is a killed daemon rather than a failed build.\ncibuild_gradle_memory_report() {\n local kotlin_lost=\"\"\n if grep -q \"Connection to the Kotlin daemon has been unexpectedly lost\" \"$2\" 2>/dev/null; then kotlin_lost=1; fi\n if [ \"$1\" -ne 137 ] && [ -z \"$kotlin_lost\" ] && ! grep -q \"daemon disappeared unexpectedly\" \"$2\" 2>/dev/null; then\n return 0\n fi\n local oom\n oom=$(cibuild_kernel_oom_lines)\n echo \"\"\n if [ -n \"$kotlin_lost\" ]; then\n echo \"Gradle memory: the Kotlin daemon was lost mid-compile rather than the build failing (exit $1). Kotlin then compiled without it, in the Gradle daemon's heap.\"\n else\n echo \"Gradle memory: a Gradle daemon was killed rather than failing the build (exit $1).\"\n fi\n if [ -n \"$oom\" ]; then\n echo \"The kernel's out-of-memory lines:\"\n printf '%s\\n' \"$oom\" | sed 's/^/ /'\n else\n echo \"The kernel log shows no out-of-memory kill, or this machine does not let the build read it.\"\n fi\n if [ -n \"$CIBUILD_GRADLE_MEMORY_SENTENCE\" ]; then echo \"$CIBUILD_GRADLE_MEMORY_SENTENCE\"; fi\n}\n\n# Runs Gradle with the plan's arguments, and reports a killed daemon.\ncibuild_gradle() {\n local log rc\n log=$(mktemp)\n set +e\n \"$CIBUILD_GRADLE_BIN\" \"${CIBUILD_GRADLE_MEMORY_ARGS[@]}\" \"$@\" 2>&1 | tee \"$log\"\n rc=${PIPESTATUS[0]}\n set -e\n if [ \"$rc\" -ne 0 ]; then cibuild_gradle_memory_report \"$rc\" \"$log\" || true; fi\n rm -f \"$log\"\n return \"$rc\"\n}\n\n# $1 JVM arguments the pipeline asks for, $2 the Gradle workers it asks for\n# (either may be empty). Run in the Gradle project directory, after GRADLE_CMD\n# is chosen.\ncibuild_gradle_memory_cap() {\n cibuild_gradle_memory_plan \"$(cibuild_mem_mib || true)\" \"gradle.properties\" \\\n \"${GRADLE_USER_HOME:-$HOME/.gradle}/gradle.properties\" \"$1\"\n cibuild_gradle_workers_plan \"$2\"\n cibuild_gradle_java_home_plan \"gradle.properties\" \"${GRADLE_USER_HOME:-$HOME/.gradle}/gradle.properties\"\n if [ -n \"$CIBUILD_GRADLE_MEMORY_LINE\" ]; then echo \"$CIBUILD_GRADLE_MEMORY_LINE\"; fi\n if [ -n \"$CIBUILD_GRADLE_WORKERS_LINE\" ]; then echo \"$CIBUILD_GRADLE_WORKERS_LINE\"; fi\n if [ -n \"$CIBUILD_GRADLE_JAVA_HOME_LINE\" ]; then echo \"$CIBUILD_GRADLE_JAVA_HOME_LINE\"; fi\n CIBUILD_GRADLE_BIN=\"$GRADLE_CMD\"\n GRADLE_CMD=cibuild_gradle\n}";
|
|
50
|
-
/**
|
|
51
|
-
* The commands a Gradle step runs once it has chosen `GRADLE_CMD` and is in
|
|
52
|
-
* the project directory. Afterwards `$GRADLE_CMD` runs Gradle with the plan's
|
|
53
|
-
* arguments and reports a killed daemon.
|
|
54
|
-
*
|
|
55
|
-
* `jvmargs` is what the pipeline asks for instead of the project's
|
|
56
|
-
* `org.gradle.jvmargs` (a value the repository's own CI sets, say); the cap
|
|
57
|
-
* still applies to it. `maxWorkers` is the worker count it asks for (the
|
|
58
|
-
* repository CI's `org.gradle.workers.max`), passed as `--max-workers`.
|
|
59
|
-
*/
|
|
60
|
-
export declare function gradleMemoryCommands(jvmargs: string, escape: (value: string) => string, maxWorkers?: string): string[];
|
|
61
|
-
//# sourceMappingURL=gradle-memory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gradle-memory.d.ts","sourceRoot":"","sources":["../../../../src/yaml/steps/gradle-memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAG5C,eAAO,MAAM,uBAAuB,k9aA8TlC,CAAC;AAEH;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EACjC,UAAU,SAAK,GACd,MAAM,EAAE,CAOV"}
|