@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,255 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A pipeline may declare a credential slot under the name a *workflow-scoped*
|
|
3
|
-
* secret carries, and the workflow it names reads it under the plain name.
|
|
4
|
-
*
|
|
5
|
-
* Two workflows that build different product flavors cannot share one value.
|
|
6
|
-
* `local.properties` is the clearest case: every workflow writes the same file
|
|
7
|
-
* to the same path, and what belongs in it is the flavor's environment — a
|
|
8
|
-
* different base API URL and twenty other keys the Secrets Gradle Plugin turns
|
|
9
|
-
* into `BuildConfig`. One slot, one value, and one of the two flavors builds
|
|
10
|
-
* against the wrong environment.
|
|
11
|
-
*
|
|
12
|
-
* The value side of that has always worked. `ci secrets upload` encodes a
|
|
13
|
-
* workflow-scoped secret as `CIBUILD_SW__<WORKFLOW>__<VAR>`, `SecretsManager`
|
|
14
|
-
* decodes it back, and `EnvResolver` asks for the workflow being run — proved
|
|
15
|
-
* end to end on the dispatch path, where a fresh clone has no
|
|
16
|
-
* `.cibuild-secrets.json` and the value arrives as a bare environment
|
|
17
|
-
* variable. What did not work is *declaring* it. A pipeline declares its
|
|
18
|
-
* credentials as empty `envs` slots, and that declaration does two jobs
|
|
19
|
-
* nothing else does:
|
|
20
|
-
*
|
|
21
|
-
* - `unsetEnvKeys` — what `invarn setup` searches the developer's machine
|
|
22
|
-
* by — reads `envs`, never step inputs. An undeclared credential is never
|
|
23
|
-
* discovered and never offered for upload.
|
|
24
|
-
* - `file@1.0.0` tells "nobody supplied this" from "this workflow does not
|
|
25
|
-
* need it" by whether the key is in the env map at all, and only a
|
|
26
|
-
* declaration puts an unsupplied key there. Without one, a credential that
|
|
27
|
-
* went missing is skipped with a warning and the build fails later inside
|
|
28
|
-
* the project's own build tool (issue 03).
|
|
29
|
-
*
|
|
30
|
-
* So a per-workflow slot has to be declarable, and a declaration naming one
|
|
31
|
-
* workflow has to mean nothing in the others — otherwise `release` would
|
|
32
|
-
* demand `primary`'s value. The decoding belongs here, beside the decoding of
|
|
33
|
-
* the secret itself, and not in `file@`: the step keeps reading its plain
|
|
34
|
-
* `var_name` and never learns the convention exists.
|
|
35
|
-
*/
|
|
36
|
-
import { describe, test, expect, beforeEach, afterEach } from '@jest/globals';
|
|
37
|
-
import { spawnSync } from 'node:child_process';
|
|
38
|
-
import { mkdtempSync, readFileSync, rmSync, writeFileSync, existsSync } from 'node:fs';
|
|
39
|
-
import { tmpdir } from 'node:os';
|
|
40
|
-
import { join } from 'node:path';
|
|
41
|
-
import { convertYAMLToPipelineDef } from './converter.js';
|
|
42
|
-
import { EnvResolver } from './env-resolver.js';
|
|
43
|
-
import { clearRegistry, registerStep } from './steps/registry.js';
|
|
44
|
-
import { FileStepExecutor } from './steps/file.js';
|
|
45
|
-
const mockConfig = {
|
|
46
|
-
artifactsDir: '/test/artifacts',
|
|
47
|
-
maxConcurrentJobs: 1,
|
|
48
|
-
paths: {
|
|
49
|
-
buildsDir: '/test/builds',
|
|
50
|
-
cacheDir: '/test/cache',
|
|
51
|
-
derivedDataDir: '/test/derived-data',
|
|
52
|
-
},
|
|
53
|
-
interpreters: {
|
|
54
|
-
bash: '/bin/bash',
|
|
55
|
-
python: 'python3',
|
|
56
|
-
ruby: 'ruby',
|
|
57
|
-
node: 'node',
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
const TARGET = 'local.properties';
|
|
61
|
-
/** Two flavors, two environments, and nothing in common but the file name. */
|
|
62
|
-
const CI_DYNAMIC = 'BASE_API_URL=https://ci-dynamic.example.test/api\n';
|
|
63
|
-
const PROD = 'BASE_API_URL=https://prod.example.test/api\n';
|
|
64
|
-
/** Every environment variable a test here may set, cleared around each one. */
|
|
65
|
-
const TOUCHED = [
|
|
66
|
-
'LOCAL_PROPERTIES',
|
|
67
|
-
'CIBUILD_S__LOCAL_PROPERTIES',
|
|
68
|
-
'CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES',
|
|
69
|
-
'CIBUILD_SW__PULL_REQUEST__LOCAL_PROPERTIES',
|
|
70
|
-
'CIBUILD_SW__RELEASE__LOCAL_PROPERTIES',
|
|
71
|
-
];
|
|
72
|
-
let workdir;
|
|
73
|
-
let previousCwd;
|
|
74
|
-
function clearTouched() {
|
|
75
|
-
for (const key of TOUCHED)
|
|
76
|
-
delete process.env[key];
|
|
77
|
-
}
|
|
78
|
-
beforeEach(() => {
|
|
79
|
-
clearRegistry();
|
|
80
|
-
registerStep('file', new FileStepExecutor());
|
|
81
|
-
previousCwd = process.cwd();
|
|
82
|
-
workdir = mkdtempSync(join(tmpdir(), 'cibuild-workflow-slot-'));
|
|
83
|
-
process.chdir(workdir);
|
|
84
|
-
// `workdir` is the pre-symlink path on macOS; the steps resolve paths from
|
|
85
|
-
// CIBUILD_SOURCE_DIR, which is cwd, so read files back the same way.
|
|
86
|
-
workdir = process.cwd();
|
|
87
|
-
clearTouched();
|
|
88
|
-
});
|
|
89
|
-
afterEach(() => {
|
|
90
|
-
process.chdir(previousCwd);
|
|
91
|
-
rmSync(workdir, { recursive: true, force: true });
|
|
92
|
-
clearRegistry();
|
|
93
|
-
clearTouched();
|
|
94
|
-
});
|
|
95
|
-
/**
|
|
96
|
-
* The shape a flavored repository's generated pipeline has: the credential
|
|
97
|
-
* declared once per workflow under the encoded name, and the same unsuffixed
|
|
98
|
-
* `var_name` in every workflow's `file@` step.
|
|
99
|
-
*/
|
|
100
|
-
function probePipeline(declared) {
|
|
101
|
-
const step = {
|
|
102
|
-
'file@1.0.0': {
|
|
103
|
-
title: 'Setup local.properties',
|
|
104
|
-
is_skippable: true,
|
|
105
|
-
inputs: { target_path: TARGET, var_name: 'LOCAL_PROPERTIES' },
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
return {
|
|
109
|
-
format_version: '1',
|
|
110
|
-
app: { envs: Object.entries(declared).map(([k, v]) => ({ [k]: v })) },
|
|
111
|
-
workflows: {
|
|
112
|
-
primary: { envs: [{ VARIANT: 'ciDynamicDebug' }], steps: [step] },
|
|
113
|
-
'pull-request': { envs: [{ VARIANT: 'ciDynamicDebug' }], steps: [step] },
|
|
114
|
-
release: { envs: [{ VARIANT: 'prodRelease' }], steps: [step] },
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Converts one workflow and runs the steps it generated the way the runner
|
|
120
|
-
* does, then reads back whatever landed at `local.properties`.
|
|
121
|
-
*/
|
|
122
|
-
async function land(pipeline, workflow) {
|
|
123
|
-
const result = await convertYAMLToPipelineDef(pipeline, mockConfig, workflow);
|
|
124
|
-
const chunks = [...result.warnings];
|
|
125
|
-
for (const step of result.pipeline.steps) {
|
|
126
|
-
const scriptPath = join(workdir, `__step_${step.id}.sh`);
|
|
127
|
-
writeFileSync(scriptPath, step.script, 'utf-8');
|
|
128
|
-
const proc = spawnSync('bash', [scriptPath], {
|
|
129
|
-
cwd: workdir,
|
|
130
|
-
encoding: 'utf-8',
|
|
131
|
-
env: { ...process.env },
|
|
132
|
-
});
|
|
133
|
-
expect(proc.status).toBe(0);
|
|
134
|
-
chunks.push(proc.stdout ?? '', proc.stderr ?? '');
|
|
135
|
-
}
|
|
136
|
-
const landedAt = join(workdir, TARGET);
|
|
137
|
-
return {
|
|
138
|
-
output: chunks.join('\n'),
|
|
139
|
-
contents: existsSync(landedAt) ? readFileSync(landedAt, 'utf-8') : undefined,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
/** The conversion's outcome, without letting a throw escape the assertion. */
|
|
143
|
-
async function convert(pipeline, workflow) {
|
|
144
|
-
try {
|
|
145
|
-
const result = await convertYAMLToPipelineDef(pipeline, mockConfig, workflow);
|
|
146
|
-
return { steps: result.pipeline.steps };
|
|
147
|
-
}
|
|
148
|
-
catch (error) {
|
|
149
|
-
return { error: error };
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function resolverFor(pipeline, workflow) {
|
|
153
|
-
return new EnvResolver(pipeline, pipeline.workflows[workflow], workflow, 'linux');
|
|
154
|
-
}
|
|
155
|
-
/** The three slots a flavored repository's pipeline declares. */
|
|
156
|
-
const PER_WORKFLOW_SLOTS = {
|
|
157
|
-
CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES: '',
|
|
158
|
-
CIBUILD_SW__PULL_REQUEST__LOCAL_PROPERTIES: '',
|
|
159
|
-
CIBUILD_SW__RELEASE__LOCAL_PROPERTIES: '',
|
|
160
|
-
};
|
|
161
|
-
describe('a slot naming a workflow', () => {
|
|
162
|
-
test('delivers that workflow its own bytes, and the other workflow the other bytes', async () => {
|
|
163
|
-
// Exactly what a dispatch hands the build: bare environment variables
|
|
164
|
-
// under the encoded names, and no `.cibuild-secrets.json` anywhere.
|
|
165
|
-
process.env.CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES = CI_DYNAMIC;
|
|
166
|
-
process.env.CIBUILD_SW__RELEASE__LOCAL_PROPERTIES = PROD;
|
|
167
|
-
expect(existsSync(join(workdir, '.cibuild-secrets.json'))).toBe(false);
|
|
168
|
-
const primary = await land(probePipeline(PER_WORKFLOW_SLOTS), 'primary');
|
|
169
|
-
expect(primary.contents).toBe(CI_DYNAMIC);
|
|
170
|
-
rmSync(join(workdir, TARGET));
|
|
171
|
-
const release = await land(probePipeline(PER_WORKFLOW_SLOTS), 'release');
|
|
172
|
-
expect(release.contents).toBe(PROD);
|
|
173
|
-
});
|
|
174
|
-
test('reaches a workflow whose name the encoding had to change', async () => {
|
|
175
|
-
// `pull-request` cannot be an environment variable name, so the encoding
|
|
176
|
-
// upper-cases it and turns the dash into an underscore. If the decoding
|
|
177
|
-
// did not turn it back the slot would belong to a workflow nobody runs.
|
|
178
|
-
process.env.CIBUILD_SW__PULL_REQUEST__LOCAL_PROPERTIES = CI_DYNAMIC;
|
|
179
|
-
const { contents } = await land(probePipeline(PER_WORKFLOW_SLOTS), 'pull-request');
|
|
180
|
-
expect(contents).toBe(CI_DYNAMIC);
|
|
181
|
-
});
|
|
182
|
-
test('is not a declaration in any other workflow', async () => {
|
|
183
|
-
// `release` is asked for nothing here. If `primary`'s slot declared
|
|
184
|
-
// `LOCAL_PROPERTIES` everywhere, `release` would refuse the build over a
|
|
185
|
-
// value it was never going to be given.
|
|
186
|
-
const pipeline = probePipeline({ CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES: '' });
|
|
187
|
-
const { error, steps } = await convert(pipeline, 'release');
|
|
188
|
-
expect(error).toBeUndefined();
|
|
189
|
-
expect(steps).toBeDefined();
|
|
190
|
-
expect(resolverFor(pipeline, 'release').has('LOCAL_PROPERTIES')).toBe(false);
|
|
191
|
-
});
|
|
192
|
-
test('still refuses the build in the workflow it does name', async () => {
|
|
193
|
-
// The tripwire that makes per-workflow slots safe to emit. Replacing one
|
|
194
|
-
// flat declaration with three scoped ones must not turn issue 03's loud
|
|
195
|
-
// refusal back into a green skip.
|
|
196
|
-
const { error } = await convert(probePipeline({ CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES: '' }), 'primary');
|
|
197
|
-
expect(error).toBeDefined();
|
|
198
|
-
expect(error.message).toContain('LOCAL_PROPERTIES');
|
|
199
|
-
expect(error.message).toContain(TARGET);
|
|
200
|
-
// Named as the build reads it. The encoding is ours, not the user's, and
|
|
201
|
-
// `ci secrets add CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES` is not a command.
|
|
202
|
-
expect(error.message).not.toContain('CIBUILD_SW__');
|
|
203
|
-
});
|
|
204
|
-
test('does not put its own spelling into the build environment', () => {
|
|
205
|
-
process.env.CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES = CI_DYNAMIC;
|
|
206
|
-
const resolver = resolverFor(probePipeline(PER_WORKFLOW_SLOTS), 'primary');
|
|
207
|
-
expect(resolver.get('LOCAL_PROPERTIES')).toBe(CI_DYNAMIC);
|
|
208
|
-
expect(resolver.has('CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES')).toBe(false);
|
|
209
|
-
expect(Object.keys(resolver.getAll()).filter((k) => k.startsWith('CIBUILD_SW__'))).toEqual([]);
|
|
210
|
-
});
|
|
211
|
-
test('carries a value the pipeline itself supplies, under the plain name', () => {
|
|
212
|
-
const resolver = resolverFor(probePipeline({ CIBUILD_SW__PRIMARY__LOCAL_PROPERTIES: CI_DYNAMIC }), 'primary');
|
|
213
|
-
expect(resolver.get('LOCAL_PROPERTIES')).toBe(CI_DYNAMIC);
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
describe('a value delivered the old way', () => {
|
|
217
|
-
test('still reaches a per-workflow slot under its plain name', async () => {
|
|
218
|
-
// A project whose secret was uploaded before any of this existed holds one
|
|
219
|
-
// flat `LOCAL_PROPERTIES`. Regenerating its pipeline must not strand that
|
|
220
|
-
// value: the slot declares the plain name, so step 5 imports it.
|
|
221
|
-
process.env.LOCAL_PROPERTIES = CI_DYNAMIC;
|
|
222
|
-
const { contents } = await land(probePipeline(PER_WORKFLOW_SLOTS), 'primary');
|
|
223
|
-
expect(contents).toBe(CI_DYNAMIC);
|
|
224
|
-
});
|
|
225
|
-
test('is beaten by the value scoped to the workflow being run', async () => {
|
|
226
|
-
process.env.LOCAL_PROPERTIES = CI_DYNAMIC;
|
|
227
|
-
process.env.CIBUILD_SW__RELEASE__LOCAL_PROPERTIES = PROD;
|
|
228
|
-
const { contents } = await land(probePipeline(PER_WORKFLOW_SLOTS), 'release');
|
|
229
|
-
expect(contents).toBe(PROD);
|
|
230
|
-
});
|
|
231
|
-
test('reaches a globally encoded slot too', () => {
|
|
232
|
-
// `CIBUILD_S__X` is the other half of the same convention: a secret with
|
|
233
|
-
// no workflow. A pipeline declaring it means `X`, in every workflow.
|
|
234
|
-
process.env.CIBUILD_S__LOCAL_PROPERTIES = CI_DYNAMIC;
|
|
235
|
-
const resolver = resolverFor(probePipeline({ CIBUILD_S__LOCAL_PROPERTIES: '' }), 'release');
|
|
236
|
-
expect(resolver.get('LOCAL_PROPERTIES')).toBe(CI_DYNAMIC);
|
|
237
|
-
expect(resolver.has('CIBUILD_S__LOCAL_PROPERTIES')).toBe(false);
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
describe('a pipeline that declares one flat slot', () => {
|
|
241
|
-
test('is untouched — every workflow reads the one value', async () => {
|
|
242
|
-
process.env.LOCAL_PROPERTIES = CI_DYNAMIC;
|
|
243
|
-
for (const workflow of ['primary', 'pull-request', 'release']) {
|
|
244
|
-
const { contents } = await land(probePipeline({ LOCAL_PROPERTIES: '' }), workflow);
|
|
245
|
-
expect(contents).toBe(CI_DYNAMIC);
|
|
246
|
-
rmSync(join(workdir, TARGET));
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
test('keeps refusing when nobody supplied it', async () => {
|
|
250
|
-
const { error } = await convert(probePipeline({ LOCAL_PROPERTIES: '' }), 'primary');
|
|
251
|
-
expect(error).toBeDefined();
|
|
252
|
-
expect(error.message).toContain('LOCAL_PROPERTIES');
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
//# sourceMappingURL=a-declared-slot-may-name-the-workflow-it-belongs-to.test.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A credential the pipeline declares and nobody supplied fails the build,
|
|
3
|
-
* naming itself, instead of being skipped with a warning.
|
|
4
|
-
*
|
|
5
|
-
* `file@1.0.0` carries `is_skippable: true` in every pipeline the Android
|
|
6
|
-
* generator emits, so an absent value printed `⚠️ X not set — skipping <file>`
|
|
7
|
-
* and returned success. The build then failed several steps later inside the
|
|
8
|
-
* project's own build tool, with an error naming the project rather than the
|
|
9
|
-
* value we dropped. Both failure modes in this defect were green, which is why
|
|
10
|
-
* it survived.
|
|
11
|
-
*
|
|
12
|
-
* The two absences are not the same absence, and the map the step already
|
|
13
|
-
* receives tells them apart by presence:
|
|
14
|
-
*
|
|
15
|
-
* - a `var_name` the pipeline **declares** and leaves empty is a key of the
|
|
16
|
-
* map with an empty value — the value was supposed to arrive as a secret
|
|
17
|
-
* and did not. After issue 01 that means it is in none of the four places
|
|
18
|
-
* a value can come from, so the diagnosis is not a guess.
|
|
19
|
-
* - a `var_name` **nothing declares** is not a key of the map at all — a
|
|
20
|
-
* release keystore on a debug workflow. Skipping is correct there.
|
|
21
|
-
*
|
|
22
|
-
* One case sits between them, and it decides the rule (issue 03 §2.3, Alex,
|
|
23
|
-
* 2026-09-08): the generator declares `KEYSTORE_BASE64` globally but emits its
|
|
24
|
-
* `file@` step in all three workflows, so a project that ran `ci init` with a
|
|
25
|
-
* keystore and never uploaded one would go from three green skips to three
|
|
26
|
-
* hard failures — including on `pull-request`, where nothing signs anything.
|
|
27
|
-
* So the question the step asks is the one that actually matters: **will the
|
|
28
|
-
* file be there when the build reads it?** A repository that carries the file
|
|
29
|
-
* keeps warning and building; only an absence with nothing behind it fails.
|
|
30
|
-
*/
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=a-missing-credential-is-loud.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a-missing-credential-is-loud.test.d.ts","sourceRoot":"","sources":["../../../src/yaml/a-missing-credential-is-loud.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG"}
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A credential the pipeline declares and nobody supplied fails the build,
|
|
3
|
-
* naming itself, instead of being skipped with a warning.
|
|
4
|
-
*
|
|
5
|
-
* `file@1.0.0` carries `is_skippable: true` in every pipeline the Android
|
|
6
|
-
* generator emits, so an absent value printed `⚠️ X not set — skipping <file>`
|
|
7
|
-
* and returned success. The build then failed several steps later inside the
|
|
8
|
-
* project's own build tool, with an error naming the project rather than the
|
|
9
|
-
* value we dropped. Both failure modes in this defect were green, which is why
|
|
10
|
-
* it survived.
|
|
11
|
-
*
|
|
12
|
-
* The two absences are not the same absence, and the map the step already
|
|
13
|
-
* receives tells them apart by presence:
|
|
14
|
-
*
|
|
15
|
-
* - a `var_name` the pipeline **declares** and leaves empty is a key of the
|
|
16
|
-
* map with an empty value — the value was supposed to arrive as a secret
|
|
17
|
-
* and did not. After issue 01 that means it is in none of the four places
|
|
18
|
-
* a value can come from, so the diagnosis is not a guess.
|
|
19
|
-
* - a `var_name` **nothing declares** is not a key of the map at all — a
|
|
20
|
-
* release keystore on a debug workflow. Skipping is correct there.
|
|
21
|
-
*
|
|
22
|
-
* One case sits between them, and it decides the rule (issue 03 §2.3, Alex,
|
|
23
|
-
* 2026-09-08): the generator declares `KEYSTORE_BASE64` globally but emits its
|
|
24
|
-
* `file@` step in all three workflows, so a project that ran `ci init` with a
|
|
25
|
-
* keystore and never uploaded one would go from three green skips to three
|
|
26
|
-
* hard failures — including on `pull-request`, where nothing signs anything.
|
|
27
|
-
* So the question the step asks is the one that actually matters: **will the
|
|
28
|
-
* file be there when the build reads it?** A repository that carries the file
|
|
29
|
-
* keeps warning and building; only an absence with nothing behind it fails.
|
|
30
|
-
*/
|
|
31
|
-
import { describe, test, expect, beforeEach, afterEach } from '@jest/globals';
|
|
32
|
-
import { spawnSync } from 'node:child_process';
|
|
33
|
-
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync, existsSync, } from 'node:fs';
|
|
34
|
-
import { tmpdir } from 'node:os';
|
|
35
|
-
import { dirname, join } from 'node:path';
|
|
36
|
-
import { convertYAMLToPipelineDef } from './converter.js';
|
|
37
|
-
import { StepValidator } from './step-validator.js';
|
|
38
|
-
import { clearRegistry, registerStep } from './steps/registry.js';
|
|
39
|
-
import { FileStepExecutor } from './steps/file.js';
|
|
40
|
-
const mockConfig = {
|
|
41
|
-
artifactsDir: '/test/artifacts',
|
|
42
|
-
maxConcurrentJobs: 1,
|
|
43
|
-
paths: {
|
|
44
|
-
buildsDir: '/test/builds',
|
|
45
|
-
cacheDir: '/test/cache',
|
|
46
|
-
derivedDataDir: '/test/derived-data',
|
|
47
|
-
},
|
|
48
|
-
interpreters: {
|
|
49
|
-
bash: '/bin/bash',
|
|
50
|
-
python: 'python3',
|
|
51
|
-
ruby: 'ruby',
|
|
52
|
-
node: 'node',
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
/** The 61-byte document from the PRD's reproduction. Synthetic. */
|
|
56
|
-
const JSON_CREDENTIAL = '{"project_info":{"project_id":"synthetic-probe"},"client":[]}';
|
|
57
|
-
const TARGET = 'app/google-services.json';
|
|
58
|
-
let workdir;
|
|
59
|
-
let previousCwd;
|
|
60
|
-
beforeEach(() => {
|
|
61
|
-
clearRegistry();
|
|
62
|
-
registerStep('file', new FileStepExecutor());
|
|
63
|
-
previousCwd = process.cwd();
|
|
64
|
-
workdir = mkdtempSync(join(tmpdir(), 'cibuild-missing-credential-'));
|
|
65
|
-
process.chdir(workdir);
|
|
66
|
-
// `workdir` is the pre-symlink path on macOS; the step resolves paths from
|
|
67
|
-
// CIBUILD_SOURCE_DIR, which is cwd, so read and write files the same way.
|
|
68
|
-
workdir = process.cwd();
|
|
69
|
-
delete process.env.GOOGLE_SERVICES_JSON;
|
|
70
|
-
delete process.env.KEYSTORE_BASE64;
|
|
71
|
-
delete process.env.OTHER_SECRET;
|
|
72
|
-
});
|
|
73
|
-
afterEach(() => {
|
|
74
|
-
process.chdir(previousCwd);
|
|
75
|
-
rmSync(workdir, { recursive: true, force: true });
|
|
76
|
-
clearRegistry();
|
|
77
|
-
delete process.env.GOOGLE_SERVICES_JSON;
|
|
78
|
-
delete process.env.KEYSTORE_BASE64;
|
|
79
|
-
delete process.env.OTHER_SECRET;
|
|
80
|
-
});
|
|
81
|
-
/**
|
|
82
|
-
* The shape the Android generator emits: empty slots under `app.envs` and one
|
|
83
|
-
* skippable `file@1.0.0` step per credential, in declaration order.
|
|
84
|
-
*/
|
|
85
|
-
function probePipeline(declared, fileSteps, options = {}) {
|
|
86
|
-
const skippable = options.skippable ?? true;
|
|
87
|
-
const app = declared
|
|
88
|
-
? { app: { envs: Object.entries(declared).map(([k, v]) => ({ [k]: v })) } }
|
|
89
|
-
: {};
|
|
90
|
-
return {
|
|
91
|
-
format_version: '1',
|
|
92
|
-
...app,
|
|
93
|
-
workflows: {
|
|
94
|
-
probe: {
|
|
95
|
-
steps: fileSteps.map((inputs) => ({
|
|
96
|
-
'file@1.0.0': {
|
|
97
|
-
title: `Setup ${String(inputs.var_name)}`,
|
|
98
|
-
is_skippable: skippable,
|
|
99
|
-
inputs,
|
|
100
|
-
},
|
|
101
|
-
})),
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function writeSecretStore(global) {
|
|
107
|
-
writeFileSync(join(workdir, '.cibuild-secrets.json'), JSON.stringify({ global, workflows: {} }), { mode: 0o600 });
|
|
108
|
-
}
|
|
109
|
-
/** Puts a file in the checkout, the way a repository that carries one does. */
|
|
110
|
-
function commitToCheckout(relPath, contents) {
|
|
111
|
-
const target = join(workdir, relPath);
|
|
112
|
-
mkdirSync(dirname(target), { recursive: true });
|
|
113
|
-
writeFileSync(target, contents, 'utf-8');
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Converts the pipeline and runs the generated steps the way the runner does,
|
|
117
|
-
* then reads back whatever landed at `target`.
|
|
118
|
-
*/
|
|
119
|
-
async function land(pipeline, target = TARGET) {
|
|
120
|
-
const result = await convertYAMLToPipelineDef(pipeline, mockConfig, 'probe');
|
|
121
|
-
const chunks = [...result.warnings];
|
|
122
|
-
for (const step of result.pipeline.steps) {
|
|
123
|
-
const scriptPath = join(workdir, `__step_${step.id}.sh`);
|
|
124
|
-
writeFileSync(scriptPath, step.script, 'utf-8');
|
|
125
|
-
const proc = spawnSync('bash', [scriptPath], {
|
|
126
|
-
cwd: workdir,
|
|
127
|
-
encoding: 'utf-8',
|
|
128
|
-
env: { ...process.env },
|
|
129
|
-
});
|
|
130
|
-
expect(proc.status).toBe(0);
|
|
131
|
-
chunks.push(proc.stdout ?? '', proc.stderr ?? '');
|
|
132
|
-
}
|
|
133
|
-
const landedAt = join(workdir, target);
|
|
134
|
-
return {
|
|
135
|
-
output: chunks.join('\n'),
|
|
136
|
-
bytes: existsSync(landedAt) ? readFileSync(landedAt) : undefined,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
/** The conversion's outcome, without letting a throw escape the assertion. */
|
|
140
|
-
async function convert(pipeline) {
|
|
141
|
-
try {
|
|
142
|
-
const result = await convertYAMLToPipelineDef(pipeline, mockConfig, 'probe');
|
|
143
|
-
return { steps: result.pipeline.steps };
|
|
144
|
-
}
|
|
145
|
-
catch (error) {
|
|
146
|
-
return { error: error };
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
describe('a declared credential nothing supplied', () => {
|
|
150
|
-
test('fails, naming the key and the target path', async () => {
|
|
151
|
-
const { error, steps } = await convert(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [
|
|
152
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
153
|
-
]));
|
|
154
|
-
expect(error).toBeDefined();
|
|
155
|
-
expect(error.message).toContain('GOOGLE_SERVICES_JSON');
|
|
156
|
-
expect(error.message).toContain(TARGET);
|
|
157
|
-
// Not a stack trace and not a step that runs: conversion is what builds
|
|
158
|
-
// the step list, so nothing at all is handed to the runner.
|
|
159
|
-
expect(steps).toBeUndefined();
|
|
160
|
-
});
|
|
161
|
-
test('says both places the value can come from', async () => {
|
|
162
|
-
const { error } = await convert(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [
|
|
163
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
164
|
-
]));
|
|
165
|
-
// A user reading this should not have to know that a slot, an upload and
|
|
166
|
-
// a `file@` step are three separate things.
|
|
167
|
-
expect(error.message).toContain('ci secrets add GOOGLE_SERVICES_JSON');
|
|
168
|
-
expect(error.message).toMatch(/organization or pipeline secret/);
|
|
169
|
-
});
|
|
170
|
-
test('is_skippable does not turn it into a pass', async () => {
|
|
171
|
-
// Every `file@` step the Android generator emits carries this, which is
|
|
172
|
-
// the whole reason the defect was invisible.
|
|
173
|
-
const skippable = await convert(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' }], { skippable: true }));
|
|
174
|
-
const notSkippable = await convert(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' }], { skippable: false }));
|
|
175
|
-
expect(skippable.error).toBeDefined();
|
|
176
|
-
expect(notSkippable.error).toBeDefined();
|
|
177
|
-
});
|
|
178
|
-
test('fails on the first unfilled slot, not the last and not all three', async () => {
|
|
179
|
-
// What a real Android pipeline carries: three slots, none filled.
|
|
180
|
-
const { error } = await convert(probePipeline({
|
|
181
|
-
KEYSTORE_BASE64: '',
|
|
182
|
-
KEYSTORE_PROPERTIES: '',
|
|
183
|
-
GOOGLE_SERVICES_JSON: '',
|
|
184
|
-
}, [
|
|
185
|
-
{
|
|
186
|
-
target_path: 'release.keystore',
|
|
187
|
-
var_name: 'KEYSTORE_BASE64',
|
|
188
|
-
base64_encoded: true,
|
|
189
|
-
},
|
|
190
|
-
{ target_path: 'keystore.properties', var_name: 'KEYSTORE_PROPERTIES' },
|
|
191
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
192
|
-
]));
|
|
193
|
-
expect(error).toBeDefined();
|
|
194
|
-
expect(error.message).toContain('KEYSTORE_BASE64');
|
|
195
|
-
expect(error.message).not.toContain('KEYSTORE_PROPERTIES');
|
|
196
|
-
expect(error.message).not.toContain('GOOGLE_SERVICES_JSON');
|
|
197
|
-
});
|
|
198
|
-
test('no secret value appears in the message', async () => {
|
|
199
|
-
// The failing slot has no value by definition, so the assertion that
|
|
200
|
-
// means anything is about the values the build *does* hold.
|
|
201
|
-
process.env.OTHER_SECRET = JSON_CREDENTIAL;
|
|
202
|
-
const { error } = await convert(probePipeline({ OTHER_SECRET: '', GOOGLE_SERVICES_JSON: '' }, [
|
|
203
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
204
|
-
]));
|
|
205
|
-
expect(error).toBeDefined();
|
|
206
|
-
expect(error.message).not.toContain(JSON_CREDENTIAL);
|
|
207
|
-
expect(error.message).not.toContain('synthetic-probe');
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
describe('a credential the repository already carries', () => {
|
|
211
|
-
test('warns and proceeds — the file will be there when the build reads it', async () => {
|
|
212
|
-
// The `pull-request` collision: the generator declares KEYSTORE_BASE64
|
|
213
|
-
// globally and emits its step on every workflow, so a project whose
|
|
214
|
-
// keystore is in the repository must not be refused a build over a value
|
|
215
|
-
// it never needed.
|
|
216
|
-
commitToCheckout('release.keystore', 'a keystore the repository carries');
|
|
217
|
-
const { output } = await land(probePipeline({ KEYSTORE_BASE64: '' }, [
|
|
218
|
-
{
|
|
219
|
-
target_path: 'release.keystore',
|
|
220
|
-
var_name: 'KEYSTORE_BASE64',
|
|
221
|
-
base64_encoded: true,
|
|
222
|
-
},
|
|
223
|
-
]), 'release.keystore');
|
|
224
|
-
expect(output).toContain('KEYSTORE_BASE64');
|
|
225
|
-
expect(output).toContain('release.keystore');
|
|
226
|
-
// The escape hatch has to be visible in the log, or a build that passes
|
|
227
|
-
// this way is unexplainable to whoever reads it later.
|
|
228
|
-
expect(output).toMatch(/already in the checkout/);
|
|
229
|
-
});
|
|
230
|
-
test('leaves the file it found exactly as it was', async () => {
|
|
231
|
-
const carried = 'the repository\'s own google-services.json';
|
|
232
|
-
commitToCheckout(TARGET, carried);
|
|
233
|
-
const { bytes } = await land(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [
|
|
234
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
235
|
-
]));
|
|
236
|
-
expect(bytes?.toString('utf-8')).toBe(carried);
|
|
237
|
-
});
|
|
238
|
-
test('an uploaded value still wins over the one in the checkout', async () => {
|
|
239
|
-
// A repository carrying a placeholder is the ordinary case for
|
|
240
|
-
// google-services.json, and the point of the upload is to replace it.
|
|
241
|
-
commitToCheckout(TARGET, 'placeholder committed for local development');
|
|
242
|
-
process.env.GOOGLE_SERVICES_JSON = JSON_CREDENTIAL;
|
|
243
|
-
const { output, bytes } = await land(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [
|
|
244
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
245
|
-
]));
|
|
246
|
-
expect(output).toContain('✓ Written google-services.json');
|
|
247
|
-
expect(bytes?.toString('utf-8')).toBe(JSON_CREDENTIAL);
|
|
248
|
-
});
|
|
249
|
-
});
|
|
250
|
-
describe('what issue 03 must not change', () => {
|
|
251
|
-
test('an undeclared key still warns and passes, is_skippable and all', async () => {
|
|
252
|
-
// Issue 01's class-A case, and the one this change is most likely to
|
|
253
|
-
// break: HOME exists in every environment this runs in, and nothing
|
|
254
|
-
// declares it.
|
|
255
|
-
expect(process.env.HOME).toBeTruthy();
|
|
256
|
-
const { output, bytes } = await land(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [
|
|
257
|
-
{ target_path: 'home.txt', var_name: 'HOME' },
|
|
258
|
-
]), 'home.txt');
|
|
259
|
-
expect(output).toContain('HOME not set — skipping home.txt');
|
|
260
|
-
expect(bytes).toBeUndefined();
|
|
261
|
-
});
|
|
262
|
-
test('a declared value from the local store still writes', async () => {
|
|
263
|
-
writeSecretStore({ GOOGLE_SERVICES_JSON: JSON_CREDENTIAL });
|
|
264
|
-
const { output, bytes } = await land(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [
|
|
265
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
266
|
-
]));
|
|
267
|
-
expect(output).toContain('✓ Written google-services.json');
|
|
268
|
-
expect(bytes?.toString('utf-8')).toBe(JSON_CREDENTIAL);
|
|
269
|
-
});
|
|
270
|
-
test('a declared value from the dispatched environment still writes', async () => {
|
|
271
|
-
process.env.GOOGLE_SERVICES_JSON = JSON_CREDENTIAL;
|
|
272
|
-
const { output, bytes } = await land(probePipeline({ GOOGLE_SERVICES_JSON: '' }, [
|
|
273
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
274
|
-
]));
|
|
275
|
-
expect(output).toContain('✓ Written google-services.json');
|
|
276
|
-
expect(bytes?.toString('utf-8')).toBe(JSON_CREDENTIAL);
|
|
277
|
-
});
|
|
278
|
-
test('a value the YAML itself supplies still writes', async () => {
|
|
279
|
-
const { output, bytes } = await land(probePipeline({ GOOGLE_SERVICES_JSON: JSON_CREDENTIAL }, [
|
|
280
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
281
|
-
]));
|
|
282
|
-
expect(output).toContain('✓ Written google-services.json');
|
|
283
|
-
expect(bytes?.toString('utf-8')).toBe(JSON_CREDENTIAL);
|
|
284
|
-
});
|
|
285
|
-
test('ci validate still passes on a pipeline with empty slots', async () => {
|
|
286
|
-
// Option 3 was rejected so validation does not start refusing builds
|
|
287
|
-
// that are green today. This is the line that holds it.
|
|
288
|
-
const pipeline = probePipeline({ KEYSTORE_BASE64: '', GOOGLE_SERVICES_JSON: '' }, [
|
|
289
|
-
{
|
|
290
|
-
target_path: 'release.keystore',
|
|
291
|
-
var_name: 'KEYSTORE_BASE64',
|
|
292
|
-
base64_encoded: true,
|
|
293
|
-
},
|
|
294
|
-
{ target_path: TARGET, var_name: 'GOOGLE_SERVICES_JSON' },
|
|
295
|
-
]);
|
|
296
|
-
const validator = new StepValidator(pipeline, 'probe', mockConfig);
|
|
297
|
-
const result = await validator.validateWorkflow();
|
|
298
|
-
expect(result.valid).toBe(true);
|
|
299
|
-
});
|
|
300
|
-
});
|
|
301
|
-
//# sourceMappingURL=a-missing-credential-is-loud.test.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A requirement that cannot be checked yet must not name a step as its source
|
|
3
|
-
* unless a step is its source.
|
|
4
|
-
*
|
|
5
|
-
* Nine runtime requirements — `gradlew` in the three Android steps and the
|
|
6
|
-
* Bitrise gradle wrapper, `project_path` in five Xcode steps — carried
|
|
7
|
-
* `providedBy: 'git-clone'`. The lookup behind `providedBy` is keyed by step
|
|
8
|
-
* *output names* (`CIBUILD_SOURCE_DIR`, `GIT_CLONE_COMMIT_HASH`, …) and these
|
|
9
|
-
* requirements are named after a path or a command, so it could never match:
|
|
10
|
-
* every Android validation printed "'gradlew' will be provided by 'git-clone'
|
|
11
|
-
* step at runtime" whether the step was in the workflow or not.
|
|
12
|
-
*
|
|
13
|
-
* `git-clone` provides no files at all — the runner's checkout does, before
|
|
14
|
-
* any step runs — and once it is out of the curated templates the sentence
|
|
15
|
-
* names a step the pipeline does not contain.
|
|
16
|
-
*/
|
|
17
|
-
import './steps/index.js';
|
|
18
|
-
//# sourceMappingURL=a-runtime-requirement-names-a-real-provider.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"a-runtime-requirement-names-a-real-provider.test.d.ts","sourceRoot":"","sources":["../../../src/yaml/a-runtime-requirement-names-a-real-provider.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,kBAAkB,CAAC"}
|