jjb: barectf: Modernize job, remove pylint
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 14 Aug 2020 21:40:13 +0000 (17:40 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Fri, 14 Aug 2020 21:40:13 +0000 (17:40 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
jobs/barectf.yaml
scripts/barectf/build.sh
scripts/barectf/pylint.sh [deleted file]

index 655fcb7bad2d1a6f3cec7712a7b38c79535542ae..e828d28e2b3751de7344e889f98991dba6ce5382 100644 (file)
@@ -1,3 +1,5 @@
+---
+## Defaults ##
 - defaults:
     name: barectf
     description: |
       - timestamps
       - ansicolor:
           colormap: xterm
-  #      - credentials-binding:
-  #          - username-password-separated:
-  #              credential-id: barectf_codecov_token
-  #              username: CODECOV_PROJECT_NAME
-  #              password: CODECOV_TOKEN
 
     scm:
       - git:
@@ -42,7 +39,7 @@
           url: https://github.com/{github_user}/{github_name}
 
 
-## Templates
+## Templates ##
 - job-template:
     name: barectf_{version}_build
     defaults: barectf
@@ -60,9 +57,6 @@
          !include-raw-escape: scripts/barectf/build.sh
 
     publishers:
-#      - archive:
-#          artifacts: 'build/**'
-#          allow-empty: false
       - email-ext:
          recipients: '{obj:email_to}'
          reply-to: ci-notification@lists.lttng.org
       - shell:
          !include-raw-escape: scripts/barectf/build.sh
 
-- job-template:
-    name: barectf_{version}_pylint
-    defaults: barectf
-    node: 'amd64'
-
-    triggers:
-      - pollscm:
-          cron: "@daily"
 
-    builders:
-       - shell:
-          !include-raw-escape: scripts/barectf/pylint.sh
+## Views ##
+- view-template:
+    name: 'Barectf'
+    view-type: list
+    regex: 'barectf[-_].*'
 
-    publishers:
-      - archive:
-          artifacts: 'pep8.out,pylint.out'
-      - violations:
-          pep8:
-            pattern: pep8.out
-            min: 10
-            max: 999
-            unstable: 999
-          pylint:
-            pattern: pylint.out
-            min: 10
-            max: 999
-            unstable: 999
-      - email-ext:
-         recipients: '{obj:email_to}'
-         reply-to: ci-notification@lists.lttng.org
-         always: false
-         unstable: false
-         first-failure: true
-         first-unstable: true
-         not-built: false
-         aborted: false
-         regression: false
-         failure: false
-         second-failure: false
-         improvement: false
-         still-failing: false
-         success: false
-         fixed: false
-         fixed-unhealthy: true
-         still-unstable: false
-         pre-build: false
-         matrix-trigger: only-parent
-         send-to:
-           - recipients
 
-## Project
+## Projects ##
 - project:
     name: barectf
     github_user: efficios
     jobs:
       - 'barectf_{version}_build':
           arch: !!python/tuple [i386, amd64]
-      - 'barectf_{version}_pylint'
 
 - project:
     name: gerrit-barectf
     github_user: efficios
-    github_name: babeltrace
+    github_name: barectf
     jobs:
       - 'dev_gerrit_barectf_{buildtype}':
           buildtype: build
           arch: !!python/tuple [i386, amd64]
+
+- project:
+    name: barectf-views
+    views:
+      - Barectf
index 9f07c6d33251b29ec47412bd8b54ca4a3342cc87..90ea995c7ea946c984c5ede79c5faaaa2163e99f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh -exu
 #
-# Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2015-2020 Michael Jeanson <mjeanson@efficios.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Has to be set in the environment
-#CODECOV_TOKEN=""
-
 SRCDIR="src/barectf"
 
 PYTHON3="python3"
-P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
 PYENV_HOME=$WORKSPACE/.pyenv/
 
 # Delete previously built virtualenv
@@ -30,14 +26,14 @@ if [ -d "$PYENV_HOME" ]; then
 fi
 
 # Create virtualenv and install necessary packages
-virtualenv --system-site-packages -p $PYTHON3 "$PYENV_HOME"
+virtualenv -p $PYTHON3 "$PYENV_HOME"
 
 set +u
+# shellcheck disable=SC1090
 . "$PYENV_HOME/bin/activate"
 set -u
 
-# install setuptools first
-pip install tox poetry
+pip install --quiet tox poetry
 
 cd "$SRCDIR"
 
diff --git a/scripts/barectf/pylint.sh b/scripts/barectf/pylint.sh
deleted file mode 100755 (executable)
index e142b1c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh -exu
-#
-# Copyright (C) 2016 - Michael Jeanson <mjeanson@efficios.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-SRCDIR="src/barectf"
-
-PYTHON3="python3"
-P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])")
-PYENV_HOME=$WORKSPACE/.pyenv/
-
-# Delete previously built virtualenv
-if [ -d "$PYENV_HOME" ]; then
-    rm -rf "$PYENV_HOME"
-fi
-
-# Create virtualenv and install necessary packages
-virtualenv --system-site-packages -p $PYTHON3 "$PYENV_HOME"
-
-set +u
-. "$PYENV_HOME/bin/activate"
-set -u
-
-pip install --quiet pylint
-pip install --quiet pep8
-
-cd "$SRCDIR"
-
-pep8 barectf | tee "$WORKSPACE/pep8.out"
-
-pylint -f parseable --ignore="_version.py" --disable=C0111 barectf | tee "$WORKSPACE/pylint.out"
This page took 0.026999 seconds and 4 git commands to generate.