Skip to content

Commit c2aee5f

Browse files
committed
chore: enable fuse config
1 parent d661563 commit c2aee5f

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.cl/cloudbuild.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,32 @@ steps:
2020
- '-c'
2121
- |
2222
apt-get update
23-
apt-get install -y sudo
23+
24+
# Check if FUSE device exists
25+
if [ ! -c /dev/fuse ]; then
26+
echo "Error: FUSE device /dev/fuse not found. FUSE might not be available in this environment."
27+
exit 1
28+
fi
29+
30+
# Create /etc/fuse.conf if it doesn't exist and populate with default content
31+
if [ ! -f /etc/fuse.conf ]; then
32+
echo "Creating /etc/fuse.conf with default content."
33+
cat <<EOF > /etc/fuse.conf
34+
# Set the maximum number of FUSE mounts allowed to non-root users.
35+
# The default is 1000.
36+
#mount_max = 1000
37+
38+
# Allow non-root users to specify the 'allow_other' mount option.
39+
#user_allow_other
40+
EOF
41+
fi
42+
43+
# Modify /etc/fuse.conf to uncomment user_allow_other
2444
sudo sed -i 's/#user_allow_other/user_allow_other/g' /etc/fuse.conf
2545

2646
- id: run mysql integration tests
2747
name: golang:${_VERSION}
28-
env:
48+
env:
2949
- "IP_TYPE=${_IP_TYPE}"
3050
- "GOOGLE_CLOUD_PROJECT=${PROJECT_ID}"
3151
secretEnv: ['MYSQL_CONNECTION_NAME','MYSQL_USER','MYSQL_PASS','MYSQL_DB','POSTGRES_CONNECTION_NAME','POSTGRES_USER','POSTGRES_USER_IAM','POSTGRES_PASS','POSTGRES_DB','POSTGRES_CAS_CONNECTION_NAME','POSTGRES_CAS_PASS','POSTGRES_CUSTOMER_CAS_CONNECTION_NAME','POSTGRES_CUSTOMER_CAS_PASS','POSTGRES_CUSTOMER_CAS_DOMAIN_NAME','SQLSERVER_CONNECTION_NAME','SQLSERVER_USER','SQLSERVER_PASS','SQLSERVER_DB','IMPERSONATED_USER']

0 commit comments

Comments
 (0)