Example #1
0
    def on_git_push(self):
        config = self._configuration_get()

        repo = git.DEFAULT_CODE_REPO
        revision = git.git_code_version(repo)
        codeVersionId = "git-%s" % revision

        config.codeVersions[codeVersionId] = CodeVersion(id=codeVersionId,
                                                         filename=revision,
                                                         atype="git",
                                                         description=git.git_last_description(repo))

        self._configuration_set(config)
Example #2
0
  def git_push_hook(self, kwargs):
    if len(kwargs) != 0:
      return HttpErrorResponse(ManagerException(ManagerException.E_ARGS_UNEXPECTED, kwargs.keys()).message)

    config = self._configuration_get()

    repo = git.DEFAULT_CODE_REPO
    codeVersionId = git.git_code_version(repo)

    config.codeVersions[codeVersionId] = CodeVersion(id=codeVersionId, 
                                                     filename=codeVersionId, 
                                                     atype="git", 
                                                     description=git.git_last_description(repo))

    self._configuration_set(config)
    return HttpJsonResponse({ 'codeVersionId': codeVersionId })
Example #3
0
    def git_push_hook(self, kwargs):
        if len(kwargs) != 0:
            return HttpErrorResponse(
                ManagerException(ManagerException.E_ARGS_UNEXPECTED,
                                 kwargs.keys()).message)

        config = self._configuration_get()

        repo = git.DEFAULT_CODE_REPO
        codeVersionId = git.git_code_version(repo)

        config.codeVersions[codeVersionId] = CodeVersion(
            id=codeVersionId,
            filename=codeVersionId,
            atype="git",
            description=git.git_last_description(repo))

        self._configuration_set(config)
        return HttpJsonResponse({'codeVersionId': codeVersionId})
Example #4
0
 def test_06_git_last_description(self):
     repo = git.git_create_tmp_repo()
     self.assertEquals("Initial commit", git.git_last_description(repo))
Example #5
0
 def test_06_git_last_description(self):
     repo = git.git_create_tmp_repo() 
     self.assertEquals("Initial commit", git.git_last_description(repo))