react-native/scripts
Héctor Ramos aae3a7816e Use one time password when publishing to npm (#20701)
Summary:
This pull request addresses the failing publish-npm.js script from earlier this week. For background, last month we reset all npm access tokens for any package related to Facebook, and we now require all accounts with publish permissions to have two factor enabled.

The publish-npm.js script relied on one such token that is configured in Circle CI as a envvar. The token has been updated in Circle CI, but we now need a way of passing the one time password to npm.

With this PR, we can now grab the otp from Circle CI's envvars. Considering otps are ephemeral, this requires the NPM_CONFIG_OTP envvar to be set by someone with publishing permissions anytime a new release will be pushed to npm. The token is short lived, but it would still be good to clear the envvar after the package is published. Circle CI envvars are not passed on to PR/forked builds.

This PR is effectively a breaking change for the release process, as the publish step will not succeed if the OTP is not valid.

OTPs are short-lived, and the publish_npm_package job will definitely outlive the token. Unfortunately this will require some timing to get right, but the alternative is to ssh into the Circle CI machine and re-run the `npm publish --otp` command, which again would still require someone with publish access to provide the otp.
Pull Request resolved: https://github.com/facebook/react-native/pull/20701

Differential Revision: D9478488

Pulled By: hramos

fbshipit-source-id: 6af631a9cb425271b98c03d158aec390ebc95304
2018-08-22 23:32:27 -07:00
..
circleci Run failing tests in CI, without turning CI red (#20775) 2018-08-22 12:31:19 -07:00
versiontemplates Removed last traces of @providesModule from React Native 2018-04-26 08:30:54 -07:00
.packager.env Move YGStyle to seperate file and add constructors 2018-02-20 05:55:36 -08:00
.tests.env Bump compileSdkVersion to 27 and buildToolsVersion to 27.0.3 (#20777) 2018-08-22 23:19:42 -07:00
android-e2e-test.js Prettier the rest of ReactNative 2018-05-11 13:52:30 -07:00
android-setup.sh Bump Android NDK to r17b (#20357) 2018-07-30 14:02:11 -07:00
bump-oss-version.js Prettier files with shebang 2018-05-11 13:52:30 -07:00
ios-configure-glog.sh fix undefined_arch error in Xcode 10 beta (#19841) 2018-06-28 15:32:39 -07:00
ios-install-third-party.sh OSS: upgrade Folly 2016.09.26 => 2016.10.31 2018-04-13 17:33:23 -07:00
launchPackager.bat Fix for 17497 (#17498) 2018-06-28 14:17:38 -07:00
launchPackager.command Uniformizes how THIS_DIR is computed in xplat/js 2018-07-19 05:16:22 -07:00
objc-test-ios.sh Fix iOS e2e tests: bump react-native-babel-preset to ^5 (#19625) 2018-06-10 17:08:56 -07:00
objc-test-tvos.sh Fix iOS e2e tests: bump react-native-babel-preset to ^5 (#19625) 2018-06-10 17:08:56 -07:00
objc-test.sh Fix RNTester on Windows (#19974) 2018-08-03 13:32:49 -07:00
packager.sh Uniformizes how THIS_DIR is computed in xplat/js 2018-07-19 05:16:22 -07:00
process-podspecs.sh GLog fix on case sensitive APFS macOS 2018-01-28 22:29:51 -08:00
publish-npm.js Use one time password when publishing to npm (#20701) 2018-08-22 23:32:27 -07:00
react-native-xcode.sh Generate ip.txt before SKIP_BUNDLING check (#20554) 2018-08-20 18:32:04 -07:00
run-android-ci-instrumentation-tests.js Prettier the rest of ReactNative 2018-05-11 13:52:30 -07:00
run-android-emulator.sh Uniformizes how THIS_DIR is computed in xplat/js 2018-07-19 05:16:22 -07:00
run-android-local-integration-tests.sh Skip flaky ScrollView tests 2017-03-13 13:30:31 -07:00
run-android-local-unit-tests.sh Improve Android testing scripts 2016-12-13 17:13:35 -08:00
run-ci-e2e-tests.js Fix iOS e2e tests: bump react-native-babel-preset to ^5 (#19625) 2018-06-10 17:08:56 -07:00
run-instrumentation-tests-via-adb-shell.sh Fix Android comment and docblock typos 2017-12-03 20:16:36 -08:00
sync-css-layout.sh Update to MIT license 2018-02-16 18:31:53 -08:00
test-manual-e2e.sh Move HelloWorld template to a single index.js entry point 2017-08-03 14:02:43 -07:00
try-n-times.js Prettier the rest of ReactNative 2018-05-11 13:52:30 -07:00
validate-android-device-env.sh Consolidate CI/local test scripts 2018-05-15 17:27:52 -07:00
validate-android-sdk.sh Improve Android testing scripts 2016-12-13 17:13:35 -08:00
validate-android-test-env.sh Update buck website 2018-06-27 12:03:21 -07:00
validate-ios-test-env.sh Add iOS Validate Environment Script (#19750) 2018-08-01 20:46:58 -07:00