LoginSignup
2
2

More than 5 years have passed since last update.

react-native, android, circleCI2.0, fastlaneでdeploy gateへのテスト版自動配信

Last updated at Posted at 2017-09-11

ブログにも記事をうつしました。react-native, android, circleCI2.0, fastlaneでdeploy gateへのテスト版自動配信

情報が足りなくてとても辛かったので、情報共有に。

システムの作動順序

  1. githubのstagingにPR
  2. merge
  3. circleCIでbuild用に必要な環境構築
  4. fastlane経由ででdeploygateへのビルド&デプロイコマンド叩く

書くことが増えるのも嫌なので、ここでは3.のcircleCIの設定だけにフォーカスする。

設定ファイル

諸々の説明は公式ドキュメントを参考にした。

circleci/config.yml
version: 2
jobs:
  build:
    docker:
      - image: circleci/android:api-25-alpha

    working_directory: ~/client

    environment:
      JVM_OPTS: -Xmx3200m
      ANDROID_HOME: /opt/android/sdk
    branches:
      only:
        - staging
    steps:
      - checkout
      - run:
          name: install android ndk
          command: |
            wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
            sudo apt-get install p7zip-full
            7z x android-ndk-r10e-linux-x86_64.zip
            rm android-ndk-r10e-linux-x86_64.zip
            sudo mv android-ndk-r10e /opt/android
            export ANDROID_NDK_HOME=/opt/android/android-ndk-r10e
            export PATH=${PATH}:$ANDROID_NDK_HOME
            curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
            sudo apt-get install -y nodejs
            npm install
            sudo apt-get install ruby2.3 ruby-dev make g++
            sudo gem install fastlane
            cd $HOME/client/android && fastlane android dg
      - store_artifacts:
          path: app/build/reports
          destination: reports

はまりポイントは、次の点くらいかな、、と思います。

  • nodejsをdebian環境にインストールする
  • android ndkのパッケージをどこからダウンロードするか

あれ、だいぶ薄い記事になったな。。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2