Giter VIP home page Giter VIP logo

fastlane-plugin-applivery's Introduction

Fastlane Applivery plugin

fastlane Plugin Badge Gem Version

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-applivery, add it to your project by running:

fastlane add_plugin applivery

About Applivery.com

With Applivery.com you can easily distribute your iOS and Android Apps throughout a customizable platform with no need of your users have to be registered on it.

The main purpose of this plugin is to upload a new iOS or Android build to Applivery.com.

If you usually use Fastlane tools to automate the most common development tasks now you can start using out Fastlane Plugin to easily deploy new iOS and Android versions of your Apps to Applivery and close your development the cycle: Build, Test & deploy like a pro!

This fastlane plugin will also help you to have more context about the build, attaching and displaying the most relevant information: Direct link to the repository(GitHub & Bitbucket), commit hash, Branch, Tag, etc:

Examples

Below you'll find some basic examples about how to build a new iOS or Android App and automatically deploy it into Applivery.com

iOS App build and deploy

Next you'll find a lane with two steps: gym() that will build the iOS App and applivery() that will take care about the deployment.

lane :applivery_ios do
  gym(
    scheme: "YOUR_APP_SCHEME",        # Your App Scheme
    export_method: 'enterprise')      # Choose between: enterprise or ad-hoc`
  applivery(
    app_token: "YOUR_APP_TOKEN")      # Your Applivery App Token
end

Android App build and deploy

Next you'll find a lane with two steps: gradle() that will build the Android App and applivery() that will take care about the deployment.

lane :applivery_android do
  gradle(task: "assembleRelease")
  applivery(
    app_token: "YOUR_APP_TOKEN")        # Your Applivery App Token
end

Please check out the example Fastfile to see additional examples of how to use this plugin. Try it by cloning the repo, running fastlane install_plugins and bundle exec fastlane test.

Additional Parameters

The above examples are the most simple configuration you can have but you can add additional parameters to fully customize the deployment process. They are:

Param Description Mandatory Values
app_token Applivery App Token YES string -> Available in the App Settings
name Applivery Build name NO string-> i.e.: "RC 1.0"
notify_collaborators Notify Collaborators after deploy NO booletan -> i.e.: true / false
notify_employees Notify Employees after deploy NO booletan -> i.e.: true / false
notify_message Notification message NO string -> i.e.: "Enjoy the new version!"
changelog Release notes NO string -> i.e.: "Bug fixing"
tags Tags to identify the build NO string -> comma separated. i.e.: "RC1, QA"
filter List of groups that will be notified NO string -> comma separated + special chars. i.e.: "group1,group2|group3" = (grupo1 AND grupo2) OR (grupo3)
build_path Build path to the APK / IPA file NO string -> by default it takes the IPA/APK build path

Shared Value

Once your build is uploaded successfuly, the new generated build ID is provided by a Shared Value APPLIVERY_BUILD_ID that can be accesed in your lane with lane_context[SharedValues::APPLIVERY_BUILD_ID]

Example:

lane :applivery_ios do
  gym(
    scheme: "YOUR_APP_SCHEME",        # Your App Scheme
    export_method: 'enterprise')      # Choose between: enterprise or ad-hoc
  applivery(
    app_token: "YOUR_APP_TOKEN"       # Your Applivery App Token)
  puts "BUILD ID: #{lane_context[SharedValues::APPLIVERY_BUILD_ID]}"
end

You could use this id to open your build information in applivery like:

https://dashboard.applivery.io/apps/apps/{YOUR_APP_SLUG}/builds?id={THIS_BUILD_ID}

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository or contact us at [email protected]

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate building and releasing your iOS and Android apps. To learn more, check out fastlane.tools.

fastlane-plugin-applivery's People

Contributors

alejandrojimenez avatar alesete avatar cesartrigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fastlane-plugin-applivery's Issues

CI URL & Build URL

It's required to have a new input field that allows to provide the CI and BUILD URL's so that they can be displayed in Applivery Dashboard. As described in the Upload API docs, There are two variables available for that purpose:

  • CI URL: deployer.info.ciUrl
  • Build URL: deployer.info.buildUrl

Error in build when the commit message starts with "@"

/var/lib/gems/2.3.0/gems/fastlane-2.56.0/fastlane_core/lib/fastlane_core/ui/interface.rb:143:in `shell_error!': [!] Exit status of command 'curl "https://dashboard.applivery.com/api/builds" -H "Authorization: xxxxxx" -F app="xxxxxx" -F versionName="xxxxx" -F notes="Uploaded automatically with fastlane plugin" -F notify=true -F autoremove=true -F os=android -F tags="" -F deployer=fastlane -F package=@"/myApp/app/build/outputs/apk/app.apk" -F gitBranch="develop" -F gitCommit="xxxxx (FastlaneCore::Interface::FastlaneShellError)
" -F gitMessage="@ie fastlane Staging" -F gitRepositoryURL="xxxx
"' was 26 instead of 0.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (26) couldn't open file "ie fastlane Staging"

[Fastlane plugin] Action does not fail if curl command fails

The way the plugin is currently implemented, the action will not fail if the curl upload command fails. For example, if the build path is invalid and there is no file to upload, the upload API returns a failure code but the action silently ignores it and the lane succeeds. This is not helpful when using the action in CI/CD as it gives a false sense of success; the failure can only be detected by looking into the logs.

Bad request

When the plugin tries to upload the .ipa to Applivery shows this error:

[17:25:56]: โ–ธ {"status":false,"error":{"code":400,"msg":"Bad request","field":"slug"}}

The "field" parameter on error sometimes change. In this case is "slug".

Branch name and CI URL not passing correctly

Hi. During testing of the Fastlane plugin, we have noticed 2 issues:

  1. Branch name comes through as 'HEAD' rather than the proper branch name. This doesn't appear to be defined properly in the code. It doesn't look like we can override this in the request.
  2. There doesn't appear to be a key to pass the CI URL when uploading a build, but this is exposed in the portal as a field.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.