diff options
author | Jürg Billeter <j@bitron.ch> | 2017-05-29 15:33:15 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-06-27 10:30:29 +0200 |
commit | 21bbf6196147b8bb0533732019165687131bfd07 (patch) | |
tree | cf69c3d65aaa636f65c96b939dd54ebe2736e813 /buildstream/_scheduler/pushqueue.py | |
parent | 656a3a3df7f18240adc22be7fb0090eb6cc42b02 (diff) | |
download | buildstream-21bbf6196147b8bb0533732019165687131bfd07.tar.gz |
Artifact push support
Diffstat (limited to 'buildstream/_scheduler/pushqueue.py')
-rw-r--r-- | buildstream/_scheduler/pushqueue.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/buildstream/_scheduler/pushqueue.py b/buildstream/_scheduler/pushqueue.py new file mode 100644 index 000000000..fa73dfa14 --- /dev/null +++ b/buildstream/_scheduler/pushqueue.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2016 Codethink Limited +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library. If not, see <http://www.gnu.org/licenses/>. +# +# Authors: +# Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> +# Jürg Billeter <juerg.billeter@codethink.co.uk> + +# BuildStream toplevel imports +from .. import Consistency + +# Local imports +from . import Queue, QueueType + + +# A queue which pushes element artifacts +# +class PushQueue(Queue): + + action_name = "Push" + complete_name = "Pushed" + queue_type = QueueType.PUSH + + def process(self, element): + element._push() + + def skip(self, element): + return not element._built() + + def done(self, element, result, returncode): + + if returncode != 0: + return |