Skip to content

Commit 282324a

Browse files
committed
xhore: update cloudbuild yaml step 0
1 parent e109045 commit 282324a

1 file changed

Lines changed: 21 additions & 15 deletions

File tree

.cl/cloudbuild.yaml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1-
# Copyright 2025 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
steps:
162
- id: enable-fuse-config
173
name: 'gcr.io/cloud-builders/docker'
184
entrypoint: bash
195
args:
206
- '-c'
217
- |
8+
# Check if FUSE device exists
9+
if [ ! -c /dev/fuse ]; then
10+
echo "Error: FUSE device /dev/fuse not found. FUSE might not be available in this environment."
11+
exit 1
12+
fi
13+
14+
# Create /etc/fuse.conf if it doesn't exist and populate with default content
15+
if [ ! -f /etc/fuse.conf ]; then
16+
echo "Creating /etc/fuse.conf with default content."
17+
cat <<EOF > /etc/fuse.conf
18+
# Set the maximum number of FUSE mounts allowed to non-root users.
19+
# The default is 1000.
20+
#mount_max = 1000
21+
22+
# Allow non-root users to specify the 'allow_other' mount option.
23+
#user_allow_other
24+
EOF
25+
fi
26+
27+
# Modify /etc/fuse.conf to uncomment user_allow_other
2228
sed -i 's/#user_allow_other/user_allow_other/g' /etc/fuse.conf
2329
- id: run mysql integration tests
2430
name: golang:${_VERSION}
25-
env:
31+
env:
2632
- "IP_TYPE=${_IP_TYPE}"
2733
- "GOOGLE_CLOUD_PROJECT=${PROJECT_ID}"
2834
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)