Skip to content

Commit

Permalink
Remove support for update_parent_image_stream_tag plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lcarva committed Jan 25, 2017
1 parent b7cd531 commit 592d81b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 66 deletions.
7 changes: 0 additions & 7 deletions inputs/prod_inner.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
},
"name": "stop_autorebuild_if_disabled"
},
{
"args": {
"openshift_url": "{{OPENSHIFT_URI}}",
"verify_ssl": false
},
"name": "update_parent_image_stream_tag"
},
{
"name": "add_filesystem",
"args": {
Expand Down
17 changes: 0 additions & 17 deletions osbs/build/build_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,6 @@ def render_add_yum_repo_by_url(self):
"add_yum_repo_by_url", "inject_proxy",
self.spec.proxy.value)

def render_update_parent_image_stream_tag(self, use_auth=None):
phase = 'prebuild_plugins'
plugin = 'update_parent_image_stream_tag'
if not self.dj.dock_json_has_plugin_conf(phase, plugin):
return

self.dj.dock_json_set_arg(phase, plugin, 'openshift_url',
self.spec.builder_openshift_url.value)
self.dj.dock_json_set_arg(phase, plugin, 'build_json_dir',
self.spec.builder_build_json_dir.value)
self.dj.dock_json_set_arg(phase, plugin, 'image_stream_tag',
self.spec.trigger_imagestreamtag.value)
if use_auth is not None:
self.dj.dock_json_set_arg(phase, plugin, 'use_auth', use_auth)

def render_check_and_set_rebuild(self, use_auth=None):
if self.dj.dock_json_has_plugin_conf('prebuild_plugins',
'check_and_set_rebuild'):
Expand Down Expand Up @@ -394,7 +379,6 @@ def adjust_for_triggers(self):
remove_plugins = [
("prebuild_plugins", "check_and_set_rebuild"),
("prebuild_plugins", "stop_autorebuild_if_disabled"),
("prebuild_plugins", "update_parent_image_stream_tag"),
("exit_plugins", "sendmail"),
]

Expand Down Expand Up @@ -794,7 +778,6 @@ def render(self, validate=True):
self.render_add_yum_repo_by_url()

use_auth = self.spec.use_auth.value
self.render_update_parent_image_stream_tag(use_auth=use_auth)
self.render_check_and_set_rebuild(use_auth=use_auth)
self.render_store_metadata_in_osv3(use_auth=use_auth)

Expand Down
42 changes: 0 additions & 42 deletions tests/build/test_build_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,6 @@ def test_render_prod_request_with_repo(self, build_image, build_imagestream, pro
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"stop_autorebuild_if_disabled")
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"update_parent_image_stream_tag")

assert plugin_value_get(plugins, "prebuild_plugins", "bump_release",
"args", "hub") == "http://hub/"
Expand Down Expand Up @@ -397,9 +394,6 @@ def test_render_prod_request(self, proxy):
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"stop_autorebuild_if_disabled")
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"update_parent_image_stream_tag")

assert plugin_value_get(plugins, "prebuild_plugins", "bump_release",
"args", "hub") == "http://hub/"
Expand Down Expand Up @@ -489,9 +483,6 @@ def test_render_prod_without_koji_request(self):
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"stop_autorebuild_if_disabled")
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"update_parent_image_stream_tag")
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins", "bump_release")
assert plugin_value_get(plugins, "prebuild_plugins", "distgit_fetch_artefacts",
Expand Down Expand Up @@ -570,9 +561,6 @@ def test_render_prod_with_secret_request(self):
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"stop_autorebuild_if_disabled")
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"update_parent_image_stream_tag")

assert plugin_value_get(plugins, "prebuild_plugins", "bump_release",
"args", "hub") == "http://hub/"
Expand Down Expand Up @@ -705,9 +693,6 @@ def test_render_prod_with_registry_secrets(self):
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"stop_autorebuild_if_disabled")
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"update_parent_image_stream_tag")
assert get_plugin(plugins, "prebuild_plugins", "bump_release")
assert get_plugin(plugins, "prebuild_plugins", "koji")
with pytest.raises(NoSuchPluginException):
Expand Down Expand Up @@ -944,9 +929,6 @@ def test_render_with_yum_repourls(self):
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"stop_autorebuild_if_disabled")
with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins",
"update_parent_image_stream_tag")

assert plugin_value_get(plugins, "prebuild_plugins", "bump_release",
"args", "hub") == "http://hub/"
Expand Down Expand Up @@ -1131,7 +1113,6 @@ def test_render_prod_request_with_trigger(self, tmpdir, registry_uri,
'pdc_secret': pdc_secret_name,
'pdc_url': 'https://pdc.example.com',
'smtp_uri': 'smtp.example.com',
'builder_build_json_dir': '/usr/share/osbs',
}
if use_auth is not None:
kwargs['use_auth'] = use_auth
Expand All @@ -1150,26 +1131,6 @@ def test_render_prod_request_with_trigger(self, tmpdir, registry_uri,
"check_and_set_rebuild", "args",
"url") == kwargs["openshift_uri"]

assert get_plugin(plugins, "prebuild_plugins", "update_parent_image_stream_tag")
assert plugin_value_get(plugins, "prebuild_plugins",
"update_parent_image_stream_tag", "args",
"openshift_url") == kwargs["openshift_uri"]
assert plugin_value_get(plugins, "prebuild_plugins",
"update_parent_image_stream_tag", "args",
"build_json_dir") == kwargs["builder_build_json_dir"]
assert plugin_value_get(plugins, "prebuild_plugins",
"update_parent_image_stream_tag", "args",
"image_stream_tag") == kwargs["base_image"]
if use_auth is None:
with pytest.raises(KeyError):
plugin_value_get(plugins, "prebuild_plugins",
"update_parent_image_stream_tag", "args",
"use_auth")
else:
assert plugin_value_get(plugins, "prebuild_plugins",
"update_parent_image_stream_tag", "args",
"use_auth") == use_auth

self.assert_import_image_plugin(
plugins=plugins,
name_label=name_label,
Expand Down Expand Up @@ -1242,9 +1203,6 @@ def test_render_custom_base_image_with_trigger(self, tmpdir, registry_uri,
get_plugin(plugins, "prebuild_plugins",
"stop_autorebuild_if_disabled")

with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "prebuild_plugins", "update_parent_image_stream_tag")

with pytest.raises(NoSuchPluginException):
get_plugin(plugins, "exit_plugins", "sendmail")

Expand Down

0 comments on commit 592d81b

Please sign in to comment.