diff --git a/.circleci/config.yml b/.circleci/config.yml index a29ccb8..c209e80 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: paths: . publish: docker: - - image: circleci/node:8 + - image: circleci/node:12 environment: - PATH: '~/bin:/opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' steps: diff --git a/src/commands/setup_macos_executor.yml b/src/commands/setup_macos_executor.yml index b75ef09..f11d183 100644 --- a/src/commands/setup_macos_executor.yml +++ b/src/commands/setup_macos_executor.yml @@ -1,10 +1,16 @@ description: Installs the required packages to build and test Android and iOS applications on the MacOS executor. You need to run this before running any other command on those executors. +parameters: + node_version: + description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1"). + type: string + default: '10' + steps: - run: name: Configure Environment Variables command: | - echo 'export PATH="$PATH:/usr/local/opt/node@8/bin:~/.yarn/bin:~/project/node_modules/.bin:~/project/example/node_modules/.bin"' >> $BASH_ENV + echo 'export PATH="$PATH:/usr/local/opt/node@<>/bin:~/.yarn/bin:~/project/node_modules/.bin:~/project/example/node_modules/.bin"' >> $BASH_ENV echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV echo 'export PATH="$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH"' >> $BASH_ENV @@ -21,7 +27,7 @@ steps: command: | HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask >/dev/null - HOMEBREW_NO_AUTO_UPDATE=1 brew install node@8 >/dev/null + HOMEBREW_NO_AUTO_UPDATE=1 brew install node@<> >/dev/null HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-sdk >/dev/null touch .watchmanconfig diff --git a/src/examples/full.yml b/src/examples/full.yml index 1f8c62d..066e5b0 100644 --- a/src/examples/full.yml +++ b/src/examples/full.yml @@ -10,7 +10,9 @@ usage: # Custom jobs which are not part of the Orb jobs: checkout_code: - executor: rn/linux_js + executor: + name: rn/linux_js + node_version: '10' steps: - checkout - persist_to_workspace: @@ -87,6 +89,7 @@ usage: # Build the iOS app in release mode and do not run tests - rn/ios_build: name: build_ios_release + node_version: '10' project_path: ios/Example.xcodeproj device: "iPhone X" build_configuration: Release @@ -96,6 +99,7 @@ usage: # Build and test the iOS app in release mode - rn/ios_build_and_test: + node_version: '10' project_path: "ios/Example.xcodeproj" device: "iPhone X" build_configuration: "Release" diff --git a/src/executors/linux_js.yml b/src/executors/linux_js.yml index 6f8deee..590b98e 100644 --- a/src/executors/linux_js.yml +++ b/src/executors/linux_js.yml @@ -2,7 +2,7 @@ parameters: node_version: description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1"). type: string - default: '8' + default: '10' resource_class: description: Changes the resource class of the executor. Requires a support request to enable the resource_class parameter. See https://circleci.com/docs/2.0/configuration-reference/#resource_class type: string diff --git a/src/jobs/android_test.yml b/src/jobs/android_test.yml index 98d2dd0..3b6c813 100644 --- a/src/jobs/android_test.yml +++ b/src/jobs/android_test.yml @@ -47,11 +47,17 @@ parameters: description: A custom command to run right after yarn install. type: string default: "" + # For macos executor + node_version: + description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1"). + type: string + default: '10' steps: - attach_workspace: at: <> - - setup_macos_executor + - setup_macos_executor: + node_version: <> - yarn_install - when: condition: <> diff --git a/src/jobs/ios_build.yml b/src/jobs/ios_build.yml index be6b048..5d47dcc 100644 --- a/src/jobs/ios_build.yml +++ b/src/jobs/ios_build.yml @@ -48,6 +48,11 @@ parameters: description: A custom command to run right after yarn install. type: string default: "" + # For macos executor + node_version: + description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1"). + type: string + default: '10' steps: - when: @@ -59,7 +64,8 @@ steps: steps: - attach_workspace: at: <> - - setup_macos_executor + - setup_macos_executor: + node_version: <> - yarn_install - when: condition: <> diff --git a/src/jobs/ios_build_and_test.yml b/src/jobs/ios_build_and_test.yml index be94090..fa93f25 100644 --- a/src/jobs/ios_build_and_test.yml +++ b/src/jobs/ios_build_and_test.yml @@ -58,6 +58,11 @@ parameters: description: A custom command to run right after yarn install. type: string default: "" + # For macos executor + node_version: + description: The version of Node to use. This can be either a major version ("8"), a major and minor ("8.4"), or a fully qualified version ("8.4.1"). + type: string + default: '10' steps: - when: @@ -69,7 +74,8 @@ steps: steps: - attach_workspace: at: <> - - setup_macos_executor + - setup_macos_executor: + node_version: <> - ios_simulator_start: device: <> - yarn_install