def test_jenkins_ext(self): fLOG( __file__, self._testMethodName, OutputPrint=__name__ == "__main__") srv = JenkinsExt( "http://localhost:8080/", "user", "password", mock=True) github = "https://github.com/sdpython/" if not sys.platform.startswith("win"): # not yet implemented return conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=None, location=r"/home/username/jenkins/", dependencies={ "myversion": "/home/username/mymodule/src/", }, platform="win32") assert "MYVERSION=/home/username/mymodule/src/" in conf assert "auto_unittest_setup_help.bat" in conf conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=None, location=r"/home/username/jenkins/", dependencies={ "myversion": "/home/username/mymodule/src/", }, scheduler="H H(13-14) * * *", platform="win32") assert "H H(13-14) * * *" in conf try: conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=["pyquickhelper"], location=r"/home/username/jenkins/", dependencies={ "myversion": "/home/username/mymodule/src/", }, scheduler="H H(13-14) * * *", platform="win32") raise Exception("should not happen") except JenkinsExtException: pass conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=["pyquickhelper"], location=r"/home/username/jenkins/", dependencies={ "myversion": "/home/username/mymodule/src/", }, scheduler=None, platform="win32") assert "pyquickhelper" in conf
def test_jenkins_ext(self): fLOG( __file__, self._testMethodName, OutputPrint=__name__ == "__main__") srv = JenkinsExt( "http://localhost:8080/", "user", "password", mock=True, fLOG=fLOG, platform="win") github = "https://github.com/sdpython/" conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=None, location=r"/home/username/jenkins/") assert "auto_unittest_setup_help.bat" in conf conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=None, location=r"/home/username/jenkins/", scheduler="H H(13-14) * * *") assert "H H(13-14) * * *" in conf try: conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=["pyquickhelper"], location=r"/home/username/jenkins/", scheduler="H H(13-14) * * *") raise Exception("should not happen") except JenkinsExtException: pass conf = srv.create_job_template("pyquickhelper", git_repo=github + "%s/" % "pyquickhelper", upstreams=["pyquickhelper"], location=r"/home/username/jenkins/", scheduler=None) assert "pyquickhelper" in conf