Skip to main content

Gitlab

To automatically deply your Android or iOS Apps to TestFairy by using GitLab, follow the steps below:

  1. On the TestFairy dashboard, navigate to Preferences > Upload API Key.

    testfairy upload key
  2. Copy your API key and go to your application's project Settings > CI/CD > Variables in GitLab.

  3. Add a variable called TESTFAIRY_API_KEY to the list with the value of your Upload API key.

    gitlab secret keys
    • To deploy, add a job to your .gitlab-ci.yml configuration using fastlane or curl (example below).

      stages:
      - deploy

      deploy:
      stage: deploy
      only:
      - master
      script:
      - |
      curl \
      -A "GitLab CI" \
      -F api_key="${TESTFAIRY_API_KEY}" \
      -F comment="GitLab Pipeline build ${CI_COMMIT_SHA}" \
      -F file=@android.apk \
      https://upload.testfairy.com/api/upload/
note

Replace the -F file=@android.apk argument with a path to your APK or IPA.

For a complete list of available options, visit the Upload API reference guide /testfairy/api-reference/upload-api.