From 9b095b3b1a1f7179f4c3c62b17bc6ac010d53840 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Thu, 16 Apr 2020 14:06:56 +1000 Subject: [PATCH] Fix lftools install in rtd verify job Issue: RELENG-2846 Change-Id: I5c3cd6bf8f4af887ba00aa2e1a4d42775caac80a Signed-off-by: Anil Belur --- releasenotes/notes/fix-rtd-verify-7edbef07d90560cf.yaml | 13 +++++++++++++ shell/rtd-verify.sh | 9 +++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/fix-rtd-verify-7edbef07d90560cf.yaml diff --git a/releasenotes/notes/fix-rtd-verify-7edbef07d90560cf.yaml b/releasenotes/notes/fix-rtd-verify-7edbef07d90560cf.yaml new file mode 100644 index 00000000..d986ad1d --- /dev/null +++ b/releasenotes/notes/fix-rtd-verify-7edbef07d90560cf.yaml @@ -0,0 +1,13 @@ +--- +fixes: + - | + Fix the rtd verify script failure. The script attempts to install + lftools dev with --user and fails on the error. + + Error: + + [Errno 13] Permission denied: '/usr/local/lib/python3.6' + + This code is actually required when a new commands are added to lftools, + the docs verify job needs to run the new command and install dev version + lftools version. diff --git a/shell/rtd-verify.sh b/shell/rtd-verify.sh index 86254a10..a1b1330c 100644 --- a/shell/rtd-verify.sh +++ b/shell/rtd-verify.sh @@ -30,9 +30,14 @@ fi git fetch origin "$GERRIT_REFSPEC" && git checkout FETCH_HEAD git submodule update + +# When a new commands are added in lftools, the docs verify job needs to +# run the new command which requires installing the lftools dev version if [[ $JOB_NAME == "lf-infra-lftools-rtd-verify-any" ]]; then - # Install patchset lftools - python3 -m pip install --user -e . + # shellcheck disable=SC1090 + source ~/lf-env.sh + lf-activate-venv pip + pip install -e . fi echo "---> Generating docs" -- 2.16.6