summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Soula <william.soula@drillinginfo.com>2017-11-20 09:37:31 -0700
committerWill Soula <william.soula@drillinginfo.com>2018-05-10 10:27:16 -0600
commitafd7cc8475cf497e593d581b89fa56e667566d61 (patch)
treebac6f8204ec6c179f7469d5bdfbf7d7c3ecc0b11
parent7696ea37fd65b845ef5cdfb15dcd31e907af2585 (diff)
Add XCode 9.1 Support
Branched from my xcode-20 branch and rebased from master and added support for xcode 9.1 now that the xcode plugin has been released Due to: https://issues.jenkins-ci.org/browse/JENKINS-45509 Change-Id: Ibd0f4c82b5e8f37a9da335c57786eae5dc91aefb
Notes
Notes (review): Code-Review+2: Sorin Sbarnea <ssbarnea@redhat.com> Code-Review+2: Kien Ha <kienha9922@gmail.com> Workflow+1: Kien Ha <kienha9922@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 14 May 2018 14:16:43 +0000 Reviewed-on: https://review.openstack.org/566679 Project: openstack-infra/jenkins-job-builder Branch: refs/heads/master
-rw-r--r--jenkins_jobs/modules/builders.py20
-rw-r--r--tests/builders/fixtures/xcode.xml12
-rw-r--r--tests/builders/fixtures/xcode.yaml5
3 files changed, 37 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py
index 98bdbea..3a74185 100644
--- a/jenkins_jobs/modules/builders.py
+++ b/jenkins_jobs/modules/builders.py
@@ -3070,6 +3070,10 @@ def xcode(registry, xml_parent, data):
3070 (default '') 3070 (default '')
3071 :arg str keychain-unlock: Unlocks the keychain during use. 3071 :arg str keychain-unlock: Unlocks the keychain during use.
3072 (default false) 3072 (default false)
3073 :arg str bundle-id: The bundle identifier (App ID) for this provisioning
3074 profile (default '')
3075 :arg str provisioning-profile-uuid: The UUID of the provisioning profile
3076 associated to this bundle identifier. (default '')
3073 3077
3074 Example: 3078 Example:
3075 3079
@@ -3135,6 +3139,22 @@ def xcode(registry, xml_parent, data):
3135 ] 3139 ]
3136 convert_mapping_to_xml(xcode, data, mapping, fail_required=True) 3140 convert_mapping_to_xml(xcode, data, mapping, fail_required=True)
3137 3141
3142 has_provisioning_profiles = bool(data.get('provisioning-profiles'))
3143 XML.SubElement(xcode, 'manualSigning').text = str(
3144 has_provisioning_profiles or False).lower()
3145 if has_provisioning_profiles:
3146 provisioning_profiles_xml = XML.SubElement(
3147 xcode, 'provisioningProfiles')
3148 mapping = [
3149 ('bundle-id', 'provisioningProfileAppId', ''),
3150 ('provisioning-profile-uuid', 'provisioningProfileUUID', '')
3151 ]
3152 for provisioning_profile in data.get('provisioning-profiles'):
3153 provisioning_profile_xml = XML.SubElement(
3154 provisioning_profiles_xml, 'au.com.rayh.ProvisioningProfile')
3155 convert_mapping_to_xml(provisioning_profile_xml,
3156 provisioning_profile, mapping, fail_required=True)
3157
3138 3158
3139def sonatype_clm(registry, xml_parent, data): 3159def sonatype_clm(registry, xml_parent, data):
3140 """yaml: sonatype-clm 3160 """yaml: sonatype-clm
diff --git a/tests/builders/fixtures/xcode.xml b/tests/builders/fixtures/xcode.xml
index 7d987ca..2c7cedd 100644
--- a/tests/builders/fixtures/xcode.xml
+++ b/tests/builders/fixtures/xcode.xml
@@ -30,6 +30,7 @@
30 <keychainPath/> 30 <keychainPath/>
31 <keychainPwd/> 31 <keychainPwd/>
32 <unlockKeychain>false</unlockKeychain> 32 <unlockKeychain>false</unlockKeychain>
33 <manualSigning>false</manualSigning>
33 </au.com.rayh.XCodeBuilder> 34 </au.com.rayh.XCodeBuilder>
34 <au.com.rayh.DeveloperProfileLoader> 35 <au.com.rayh.DeveloperProfileLoader>
35 <id>849b07cd-ac61-4588-89c8-b6606ee84946</id> 36 <id>849b07cd-ac61-4588-89c8-b6606ee84946</id>
@@ -63,6 +64,17 @@
63 <keychainPath>/Users/jenkins/Library/Keychains/jenkins-uasdk-ios-pre_review</keychainPath> 64 <keychainPath>/Users/jenkins/Library/Keychains/jenkins-uasdk-ios-pre_review</keychainPath>
64 <keychainPwd>testpass</keychainPwd> 65 <keychainPwd>testpass</keychainPwd>
65 <unlockKeychain>true</unlockKeychain> 66 <unlockKeychain>true</unlockKeychain>
67 <manualSigning>true</manualSigning>
68 <provisioningProfiles>
69 <au.com.rayh.ProvisioningProfile>
70 <provisioningProfileAppId>foo</provisioningProfileAppId>
71 <provisioningProfileUUID>bar</provisioningProfileUUID>
72 </au.com.rayh.ProvisioningProfile>
73 <au.com.rayh.ProvisioningProfile>
74 <provisioningProfileAppId>foo2</provisioningProfileAppId>
75 <provisioningProfileUUID>bar2</provisioningProfileUUID>
76 </au.com.rayh.ProvisioningProfile>
77 </provisioningProfiles>
66 </au.com.rayh.XCodeBuilder> 78 </au.com.rayh.XCodeBuilder>
67 </builders> 79 </builders>
68</project> 80</project>
diff --git a/tests/builders/fixtures/xcode.yaml b/tests/builders/fixtures/xcode.yaml
index 1ec30c7..39333ba 100644
--- a/tests/builders/fixtures/xcode.yaml
+++ b/tests/builders/fixtures/xcode.yaml
@@ -22,3 +22,8 @@ builders:
22 keychain-path: "/Users/jenkins/Library/Keychains/jenkins-uasdk-ios-pre_review" 22 keychain-path: "/Users/jenkins/Library/Keychains/jenkins-uasdk-ios-pre_review"
23 keychain-password: "testpass" 23 keychain-password: "testpass"
24 keychain-unlock: true 24 keychain-unlock: true
25 provisioning-profiles:
26 - bundle-id: foo
27 provisioning-profile-uuid: bar
28 - bundle-id: foo2
29 provisioning-profile-uuid: bar2