From 839be1e07cf579d2eb67eb1e2b6a2c565a3641a4 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 24 Jul 2018 14:44:43 -0400 Subject: [PATCH] ceph-iscsi-cli-flake8: initial version Signed-off-by: Jason Dillaman --- ceph-iscsi-cli-flake8/build/build | 9 +++ .../definitions/ceph-iscsi-config-flake8.yml | 61 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 ceph-iscsi-cli-flake8/build/build create mode 100644 ceph-iscsi-cli-flake8/config/definitions/ceph-iscsi-config-flake8.yml diff --git a/ceph-iscsi-cli-flake8/build/build b/ceph-iscsi-cli-flake8/build/build new file mode 100644 index 00000000..8c66e74f --- /dev/null +++ b/ceph-iscsi-cli-flake8/build/build @@ -0,0 +1,9 @@ +#!/bin/bash + +# the following two methods exist in scripts/build_utils.sh +pkgs=( "tox" ) +install_python_packages "pkgs[@]" + +cd "$WORKSPACE/ceph-iscsi-cli" + +$VENV/tox -rv -e flake8 diff --git a/ceph-iscsi-cli-flake8/config/definitions/ceph-iscsi-config-flake8.yml b/ceph-iscsi-cli-flake8/config/definitions/ceph-iscsi-config-flake8.yml new file mode 100644 index 00000000..4f428a38 --- /dev/null +++ b/ceph-iscsi-cli-flake8/config/definitions/ceph-iscsi-config-flake8.yml @@ -0,0 +1,61 @@ +- scm: + name: ceph-iscsi-cli + scm: + - git: + url: https://github.com/ceph/ceph-iscsi-cli.git + branches: + - ${sha1} + refspec: +refs/pull/*:refs/remotes/origin/pr/* + browser: auto + timeout: 20 + skip-tag: true + wipe-workspace: true + basedir: "ceph-iscsi-cli" + +- job: + name: ceph-iscsi-cli-flake8 + description: Runs Flake8 tests for ceph-iscsi-cli on each GitHub PR + project-type: freestyle + node: python3 + block-downstream: false + block-upstream: false + defaults: global + display-name: 'ceph-iscsi-cli: Flake8' + quiet-period: 5 + retry-count: 3 + + properties: + - build-discarder: + days-to-keep: 15 + num-to-keep: 30 + artifact-days-to-keep: 15 + artifact-num-to-keep: 15 + - github: + url: https://github.com/ceph/ceph-iscsi-cli/ + + parameters: + - string: + name: sha1 + description: "A pull request ID, like 'origin/pr/72/head'" + + triggers: + - github-pull-request: + admin-list: + - dillaman + org-list: + - ceph + trigger-phrase: 'jenkins flake8' + only-trigger-phrase: false + github-hooks: true + permit-all: true + auto-close-on-fail: false + status-context: "Flake8" + + scm: + - ceph-iscsi-cli + + builders: + - shell: + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/build -- 2.39.5