fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.51k stars 5.7k forks source link

Jenkins user can not recognized fastlane inside docker container env, however as a root user fastlane is working #15807

Closed omeryounus closed 4 years ago

omeryounus commented 4 years ago

Jenkins issue when building using fastlane:

[Pipeline] stage [Pipeline] { (Making build for testing) [Pipeline] sh .

Here is the issue with jenkins user on linux ubuntu: bash: fastlane: command not found

Here is my env detail when running with root user inside docker container. root@4f4f885ce60d:/# fastlane env [✔] 🚀 [22:46:12]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile [22:46:13]: Generating fastlane environment output, this might take a few seconds...

✅ fastlane environment ✅ ### Stack | Key | Value | | --------------------------- | ------------------------------------------------------ | | OS | debian_based 9.11 | | Ruby | 2.6.5 | | Bundler? | false | | Git | git version 2.11.0 | | Installation Source | /usr/local/bundle/bin/fastlane | | Host | Debian GNU/Linux 9 debian_based 9.11 (4.15.0-1021-aws) | | Ruby Lib Dir | /usr/local/lib | | OpenSSL Version | OpenSSL 1.1.0l 10 Sep 2019 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | ### System Locale | Variable | Value | | | -------- | ------- | - | | LANG | C.UTF-8 | ✅ | | LC_ALL | | | | LANGUAGE | | | ### fastlane files: **No Fastfile found** **No Appfile found** ### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------- | | fastlane | 2.137.0 | ✅ Up-To-Date | ### Loaded fastlane plugins: **No plugins Loaded**
Loaded gems | Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.3.0 | | slack-notifier | 2.3.2 | | atomos | 0.1.3 | | CFPropertyList | 3.0.2 | | claide | 1.0.3 | | colored2 | 3.1.2 | | nanaimo | 0.2.6 | | xcodeproj | 1.14.0 | | rouge | 2.0.7 | | xcpretty | 0.3.0 | | terminal-notifier | 2.0.0 | | unicode-display_width | 1.6.0 | | terminal-table | 1.8.0 | | plist | 3.5.0 | | public_suffix | 2.0.5 | | addressable | 2.7.0 | | multipart-post | 2.0.0 | | word_wrap | 1.0.0 | | tty-screen | 0.7.0 | | tty-cursor | 0.7.0 | | tty-spinner | 0.9.2 | | babosa | 1.0.3 | | colored | 1.2 | | highline | 1.7.10 | | commander-fastlane | 4.4.6 | | excon | 0.71.0 | | faraday | 0.17.1 | | unf_ext | 0.0.7.6 | | unf | 0.1.4 | | domain_name | 0.5.20190701 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | faraday_middleware | 0.13.1 | | fastimage | 2.1.7 | | gh_inspector | 1.1.3 | | json | 2.1.0 | | mini_magick | 4.9.5 | | multi_xml | 0.6.0 | | rubyzip | 1.3.0 | | security | 0.1.3 | | xcpretty-travis-formatter | 1.0.0 | | dotenv | 2.7.5 | | bundler | 1.17.3 | | naturally | 2.2.0 | | simctl | 1.6.6 | | jwt | 2.1.0 | | uber | 0.1.0 | | declarative | 0.0.10 | | declarative-option | 0.1.0 | | representable | 3.0.4 | | retriable | 3.1.2 | | mime-types-data | 3.2019.1009 | | mime-types | 3.3 | | multi_json | 1.14.1 | | signet | 0.12.0 | | memoist | 0.16.2 | | os | 1.0.1 | | googleauth | 0.6.7 | | httpclient | 2.8.3 | | google-api-client | 0.23.9 | | google-cloud-env | 1.3.0 | | google-cloud-core | 1.4.1 | | digest-crc | 0.4.1 | | google-cloud-storage | 1.16.0 | | emoji_regex | 1.0.1 | | forwardable | 1.2.0 | | logger | 1.3.0 | | stringio | 0.0.2 | | ipaddr | 1.2.2 | | openssl | 2.1.2 | | ostruct | 0.1.0 | | strscan | 1.0.0 | | date | 2.0.0 | | fileutils | 1.1.0 | | etc | 1.0.1 | | io-console | 0.4.7 | | zlib | 1.0.0 | | mini_portile2 | 2.4.0 | | nokogiri | 1.10.7 | | rexml | 3.1.9 | | psych | 3.1.0 | | mutex_m | 0.1.0 |
*generated on:* **2019-12-15**

[22:46:13]: Take notice that this output may contain sensitive information, or simply information that you don't want to make public. [22:46:13]: Open https://github.com/fastlane/fastlane/issues/new to submit a new issue ✅

codnee commented 4 years ago

This is an issue in your Docker image, not Fastlane.

omeryounus commented 4 years ago

I fixed the issue by adding the following line in Dockerfile. It will allow jenkins usr to run fastlane command.

Global variable for Fastlane ENV FASTLANE_BIN /usr/local/bin