]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
adds a tool to check node usage in the labs
authorGregory Meno <gmeno@redhat.com>
Wed, 9 Aug 2017 18:25:44 +0000 (11:25 -0700)
committerGregory Meno <gmeno@redhat.com>
Thu, 10 Aug 2017 04:13:39 +0000 (21:13 -0700)
Signed-off-by: Gregory Meno <gmeno@redhat.com>
lab-cop/build/build [new file with mode: 0755]
lab-cop/config/definitions/lab-cop.yml [new file with mode: 0644]

diff --git a/lab-cop/build/build b/lab-cop/build/build
new file mode 100755 (executable)
index 0000000..ba7baa6
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+set -x
+
+function main() {
+    # install some of our dependencies
+    pushd "$WORKSPACE/teuthology"
+    git remote -v
+    ./bootstrap
+    curl -XGET -L paddles.front.sepia.ceph.com/nodes | jq '[.[] | select(.description == null or .description == "None") | select(.locked == true)] | group_by(.locked_by) | .[] | {locked_by: .[0].locked_by, name: [ .[].name | tostring] | join(" ")} | select(.locked_by | tostring| test("scheduled")|not)'
+    popd
+    exit $?
+}
+
+main "$@"
diff --git a/lab-cop/config/definitions/lab-cop.yml b/lab-cop/config/definitions/lab-cop.yml
new file mode 100644 (file)
index 0000000..a43ae75
--- /dev/null
@@ -0,0 +1,41 @@
+- scm:
+    name: lab-cop
+    scm:
+      - git:
+          url: https://github.com/ceph/teuthology.git
+          branches:
+            - ${sha1}
+          refspec: +refs/pull/*:refs/remotes/origin/pr/*
+          browser: auto
+          timeout: 20
+          skip-tag: true
+          wipe-workspace: false
+          basedir: "lab-cop"
+
+- job:
+    name: lab-cop
+    node: small && xenial
+    defaults: global
+    display-name: 'lab-cop'
+    properties:
+      - github:
+          url: https://github.com/ceph/teuthology/
+    logrotate:
+      daysToKeep: 15
+      numToKeep: 30
+      artifactDaysToKeep: -1
+      artifactNumToKeep: -1
+
+    parameters:
+      - string:
+          name: sha1
+          description: "A pull request ID, like 'origin/pr/72/head'"
+
+    scm:
+      - lab-cop
+
+    builders:
+      - shell:
+          !include-raw:
+            - ../../build/build
+