Skip to content

Commit

Permalink
Defined types:
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewinne committed May 11, 2016
1 parent 74d9f4f commit fa4c1a1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 167 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.gradle
.idea
build
151 changes: 0 additions & 151 deletions src/main/resources/CapOne/JenkinsBuild.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
def isJobParameterized(request, jobContext):
jobInfo = request.get(jobContext + 'api/json', contentType = 'application/json')
if not jobInfo.isSuccessful:
print "Failed to get response from jenkins, received [%s] with content [%s]" % (jobInfo.status, jobInfo.response)
print "Failed to get response from ipsw, received [%s] with content [%s]" % (jobInfo.status, jobInfo.response)
sys.exit(1)
jobActions = JsonPathResult(jobInfo.response, 'actions').get()

Expand Down Expand Up @@ -117,7 +117,7 @@ def build_env_vars(environment_vars):
while True:
time.sleep(poll_interval)

# fallback to the unreliable check because old jenkins(<1.561) does not populate the Location header
# fallback to the unreliable check because old ipsw(<1.561) does not populate the Location header
if location:
found_build_number = False
for x in range(build_number_retrial_count):
Expand All @@ -133,7 +133,7 @@ def build_env_vars(environment_vars):
else:
time.sleep(poll_interval)
else:
print "Failed to get response from jenkins, received [%s] with content [%s]" % (response.status, response.response)
print "Failed to get response from ipsw, received [%s] with content [%s]" % (response.status, response.response)
time.sleep(poll_interval)

if found_build_number:
Expand All @@ -156,7 +156,7 @@ def build_env_vars(environment_vars):
time.sleep(poll_interval)
response = request.get(jobContext + str(buildNumber) + '/api/json', contentType = 'application/json')
if not response.isSuccessful:
print "Failed to get response from jenkins, received [%s] with content [%s]" % (response.status, response.response)
print "Failed to get response from ipsw, received [%s] with content [%s]" % (response.status, response.response)
continue
buildStatus = JsonPathResult(response.response, 'result').get()
duration = JsonPathResult(response.response, 'duration').get()
Expand Down
19 changes: 7 additions & 12 deletions src/main/resources/synthetic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,15 @@
-->
<synthetic xmlns="http://www.xebialabs.com/deployit/synthetic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xebialabs.com/deployit/synthetic synthetic.xsd">

<type type="CapOne.JenkinsBuild" extends="jenkins.Build">
<property name="foo" category="output" label="Foo" kind="string"/>
</type>

<type type="ipsw.wzRequest" extends="xlrelease.PythonScript">
<property name="scriptLocation" default="ipsw/wzRequest.py" hidden="true" />

<type type="jenkins.EnvInjectBuild" extends="jenkins.Build">
<property name="scriptLocation" default="jenkins/EnvInjectBuild.py" hidden="true" />

<property name="envInjectVariables" category="output" label="variables" kind="map_string_string"/>
<property name="ipswServer" category="input" label="Server" referenced-type="ipsw.Server" kind="ci"/>
<property name="action" category="input" label="Action" kind="string" />
</type>

<type-modification type="jenkins.Server">
<property name="buildNumberRetrialCount" kind="integer" default="5" hidden="true" description="Number of times to check for available buildNumber" />
</type-modification>
<type type="ipsw.Server" extends="xlrelease.Configuration">
<property name="srid" label="Server id" kind="string" description="Specifies the ISPW server id"/>
</type>


</synthetic>

0 comments on commit fa4c1a1

Please sign in to comment.