示例#1
0
    def render(self, validate=True):
        if validate:
            self.spec.validate()
        super(ProductionWithoutKojiBuild, self).render()
        dj = DockJsonManipulator(self.template, self.inner_template)

        self.template['parameters']['output']['imageTag'] = self.spec.image_tag.value

        dj.write_dock_json()
        self.build_json = self.template
        logger.debug(self.build_json)
        return self.build_json
示例#2
0
 def render(self, validate=True):
     if validate:
         self.spec.validate()
     super(SimpleBuild, self).render()
     dj = DockJsonManipulator(self.template, self.inner_template)
     self.template['parameters']['output']['imageTag'] = self.spec.image_tag.value
     dj.dock_json_set_arg('postbuild_plugins', "store_metadata_in_osv3", "url",
                          self.spec.openshift_uri.value)
     dj.write_dock_json()
     self.build_json = self.template
     logger.debug(self.build_json)
     return self.build_json
示例#3
0
    def render(self, validate=True):
        if validate:
            self.spec.validate()
        super(ProductionBuild, self).render()
        dj = DockJsonManipulator(self.template, self.inner_template)

        self.template['parameters']['output']['imageTag'] = self.spec.image_tag.value

        dj.dock_json_set_arg('prebuild_plugins', "koji", "target", self.spec.koji_target.value)
        dj.dock_json_set_arg('prebuild_plugins', "koji", "root", self.spec.kojiroot.value)
        dj.dock_json_set_arg('prebuild_plugins', "koji", "hub", self.spec.kojihub.value)

        dj.write_dock_json()
        self.build_json = self.template
        logger.debug(self.build_json)
        return self.build_json
示例#4
0
    def render(self, validate=True):
        if validate:
            self.spec.validate()
        super(ProductionWithSecretBuild, self).render()
        dj = DockJsonManipulator(self.template, self.inner_template)

        self.template['parameters']['source']['sourceSecretName'] = self.spec.source_secret.value
        # don't push to docker registry, we're using pulp here
        self.template['parameters']['output']['registry'] = ""
        dj.dock_json_set_arg('postbuild_plugins', "pulp_push", "pulp_registry_name",
                             self.spec.pulp_registry.value)
        dj.dock_json_set_arg('postbuild_plugins', "cp_built_image_to_nfs", "nfs_server_path",
                             self.spec.nfs_server_path.value)
        if self.spec.nfs_dest_dir.value:
            dj.dock_json_set_arg('postbuild_plugins', "cp_built_image_to_nfs", "dest_dir",
                                 self.spec.nfs_dest_dir.value)
        dj.write_dock_json()

        self.build_json = self.template
        logger.debug(self.build_json)
        return self.build_json
示例#5
0
    def render(self, validate=True):
        if validate:
            self.spec.validate()
        super(ProductionBuild, self).render()
        dj = DockJsonManipulator(self.template, self.inner_template)

        self.template['parameters']['output']['imageTag'] = self.spec.image_tag.value

        # if there is yum repo specified, don't pick stuff from koji
        if self.spec.yum_repourls.value:
            logger.info("removing koji from request, because there is yum repo specified")
            dj.remove_plugin("prebuild_plugins", "koji")
        else:
            dj.dock_json_set_arg('prebuild_plugins', "koji", "target", self.spec.koji_target.value)
            dj.dock_json_set_arg('prebuild_plugins', "koji", "root", self.spec.kojiroot.value)
            dj.dock_json_set_arg('prebuild_plugins', "koji", "hub", self.spec.kojihub.value)

        dj.write_dock_json()
        self.build_json = self.template
        logger.debug(self.build_json)
        return self.build_json