JENKINS-19595: Support multiple targets to be passed into xcodebuild #43

Merged
merged 10 commits into from Jan 7, 2015

Conversation

Projects
None yet
4 participants
@timothy-volvo

Added a check box to indicate the target field should be interpreted as a regular expression. The output of the xcodebuild -list command is redirected to a byte array so it can be parsed as well as logged. When checked the parsed list of targets are compared against the regex and a -target parameter is added when a match is found.

@cloudbees-pull-request-builder

This comment has been minimized.

Show comment Hide comment
@cloudbees-pull-request-builder

cloudbees-pull-request-builder May 9, 2014

plugins » xcode-plugin #52 SUCCESS
This pull request looks good

plugins » xcode-plugin #52 SUCCESS
This pull request looks good

@jenkinsadmin

This comment has been minimized.

Show comment Hide comment
@jenkinsadmin

jenkinsadmin May 9, 2014

Owner

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

Owner

jenkinsadmin commented May 9, 2014

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@timothy-volvo

This comment has been minimized.

Show comment Hide comment
@timothy-volvo

timothy-volvo May 14, 2014

I wonder if this pull request should be rejected in favor of one with the checkbox in the advanced section. That way the checkbox could be applied to either the Target or Scheme textfield, whichever is set.

I wonder if this pull request should be rejected in favor of one with the checkbox in the advanced section. That way the checkbox could be applied to either the Target or Scheme textfield, whichever is set.

@cloudbees-pull-request-builder

This comment has been minimized.

Show comment Hide comment
@cloudbees-pull-request-builder

cloudbees-pull-request-builder Aug 21, 2014

plugins » xcode-plugin #67 SUCCESS
This pull request looks good

plugins » xcode-plugin #67 SUCCESS
This pull request looks good

@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Sep 3, 2014

sure about the double :: here ?

I found this: http://docs.oclint.org/en/dev/guide/xcodebuild.html

@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Sep 3, 2014

It might be useful to say we will add all matching targets.

It might be useful to say we will add all matching targets.

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Sep 3, 2014

WOuld something like that be more readable ?

List matchedTargets = Collections2.filter(xcodebuildListParser.getTargets(),
            Predicates.containsPattern(target));

 if (matchedTargets.isEmpty()) {
   listener.getLogger().println(Messages.XCodeBuilder_NoMatchingTargetsFound());
   return false;
 }

 for (String matchedTarget : matchedTargets) {
     commandLine.add("-target");
     commandLine.add(matchedTarget);
     xcodeReport.append("target: ").append(matchedTarget);
 }

WOuld something like that be more readable ?

List matchedTargets = Collections2.filter(xcodebuildListParser.getTargets(),
            Predicates.containsPattern(target));

 if (matchedTargets.isEmpty()) {
   listener.getLogger().println(Messages.XCodeBuilder_NoMatchingTargetsFound());
   return false;
 }

 for (String matchedTarget : matchedTargets) {
     commandLine.add("-target");
     commandLine.add(matchedTarget);
     xcodeReport.append("target: ").append(matchedTarget);
 }
@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Sep 3, 2014

any chance you could add a test case for this with real output from a command ?

That way if this breaks somehow, we will be able to able to add the new test case easily

any chance you could add a test case for this with real output from a command ?

That way if this breaks somehow, we will be able to able to add the new test case easily

@lacostej

This comment has been minimized.

Show comment Hide comment
@lacostej

lacostej Sep 3, 2014

typo: targets

Note: we should say here we will add all targets listed under xcodebuild -list, all that match the regexp.

typo: targets

Note: we should say here we will add all targets listed under xcodebuild -list, all that match the regexp.

@cloudbees-pull-request-builder

This comment has been minimized.

Show comment Hide comment
@cloudbees-pull-request-builder

cloudbees-pull-request-builder Sep 6, 2014

plugins » xcode-plugin #69 SUCCESS
This pull request looks good

plugins » xcode-plugin #69 SUCCESS
This pull request looks good

timothy-volvo added some commits Dec 17, 2014

@lacostej lacostej merged commit 4117e44 into jenkinsci:master Jan 7, 2015

1 of 2 checks passed

default Jenkins is validating pull request ...
Details
Jenkins This pull request looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment