commit: eaf908437029fb291b327db680d550fbe36c86df Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> AuthorDate: Sat Feb 3 09:48:17 2024 +0000 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> CommitDate: Sat Feb 3 09:48:17 2024 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=eaf90843
Remove minio Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org> buildbot_gentoo_ci/steps/minio.py | 60 --------------------------------------- 1 file changed, 60 deletions(-) diff --git a/buildbot_gentoo_ci/steps/minio.py b/buildbot_gentoo_ci/steps/minio.py deleted file mode 100644 index ac9ac3d..0000000 --- a/buildbot_gentoo_ci/steps/minio.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -from minio import Minio -from minio.error import ResponseError, BucketAlreadyOwnedByYou, BucketAlreadyExists - -from twisted.internet import defer -from twisted.python import log - -from buildbot.process.buildstep import BuildStep -from buildbot.process.results import SUCCESS -from buildbot.process.results import FAILURE - -#FIXME: -# get url, user from config -# get password from secret -url = '' -user = '' -password = '' - -class putFileToMinio(BuildStep): - - name = 'putFileToMinio' - description = 'Running' - descriptionDone = 'Ran' - descriptionSuffix = None - haltOnFailure = False - flunkOnFailure = True - warnOnWarnings = True - - def __init__(self, filename, target, bucket, **kwargs): - self.filename = filename - self.bucket = bucket - self.target = target - super().__init__(**kwargs) - - def getMinioConnect(self, url, user, password): - minioclient = Minio( - url, - access_key = user, - secret_key = password, - secure = False - ) - return minioclient - - @defer.inlineCallbacks - def pushFileToMinio(self): - try: - yield self.minio_connect.fput_object(self.bucket, self.target, self.filename) - except ResponseError as err: - print(err) - return FAILURE - return True - - @defer.inlineCallbacks - def run(self): - self.gentooci = self.master.namedServices['services'].namedServices['gentooci'] - self.minio_connect = yield self.getMinioConnect(url, user, password) - success = yield self.pushFileToMinio() - return SUCCESS