Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build handler in travis (Controller refactorization) #24

Open
tomsou opened this issue Sep 12, 2016 · 0 comments
Open

build handler in travis (Controller refactorization) #24

tomsou opened this issue Sep 12, 2016 · 0 comments

Comments

@tomsou
Copy link

tomsou commented Sep 12, 2016

In the frame of Controller refactorization the build handler is wrapped
via class methon build().

This implementation runs successfully in jenkins, however it fails in travis

There is a paradox issue here, which may concerns a limitation in travis ci:
the build handler is executed successfully when it is called as a bash script:
- sudo bash ./controllers/odl_beryllium_pb/build.sh
However, it fails when it (the same script) is called within python wrapper class method:

Controller.py


    def build(self):
        """ Wrapper to the controller build handler
        """
        logging.info('[Controller] Building')
        self.status = 'BUILDING'

        exit_status = util.netutil.ssh_run_command(self._ssh_conn,
                                    ' '.join([self.build_hnd]),
                                    '[controller.build_handler]')[0]
        if exit_status == 0:
            self.status = 'BUILT'
            logging.info("[Controller] Successful building")
        else:
            self.status = 'NOT BUILT'
            logging.error("[Controller] Failure during building")
            raise Exception('[Controller] Failure during building')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant