Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Deliver for multiple application in 1 project #20

Closed
woutergoossens opened this issue Nov 13, 2014 · 15 comments
Closed

Deliver for multiple application in 1 project #20

woutergoossens opened this issue Nov 13, 2014 · 15 comments
Labels

Comments

@woutergoossens
Copy link

First off all thanks for this great tool.

Using your gist I tried to use Deliver for multiple applications in 1 project file.

https://gist.github.com/KrauseFx/3e7886f0590a9db64487

when I run deliver the terminal hangs and is not doing anything..

When I interrupt the command (after some minutes) I get this..
https://cloudup.com/cnatuECjPAS

Do you know a solution?

Thanks

@KrauseFx
Copy link
Collaborator

Sorry for the late response.

It looks like gets doesn't work in the Deliverfile

I got a working solution now:

if ENV["project"] == 'project_name1'

  email "yourappleid@company.com"
  # hide_transporter_output # remove the '#' in the beginning of the line, to hide the output while uploading

  ########################################
  # App Metadata
  ########################################



  # The app identifier is required
  app_identifier "[Your App Identifier, e.g. at.felixkrause.app_name]"


  # This folder has to include one folder for each language
  # More information about automatic screenshot upload: 
  screenshots_path "./screenshots"


  # version '1.2' # you can pass this if you want to verify the version number with the ipa file
  # 
  # title({
  #   "en-US" => "Your App Name"
  # })
  # 
  # changelog({
  #   "en-US" => "iPhone 6 (Plus) Support" 
  # })



  ########################################
  # Building and Testing
  ########################################

  # Dynamic generation of the ipa file
  # I'm using Shenzhen by Mattt, but you can use any build tool you want
  # Remove the whole block if you do not want to upload an ipa file
  ipa do
      # system("ipa build") # build your project using Shenzhen
      "./[[APP_NAME]].ipa --scheme your name" # Tell 'Deliver' where it can find the finished ipa file
  end

  # ipa "./latest.ipa" # this can be used, if you prefer manually building the ipa file

  # unit_tests do
  #   system("xctool test")
  # end

  success do
    system("say 'Successfully deployed a new version.'")
  end

elsif ENV["project"] == 'project_name1'
  # copy code here
end

and run deliver using

project="project_name1" deliver

@woutergoossens
Copy link
Author

Thanks! Working great.

Just having an issue to run deliver via jenkins.

�[0m�[0m#############################################################
�[1m�[31mFATAL [2014-11-14 17:53:51.66]: �[0m�[0m# You have to install phantomjs to use deliver
�[1m�[31mFATAL [2014-11-14 17:53:51.66]: �[0m�[0m# phantomjs is used to control the iTunesConnect frontend
error: Run 'brew update && brew install phantomjs' and start deliver again. Use --trace to view backtrace
�[1m�[31mFATAL [2014-11-14 17:53:51.66]: �[0m�[0m# Install Homebrew using http://brew.sh/
�[1m�[31mFATAL [2014-11-14 17:53:51.66]: �[0m�[0m# Run 'brew update && brew install phantomjs' and start deliver again
�[1m�[31mFATAL [2014-11-14 17:53:51.66]: �[0m�[0m#############################################################
Build step 'Execute shell' marked build as failure

When I login to jenkins via the Terminal application I see that phantomjs is installed.

Wouters-MacBook-Pro-2:~ jenkins$ which phantomjs
/usr/local/bin/phantomjs

What could be the problem?

Thanks

@KrauseFx
Copy link
Collaborator

Maybe your Jenkins process is running as a different user?
You could also add brew update && brew install phantomjs as build step in Jenkins.

@woutergoossens
Copy link
Author

The jenkins process is running as the "Jenkins" user and I have brew installed (on my user and so on the Jenkins user).
When I just do brew update in Jenkins it is giving me this error

  • brew update
    /Users/Shared/Jenkins/tmp/hudson8634906488041944573.sh: line 2: brew: command not found

Very weird. Is brew not working with jenkins?

Maybe this user also has the same problem --> https://twitter.com/devasapps/status/533335162864803840 ?

@woutergoossens
Copy link
Author

I just thing that jenkins cannot use brew.
Is jenkins working for you with deliver and phantomjs?

You found a solution to drop this and use Mechanize?

Would be great! Thanks :)

@KrauseFx
Copy link
Collaborator

  1. I'm running Jenkins as the same user as the default account
  2. it looks like migrating to mechanize would be a very complex change. It's probably not going to happen

Sent from my iPhone

On 15.11.2014, at 09:36, Wouter Goossens notifications@github.com wrote:

I just thing that jenkins cannot use brew.
Is jenkins working for you with deliver and phantomjs?

You found a solution to drop this and use Mechanize?

Would be great! Thanks :)


Reply to this email directly or view it on GitHub.

@woutergoossens
Copy link
Author

Hi,

Oh, how can I setup jenkins as the same user? Sorry for all the questions, would be great if I can setup my jenkins installation with deliver! :)

Thanks.

Wouter

@KrauseFx
Copy link
Collaborator

I use Jenkins App: https://github.com/stisti/jenkins-app

Sent from my iPhone

On 15.11.2014, at 10:08, Wouter Goossens notifications@github.com wrote:

Hi,

Oh, how can I setup jenkins as the same user? Sorry for all the questions, would be great if I can setup my jenkins installation with deliver! :)

Thanks.

Wouter


Reply to this email directly or view it on GitHub.

@woutergoossens
Copy link
Author

Nice! Thanks!! 


Sent from Mailbox

On Sat, Nov 15, 2014 at 11:16 AM, Felix Krause notifications@github.com
wrote:

I use Jenkins App: https://github.com/stisti/jenkins-app
Sent from my iPhone

On 15.11.2014, at 10:08, Wouter Goossens notifications@github.com wrote:

Hi,

Oh, how can I setup jenkins as the same user? Sorry for all the questions, would be great if I can setup my jenkins installation with deliver! :)

Thanks.

Wouter


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub:
#20 (comment)

@woutergoossens
Copy link
Author

This doesn't work anymore with fastlane?

lane :beta do
project="test_project" deliver :beta
end

/Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.5/lib/fastlane/fast_file.rb:20:in `eval': (eval):27: syntax error, unexpected tIDENTIFIER, expecting keyword_end (SyntaxError)
project="test_project" deliver :beta
^
(eval):34: syntax error, unexpected tIDENTIFIER, expecting keyword_end

@KrauseFx
Copy link
Collaborator

KrauseFx commented Feb 1, 2015

What are you trying to achieve? That's no valid syntax.

I don't understand your code

@woutergoossens
Copy link
Author

When you check the previous comments in this discussion I have 1 Xcode workspace and multiple targets.

So I also have 1 Deliverfile and with environment variables I could builds separate targets.

So I tried to use the same syntax in the Fastfile as I did before.

project="project_name1" deliver

Isn't that possible anymore?

@KrauseFx
Copy link
Collaborator

KrauseFx commented Feb 1, 2015

Ohh, okay.
To pass environment variables you have to do it like this:

lane :beta do
  ENV["project"] = "something"
  deliver :beta
end

@woutergoossens
Copy link
Author

Thanks for the fast reply! That's working!

@fastlanebot
Copy link

This issue was migrated to fastlane/fastlane#2467. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo 🚀

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants