@@ -114,47 +114,6 @@ def re_run_basic_smoke_test
114114 sh beaker
115115end
116116
117- def jenkins_passing_json_parsed ( branch )
118- passing_url = "http://builds.delivery.puppetlabs.net/passing-agent-SHAs/api/v1/json/report-#{ branch } "
119- uri = URI . parse ( passing_url )
120- begin
121- # DO NOT use uri-open if accepting user input for the uri
122- # we've done some simple correction here,
123- # but not enough to cleanse malicious user input
124- jenkins_result = uri . open ( redirect : false )
125- rescue OpenURI ::HTTPError => e
126- abort "ERROR: Could not get last passing run data for #{ branch } of puppet-agent: '#{ e . message } '"
127- end
128-
129- begin
130- jenkins_result_parsed = JSON . parse ( jenkins_result . read )
131- rescue JSON ::ParserError => e
132- abort "ERROR: Could not get valid json for last passing run of #{ branch } : '#{ e . message } '"
133- end
134- end
135-
136- def lookup_passing_puppetagent_sha ( my_jenkins_passing_json )
137- begin
138- my_jenkins_passing_json [ 'suite-commit' ]
139- rescue => e
140- abort "ERROR: Could not get last passing suite-commit value for #{ PUPPET_AGENT_BRANCH } \n \n #{ e } "
141- end
142- end
143- def lookup_passing_puppet_sha ( my_jenkins_passing_json )
144- begin
145- my_jenkins_passing_json [ 'puppet' ]
146- rescue => e
147- abort "ERROR: Could not get puppet's last passing SHA for #{ PUPPET_AGENT_BRANCH } \n \n #{ e } "
148- end
149- end
150- def lookup_passing_facter_sha ( my_jenkins_passing_json )
151- begin
152- my_jenkins_passing_json [ 'facter' ]
153- rescue => e
154- abort "ERROR: Could not get facter's last passing SHA for #{ FACTER_BRANCH } \n \n #{ e } "
155- end
156- end
157-
158117def update_submodule ( submodule_path , submodule_sha , submodule_name )
159118 # ensure we fetch here, or the describe done later could be wrong
160119 git_checkout_command = "cd #{ submodule_path } && git fetch origin && " \
0 commit comments