From: Gregory Meno Date: Wed, 9 Aug 2017 18:25:44 +0000 (-0700) Subject: adds a tool to check node usage in the labs X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c79fcb92cb0e69f369ebf4ed52689a41d7bc0a80;p=ceph-build.git adds a tool to check node usage in the labs Signed-off-by: Gregory Meno --- diff --git a/lab-cop/build/build b/lab-cop/build/build new file mode 100755 index 00000000..ba7baa62 --- /dev/null +++ b/lab-cop/build/build @@ -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 index 00000000..a43ae75b --- /dev/null +++ b/lab-cop/config/definitions/lab-cop.yml @@ -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 +