Skip to content

Commit

Permalink
Step 494 skip tfa prompt (#70)
Browse files Browse the repository at this point in the history
* Update Go modules.

* Remove step binary.

* New test wf for testing TFA prompt skipping + Set SPACESHIP_SKIP_2FA_UPGRADE env var.

Set SPACESHIP_SKIP_2FA_UPGRADE env var.

Revert "Revert "New test wf for testing TFA prompt skipping.""

This reverts commit ec3a5e0.

* Revert auth-test-apple-id-tfa-prompt test case.

* Add manual test case for TFA disabled Apple ID testing.

* Update appleauth and devportalservice dependencies.

* Fix auth-test-apple-id-connection-globally-set-app-specific-password test case.
  • Loading branch information
godrei authored Feb 9, 2021
1 parent 185f6d5 commit 9ca0768
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 45 deletions.
20 changes: 18 additions & 2 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ workflows:
before_run:
- auth-test-api-key-connection
- auth-test-apple-id-connection
- auth-test-apple-id-connection-globally-set-app-specific-password
- auth-test-api-key-input
- auth-test-apple-id-connection-globally-set-app-specific-password

cache:
envs:
Expand Down Expand Up @@ -86,9 +86,11 @@ workflows:
- work_dir: ./
- verbose_log: "yes"
- connection: apple_id
- app_password: $FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
- app_password: $APP_SPECIFIC_PASSWORD

auth-test-apple-id-connection-globally-set-app-specific-password:
envs:
- FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: $APP_SPECIFIC_PASSWORD
before_run:
- _auth_prepare
steps:
Expand Down Expand Up @@ -124,6 +126,20 @@ workflows:
- api_issuer: $AUTH_API_ISSUER
- api_key_path: $BITRISEIO_AUTH_API_KEY_PATH_URL

auth-test-tfa-disabled-apple-id-connection:
title: Test Apple ID connection authentication using TFA disabled account
description: |-
Use this workflow for manual testing TFA disabled Apple ID.
before_run:
- _auth_prepare
steps:
- path::./:
inputs:
- lane: release
- work_dir: ./
- verbose_log: "yes"
- connection: apple_id

_auth_prepare:
envs:
- SAMPLE_APP_URL: "https://github.com/bitrise-samples/sample-apps-fastlane-test.git"
Expand Down
2 changes: 2 additions & 0 deletions credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ func FastlaneAuthParams(authConfig appleauth.Credentials) (map[string]string, er
envs := make(map[string]string)
if authConfig.AppleID != nil {
// Set as environment variables
envs["SPACESHIP_SKIP_2FA_UPGRADE"] = "1"

if authConfig.AppleID.Username != "" {
envs["FASTLANE_USER"] = authConfig.AppleID.Username
envs["DELIVER_USERNAME"] = authConfig.AppleID.Username
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/bitrise-io/go-utils v0.0.0-20201211082830-859032e9adf0
github.com/bitrise-io/stepman v0.0.0-20190813144014-10564a4888a6 // indirect
github.com/bitrise-steplib/bitrise-step-android-unit-test v0.0.0-20190902203028-ff8e682d8645
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210202154324-7c20293c7cf0
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210209134909-4d779ddbe073
github.com/google/go-cmp v0.5.4 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/kr/pretty v0.1.0 // indirect
Expand Down
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ github.com/bitrise-io/stepman v0.0.0-20190813144014-10564a4888a6 h1:/GnB2kEaO/6K
github.com/bitrise-io/stepman v0.0.0-20190813144014-10564a4888a6/go.mod h1:hGCjd8leP411yt5QkQi+VBNWGxIZ4H02LNIVeKBeMUk=
github.com/bitrise-steplib/bitrise-step-android-unit-test v0.0.0-20190902203028-ff8e682d8645 h1:9molXzIAxnKStwV78lt7MSgUQwxIWl4+r9/oYTQA7no=
github.com/bitrise-steplib/bitrise-step-android-unit-test v0.0.0-20190902203028-ff8e682d8645/go.mod h1:0yqqJw+MqwsfHKq4pL90IoSYskLF91oDCyyZYnIehWA=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210202154324-7c20293c7cf0 h1:DKE9KQEbdO4iGpDQF1uiaYtgFOyu/lH1srg3ufAMURI=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210202154324-7c20293c7cf0/go.mod h1:mG5kKjSyK3sZNp7e5QpFBAtxJRWeA+4PSMh3ZfwggNs=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210204114640-c91fdc7c90cd h1:ieyOJ5xYu0nxVf9dpyRCg3RgS/Uhc3hfNBI6RUWms/Q=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210204114640-c91fdc7c90cd/go.mod h1:mG5kKjSyK3sZNp7e5QpFBAtxJRWeA+4PSMh3ZfwggNs=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210209130532-8386805c9389 h1:NQfjDuwNE/LhjTkMV7+PmRE/c+KFPxXJTZeW6TfEptY=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210209130532-8386805c9389/go.mod h1:mG5kKjSyK3sZNp7e5QpFBAtxJRWeA+4PSMh3ZfwggNs=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210209134909-4d779ddbe073 h1:348wxtooA7rjIe0pXLJwVPwddrURmq+6hCWcfE6hACQ=
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210209134909-4d779ddbe073/go.mod h1:mG5kKjSyK3sZNp7e5QpFBAtxJRWeA+4PSMh3ZfwggNs=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
Binary file removed steps-fastlane
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ github.com/bitrise-io/go-utils/sliceutil
github.com/bitrise-io/stepman/models
# github.com/bitrise-steplib/bitrise-step-android-unit-test v0.0.0-20190902203028-ff8e682d8645
github.com/bitrise-steplib/bitrise-step-android-unit-test/cache
# github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210202154324-7c20293c7cf0
# github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver v0.0.0-20210209134909-4d779ddbe073
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver/appleauth
github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver/devportalservice
# github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
Expand Down

0 comments on commit 9ca0768

Please sign in to comment.