From 3447be1e3489f24f56a08c84fd3a03e162f8b231 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Tue, 19 Sep 2017 11:46:08 -0700 Subject: [PATCH] Add write permission to /data Create a /data directory on the VM that some ONAP containers need to mount to retrieve environment configuration data. Change-Id: I4ec91822f841c4b269d768f660f47ffecd243267 Issue-ID: INT-216 Signed-off-by: Gary Wu Signed-off-by: Andrew Grimberg --- jenkins-scripts/create_jenkins_user.sh | 6 ++++++ jenkins-scripts/docker.sh | 15 +++++++++++++++ jenkins-scripts/system_type.sh | 1 + 3 files changed, 22 insertions(+) create mode 100755 jenkins-scripts/docker.sh diff --git a/jenkins-scripts/create_jenkins_user.sh b/jenkins-scripts/create_jenkins_user.sh index 86a5c92d0..10e47091c 100755 --- a/jenkins-scripts/create_jenkins_user.sh +++ b/jenkins-scripts/create_jenkins_user.sh @@ -23,6 +23,12 @@ if [ "$?" == '0' ] then # Add jenkins user to docker group usermod -a -G docker jenkins + + # If /data exists it needs to be owned by jenkins + if [ -d /data ] + then + chown jenkins:jenkins /data + fi fi # Check if mock group exists diff --git a/jenkins-scripts/docker.sh b/jenkins-scripts/docker.sh new file mode 100755 index 000000000..e6b06a2ba --- /dev/null +++ b/jenkins-scripts/docker.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# @License EPL-1.0 +############################################################################## +# Copyright (c) 2016 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +############################################################################## + +# INT-216 add write permission to /data +mkdir -p /data + +# vim: sw=2 ts=2 sts=2 et : diff --git a/jenkins-scripts/system_type.sh b/jenkins-scripts/system_type.sh index 9aeea20d2..1482a20fe 100755 --- a/jenkins-scripts/system_type.sh +++ b/jenkins-scripts/system_type.sh @@ -15,6 +15,7 @@ SYSTEM_TYPE='' IFS=',' for i in "basebuild,basebuild" \ + "docker,docker" \ "centos,centos" \ "trusty,trusty" \ "xenial,xenial" -- 2.16.6