diff options
author | 2024-02-03 10:48:17 +0100 | |
---|---|---|
committer | 2024-02-03 10:48:17 +0100 | |
commit | eaf908437029fb291b327db680d550fbe36c86df (patch) | |
tree | 74dd4187567c69371a2cab8e3dfd5f0867d1dab9 | |
parent | Add getGitlabContext to Gitlab status (diff) | |
download | tinderbox-cluster-eaf908437029fb291b327db680d550fbe36c86df.tar.gz tinderbox-cluster-eaf908437029fb291b327db680d550fbe36c86df.tar.bz2 tinderbox-cluster-eaf908437029fb291b327db680d550fbe36c86df.zip |
Remove minio
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
-rw-r--r-- | buildbot_gentoo_ci/steps/minio.py | 60 |
1 files changed, 0 insertions, 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 |