From: Michael Jeanson Date: Fri, 14 Aug 2020 21:40:13 +0000 (-0400) Subject: jjb: barectf: Modernize job, remove pylint X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b50820f171d20a4f76e4a77c236af50e353fe771;p=lttng-ci.git jjb: barectf: Modernize job, remove pylint Signed-off-by: Michael Jeanson --- diff --git a/jobs/barectf.yaml b/jobs/barectf.yaml index 655fcb7..e828d28 100644 --- a/jobs/barectf.yaml +++ b/jobs/barectf.yaml @@ -1,3 +1,5 @@ +--- +## Defaults ## - defaults: name: barectf description: | @@ -14,11 +16,6 @@ - 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 @@ -133,57 +127,15 @@ - 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 @@ -194,13 +146,17 @@ 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 diff --git a/scripts/barectf/build.sh b/scripts/barectf/build.sh index 9f07c6d..90ea995 100755 --- a/scripts/barectf/build.sh +++ b/scripts/barectf/build.sh @@ -1,6 +1,6 @@ #!/bin/sh -exu # -# Copyright (C) 2015 - Michael Jeanson +# Copyright (C) 2015-2020 Michael Jeanson # # 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 @@ -15,13 +15,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# 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 index e142b1c..0000000 --- a/scripts/barectf/pylint.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -exu -# -# Copyright (C) 2016 - Michael Jeanson -# -# 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 . - -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"