expo / turtle

Standalone app builder service
MIT License
384 stars 29 forks source link

Turtle build command not building any files when running on CircleCI, despite not throwing error #291

Closed tom-nuyts closed 3 years ago

tom-nuyts commented 3 years ago

Question Checklist

Question Subject

Turtle build command not building any files when running on CircleCI.

Question Description

When trying to run the turtle build:android command on CircleCI, it doesn't produce any files, despite not throwing any errors. I also already SSH'd into my container and tried to do the steps manually, and this did work.

Now, I'm completely lost on what I can do to fix this, especially because I don't receive any information regarding the build. There's no error thrown at all and all steps run before, are executed right. Including the turtle setup. As you can see in the screenshot, the build time is also 0s

Output of CircleCI: Screenshot_2

Piece of my config.yml file:

executors:
  android:
    resource_class: xlarge
    docker:
      - image: dsokal/expo-turtle-android
    environment:
      EXPO_SDK_VERSION: 38.0.0
      TURTLE_VERSION: 0.18.1
      PLATFORM: android
      YARN_CACHE_FOLDER: ~/yarn_cache

commands:
  expo-login:
    steps:
      - run:
          command: npx expo-cli login -u $EXPO_USERNAME -p $EXPO_PASSWORD
          name: Log in to Expo
  publish-mobile:
    parameters:
      config:
        type: string
    steps:
      - checkout
      - run:
          command: cd mobile && npm ci
          name: Installing dependencies
      - run:
          command: |
            cd mobile
            npx expo-cli publish --config << parameters.config >> --release-channel $EXPO_RELEASE_CHANNEL --non-interactive --max-workers 1
          name: Publish expo app
  build-mobile:
    parameters:
      project_name:
        type: string
    steps:
      - checkout
      - run:
          command: |
            cd mobile
            npm ci
            sudo npm install --global expo-cli turtle-cli@$TURTLE_VERSION --save --unsafe-perm
          name: Add dependencies, Expo CLI and Turtle CLI
      - run:
          command: sudo turtle setup:$PLATFORM --sdk-version $EXPO_SDK_VERSION
          name: Setting up environment for Turtle
      - run:
          command: |
            cd mobile
            sudo turtle build:android \
              -o ~/<< parameters.project_name >>.aab \
              --keystore-path $KEYSTORE_PATH \
              --keystore-alias $KEYSTORE_ALIAS \
              --public-url https://exp.host/xxx/<< parameters.project_name >>/index.exp?release-channel=staging&sdkVersion=38.0.0
          name: Build Android
      - store_artifacts:
          path: ~/<< parameters.project_name >>.aab            

jobs:
  publish-mobile-staging:
    parameters:
      app_name:
        type: string
    environment:
      EXPO_RELEASE_CHANNEL: staging
    docker:
      - image: cimg/node:14.15.1
    steps:
      - expo-login
      - publish-mobile:
          config: tenants/<< parameters.app_name >>/app.config.js
  build-android:
    environment:
      KEYSTORE_PATH: xxx
      KEYSTORE_ALIAS: xxx
      EXPO_ANDROID_KEYSTORE_PASSWORD: xxx
      EXPO_ANDROID_KEY_PASSWORD: xxx
      CONFIG: xxx
    executor: android
    steps:
      - build-mobile:
          project_name: xxx

orbs:
  node: circleci/node@4.1.0

workflows:
  deploy-mobile:
    jobs:
      - publish-mobile-staging:
          matrix:
            parameters:
              app_name:
                - xxx
                - xxx
      - build-android:
          requires:
            - publish-mobile-staging
tom-nuyts commented 3 years ago

Found the problem. The issue was due to the public url. Apparently, at least in my case, I had to put double quotes around the url, after which the command did start to throw errors and information again 😃

- run:
    command: |
      cd mobile
      sudo turtle build:android \
        -o ~/<< parameters.project_name >>.aab \
        --keystore-path $KEYSTORE_PATH \
        --keystore-alias $KEYSTORE_ALIAS \
        --public-url "https://exp.host/xxx/<< parameters.project_name >>/index.exp?release-channel=staging&sdkVersion=38.0.0"
    name: Build Android