New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export archive #78

Merged
merged 6 commits into from May 23, 2017

Conversation

Projects
None yet
@Blahartinger

Blahartinger commented Apr 20, 2017

Fixing some null pointer exceptions from this fork #76 which itself migrates the xcode-plugin to support XCode 8.3.x+.

Also, enterprise shouldn't be the default signing type. Changed this to ad-hoc.

@aheritier

This comment has been minimized.

Member

aheritier commented Apr 20, 2017

@aheritier aheritier self-requested a review Apr 20, 2017

@ToninZhao

This comment has been minimized.

ToninZhao commented Apr 21, 2017

@Blahartinger I tried "xcode-plugin-1.4.12-SNAPSHOT.hpi", but failed.
FATAL: No global development team or local team ID was configured.

@Blahartinger

This comment has been minimized.

Blahartinger commented Apr 21, 2017

@ToninZhao
That's part of the new plugin changes though. You need to configure that field in jenkins now. Either set a global one, or plop in your team id in the textfield.

@sivakspt

This comment has been minimized.

sivakspt commented Apr 24, 2017

xcodebuild: error: The flag -scheme is required when specifying -archivePath but not -exportArchive.

I am getting this error while creating a build.

@sivakspt

This comment has been minimized.

sivakspt commented Apr 28, 2017

Any update on the above issues?

@aheritier

This comment has been minimized.

Member

aheritier commented May 1, 2017

any idea @Blahartinger ?
Myself I had no time to work on this and I really don't expect to find some time in the next few weeks.
All feedbacks / contributions welcome. As I already said, we'll welcome new active committers with pleasure

@lucasleelz

This comment has been minimized.

lucasleelz commented May 6, 2017

@Blahartinger I also found that Development Team is not persistent, and if you modify the configuration every time you have to choose Development Team.

@chrisbeall

This comment has been minimized.

chrisbeall commented May 10, 2017

@Blahartinger Snapshot release works fine for me, too, except for the issue with Development Team not being persistent.

@kapfab

This comment has been minimized.

kapfab commented May 11, 2017

We used the Snapshot for our latest iOS builds, everything works fine.
We specified a Development Team ID for our builds, which seems to be persistent, so we were not affected by the issue related above.

@Blahartinger

This comment has been minimized.

Blahartinger commented May 11, 2017

@sivakspt - this is how xcodebuild commandline tool is expected to be used. Scheme is required for archivePath and not exportArchive. See the following example from here.

I'll look into Development Team ID not being persistent.

# Archive the application
xcodebuild \
-scheme "${SCHEME_NAME}" \
-sdk "${TARGET_SDK}" \
-archivePath "${PROJECT_BUILDDIR}/${SCHEME_NAME}.xcarchive" \
-configuration Release \
PROVISIONING_PROFILE="${PROVISIONING_PROFILE}" \
archive 

# Export the archive to an ipa
xcodebuild \
-exportArchive \
-archivePath "${PROJECT_BUILDDIR}/${SCHEME_NAME}.xcarchive" \
-exportOptionsPlist "${EXPORT_PLIST}" \
-exportPath "${BUILD_OUTPUT_DIR}" 

@Blahartinger

This comment has been minimized.

Blahartinger commented May 11, 2017

Ok, I think I may have fixed it @lucasleelz @chrisbeall

@Blahartinger

This comment has been minimized.

Blahartinger commented May 12, 2017

@aheritier you should see/review in my last commit what was missing to fix the persistence issue mentioned above.

@aphex3k

This comment has been minimized.

aphex3k commented May 12, 2017

Whenever I make changes to the configuration in the Jenkins job it forgets about the globally configured dev id selected and resets it to nothing selected... I guess it needs some work still?

Can anyone confirm?

Steps to reproduce:

  1. Configure any number of global developer profiles, I configured 2
  2. configure a jenkins job using the Xcode plugin with one of the global profiles
  3. run the job to confirm it signs the App correctly
  4. configure the job and change something not Xcode-plugin related, like adding an execute shell step
  5. run the job again

For me, it fails signing with an error that no global or local developer profile had been selected...

@alshari86

This comment has been minimized.

alshari86 commented May 15, 2017

@Blahartinger when will this be merged and released? I need to install the new xcode plugin, right?

@Blahartinger

This comment has been minimized.

Blahartinger commented May 15, 2017

@alshari86 - sorry not up to me dude, I don't have write access to this repository - can't merge it myself. I'm just a community member like yourself that uses the plugin, found it broken, someone else actually made the initial changes for this PR, and I just continued to fix the bugs and previous code review asks. Just moving the needle...I'm not even a regular contributor to this plugin.

You're able to use the latest snapshot to try out where things are at right now, there's just a persistence issue when using global developer profiles, setting a team id directly seems to work well for me.

If I get some time soon I'll continue looking into the global dev profile persistence issue but anyone else is also free to try and push this forward.

@Blahartinger

This comment has been minimized.

Blahartinger commented May 15, 2017

@lampietti - you started these changes originally, any idea on the persistence issue? I've tried to make progress on addressing a few other concerns and small bugs.

Fix persistence issue.
Add some user docs.
Add a delete button for development teams in global configuration.
@aheritier

This comment has been minimized.

Member

aheritier commented May 16, 2017

@Blahartinger

sorry not up to me dude, I don't have write access to this repository - can't merge it

We can fix that :)

I had a look at the recent changes you did and they seem to be fine. I didn't test them (it's just a code review) as I don't have anymore the required environment/project

AFH @jenkinsci/code-reviewers

All feedbacks from real users who can test the SNAPSHOT are welcome. I can blindly merge/release but I would really prefer to have some people feedbacks before.

@chrisbeall

This comment has been minimized.

chrisbeall commented May 16, 2017

I tested the latest snapshot, and it seems to be working fine. The persistence issue on the develoment team drop-down is fixed. Tested with Xcode 8.3.2.

@alshari86

This comment has been minimized.

alshari86 commented May 16, 2017

@chrisbeall I am new on Jenkins, for the snapshot, how do I use it? Do I just copy to the plugin folder of jenkins?

@chrisbeall

This comment has been minimized.

chrisbeall commented May 16, 2017

@alshari86 Manage Jenkins --> Manage Plugins --> Advanced --> Upload Plugin

@alshari86

This comment has been minimized.

alshari86 commented May 17, 2017

@Blahartinger @aheritier @chrisbeall
I have one problem here and really need your help on this.
I have one job building for iPhone real device, so package to ipa file and under "ipa-dir//*.ipa", in this job the "archive artifacts" works fine and I can see ipa file once job is successful
I have another job building via iphonesimulator sdk which is used to generate ".app" file for simulator running automation. In this job, when I set archive artifacts to "build-dir/
/.app", it always failed with error "no artifacts found in build-dir/**/.app", but when I check my workspace, the .app file as well as the path are both correct. Why it always failed to find this .app file?
But another job can find .ipa successfully.
After debug it's because it cannot find the folder of "Debug-iphonesimulator" which is generated automatically when build for simulator
Any one has idea on this? This blocks my automation job right now

@aphex3k

This comment has been minimized.

aphex3k commented May 19, 2017

@Blahartinger I can confirm that the issue with persisting the dev team seems to be resolved with this version.

@lucasleelz

This comment has been minimized.

lucasleelz commented May 22, 2017

Just download the latest code, and packaged xcode plugin, uploaded to jenkins. Restart jenkins, It's OK!.
thanks @Blahartinger

@aheritier

This comment has been minimized.

Member

aheritier commented May 22, 2017

@chrisbeall @aphex3k @lucasleelz seems to be ok for this change thus I propose to merge it. Is there something else to merge before to release cc @Blahartinger ?
We will have to update the wiki and clearly document changes done in this release.
Due to the addition of the new team parameter which is mandatory we should mark the plugin as incompatible with previous versions ?
https://wiki.jenkins-ci.org/display/JENKINS/Marking+a+new+plugin+version+as+incompatible+with+older+versions
When you upgrade you have to update your jobs using it
Also it's not clear for me which minimal version of XCode is required now ? In #76 we were talking about version 7 but I'm not sure if with all recent change we don't move the pre-requisite to 8.3 ?

@Blahartinger

This comment has been minimized.

Blahartinger commented May 22, 2017

@aheritier I think that should be it for this change. What's here unblocks xcode 8.3. It's possible that archivepath isn't required in some cases and thus scheme param could be avoided ( though more investigation required). I also think the new params that are required maybe deserve to be top level in the UI rather hen burried in advanced settings but all of these things can be future additional changes.

@alshari86

This comment has been minimized.

alshari86 commented May 22, 2017

@aheritier who is going to merge this and release new xcode plugin?

@aheritier

This comment has been minimized.

Member

aheritier commented May 23, 2017

@alshari86 it seems I am the only "active" committer thus I'll do it

@aheritier aheritier merged commit e417e3e into jenkinsci:master May 23, 2017

1 check passed

Jenkins This pull request looks good
Details
@kapfab

This comment has been minimized.

kapfab commented May 23, 2017

Thanks a lot, @Blahartinger and @aheritier!

This PR solves a critical compatibility issue with the latest Xcode and iOS releases. Don't you think this justifies a new release for this plugin (latest is from September 2016) ?

@aheritier

This comment has been minimized.

Member

aheritier commented May 23, 2017

@kapfab yes but before I need at least to

@aheritier

This comment has been minimized.

Member

aheritier commented May 23, 2017

If you tried this PR please give a try to https://jenkins.ci.cloudbees.com/job/plugins/job/xcode-plugin/169/org.jenkins-ci.plugins$xcode-plugin/
It is the latest build from the master branch after it's merge.
It's important to verify that we don't have a regression.

@kapfab

This comment has been minimized.

kapfab commented May 23, 2017

@aheritier, we've just built a few IPAs from your latest Snapshot, everything seems fine.
We could not try all the options, though. As we don't use the Team Name but only the Team Id, we can't tell about the persistence issue.

Just one remark: description and help for the "Xcode Schema File" option still states "Only needed if you want to compile for a specific schema instead of a target", which is not true anymore as it's now required with Xcode "-archivePath" option.
It should now be "Needed if you want to compile for a specific schema instead of a target, or if you want to generate an archive or an IPA".
But I think we all can live without it for the moment.

@aheritier

This comment has been minimized.

Member

aheritier commented May 23, 2017

Fixed @kapfab

@kapfab

This comment has been minimized.

kapfab commented May 23, 2017

Perfect then!

@aheritier

This comment has been minimized.

Member

aheritier commented May 23, 2017

I just pushed all required commits before to release a version 2.0.0
The plugin now requires Java 7, Jenkins LTS 1.625.1 and Xcode 7 minimum (it is mandatory to use it for Xcode >= 8.3)
You can try the last binaries from https://jenkins.ci.cloudbees.com/job/plugins/job/xcode-plugin/171/org.jenkins-ci.plugins$xcode-plugin/
If noone objects I'll update the wiki tomorrow and I'll release it

@kapfab

This comment has been minimized.

kapfab commented May 24, 2017

I did some tests to make sure the Team selection persistence issue is solved with the latest Snapshot.
It works fine, the Team Name is preserved between job configuration changes and job copies.

@aheritier

This comment has been minimized.

Member

aheritier commented May 24, 2017

Released as 2.0.0. Should be in our update center in few hours. Wiki updated : https://wiki.jenkins-ci.org/display/JENKINS/Xcode+Plugin
Thx everyone for your help in maintaining this plugin

@alshari86

This comment has been minimized.

alshari86 commented May 24, 2017

Great!

@rburger

This comment has been minimized.

rburger commented May 24, 2017

Great news!!! :-)

@lucasleelz

This comment has been minimized.

lucasleelz commented May 31, 2017

Great!!!

@liuguanlin

This comment has been minimized.

liuguanlin commented Jun 1, 2017

https://issues.jenkins-ci.org/browse/JENKINS-44550

xcodebuild: error: The flag -scheme is required when specifying -archivePath but not -exportArchive

@kapfab

This comment has been minimized.

kapfab commented Jun 1, 2017

@liuguanlin Did you specify your Project Scheme in the "Xcode Schema file" option of your existing job(s) ?

@liuguanlin

This comment has been minimized.

liuguanlin commented Jun 2, 2017

@kapfab @alshari86 No, "Xcode Schema file" need to specify? How to specify?I do not know how to fix this problem

@ToninZhao

This comment has been minimized.

ToninZhao commented Jun 2, 2017

@liuguanlin In "Advanced Xcode build options" ==> "Xcode Schema File" step, you should fill your project scheme in the form.

@04pmsuu1

This comment has been minimized.

04pmsuu1 commented Jun 2, 2017

@kapfab

This comment has been minimized.

kapfab commented Jun 2, 2017

Looks like the same (non-)issue… Archive is generated when an IPA build is requested. And as no Scheme is specified…
Looks like the Scheme option would now need to be unburied from the Advanced options to be more visible. Or an update of the description of the Build IPA option might help.

@lampietti

This comment has been minimized.

Woot ?!?

@argeas

This comment has been minimized.

The logic here causes the Archive to always be built. It should be seperated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment