From e5cd071d622d4ddbc20556bbd5ac90b3fcce3f93 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 29 Sep 2018 11:47:52 +0800 Subject: [PATCH] ceph-dashboard-pull-requests: fix permission denied error as stdout redirect is performed by the shell, and shell is launched by the "jenkins" user, so permission denied is expected when we are trying to create a file under /etc/yum.repos.d/. in that case, we'll have following failure: /tmp/jenkins8899238112048417478.sh: line 14: /etc/yum.repos.d/google-chrome.repo: Permission denied Build step 'Execute shell' marked build as failure Signed-off-by: Kefu Chai --- ceph-dashboard-pull-requests/setup/setup | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ceph-dashboard-pull-requests/setup/setup b/ceph-dashboard-pull-requests/setup/setup index 835a2d08..9fdd1c74 100644 --- a/ceph-dashboard-pull-requests/setup/setup +++ b/ceph-dashboard-pull-requests/setup/setup @@ -9,13 +9,13 @@ if grep -q debian /etc/*-release; then sudo apt-get install -y google-chrome-stable elif grep -q rhel /etc/*-release; then - sudo cat <<-EOF > /etc/yum.repos.d/google-chrome.repo - [google-chrome] - name=google-chrome - baseurl=https://dl.google.com/linux/chrome/rpm/stable/x86_64 - enabled=1 - gpgcheck=1 - gpgkey=https://dl.google.com/linux/linux_signing_key.pub - EOF + sudo dd of=/etc/yum.repos.d/google-chrome.repo status=none <