Add write permission to /data 65/13565/4
authorGary Wu <gary.i.wu@huawei.com>
Tue, 19 Sep 2017 18:46:08 +0000 (11:46 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Tue, 19 Sep 2017 21:48:48 +0000 (14:48 -0700)
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 <gary.i.wu@huawei.com>
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
jenkins-scripts/create_jenkins_user.sh
jenkins-scripts/docker.sh [new file with mode: 0755]
jenkins-scripts/system_type.sh

index 86a5c92..10e4709 100755 (executable)
@@ -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 (executable)
index 0000000..e6b06a2
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/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 :
index 9aeea20..1482a20 100755 (executable)
@@ -15,6 +15,7 @@ SYSTEM_TYPE=''
 
 IFS=','
 for i in "basebuild,basebuild" \
+         "docker,docker" \
          "centos,centos" \
          "trusty,trusty" \
          "xenial,xenial"