From: Eric Ball Date: Thu, 21 Jan 2021 23:27:53 +0000 (-0800) Subject: Add license check to tox X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=15d0feb21ed94e8c3b2a9f11f016c82a5039dfb9;p=releng%2Fpipelines.git Add license check to tox This also includes a few fixes for tox testing, including updating global-jjb and making python3 default for all tox envs. Issue: RELENG-3150 Signed-off-by: Eric Ball Change-Id: I90ed7e273ea2341d824187918cd36492f279ea14 --- diff --git a/Jenkinsfile b/Jenkinsfile index df1a05c..959c26d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // // Copyright (c) 2019 Intel Corporation // Copyright (c) 2020 The Linux Foundation diff --git a/global-jjb b/global-jjb index e3b47c7..53f811d 160000 --- a/global-jjb +++ b/global-jjb @@ -1 +1 @@ -Subproject commit e3b47c77a181b5f5bd3a79802a46188adb6173ce +Subproject commit 53f811d91411bf26a4acf00a9244c6ea0f4510d5 diff --git a/license-header.txt b/license-header.txt new file mode 100644 index 0000000..3d4ee67 --- /dev/null +++ b/license-header.txt @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright (c) 2019 Intel Corporation +// Copyright (c) 2020 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. diff --git a/tox.ini b/tox.ini index f38229e..701d8cf 100644 --- a/tox.ini +++ b/tox.ini @@ -8,17 +8,16 @@ envlist = reno minversion = 3.7 skipsdist = True +basepython = python3 [testenv:docs] description = Build the documentation with sphinx -basepython = python3 deps = -rrequirements.txt extras = openstack commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html [testenv:docs-linkcheck] description = Check the documentation links with sphinx -basepython = python3 deps = -rrequirements.txt commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck @@ -39,9 +38,12 @@ commands = gradle wrapper --gradle-version {env:GRADLE_VER} --distribution-type all ./gradlew clean test +[testenv:license] +deps = lftools +commands = lftools license check-dir -r '.+' vars + [testenv:pre-commit] description = Precommit checks for black, gitlint, etc. -basepython = python3 deps = pre-commit commands = pre-commit run --all-files --show-diff-on-failure @@ -49,6 +51,5 @@ commands = [testenv:reno] description = OpenStack Reno checks -basepython = python3 deps = reno commands = reno {posargs:--help}