File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1414# limitations under the License.
1515
1616BUILDS_FILE=" $PWD /builds.txt"
17+ # Repositories have .*ignore files that can cause periodic builds to fail if
18+ # data files used for tests are included. This is because for periodic builds,
19+ # cloudbuild uploads the source files to GCS then runs the tests against the
20+ # uploaded source files. In other cases of running the same tests, the tests are
21+ # run directly against the repository.
22+ # This is a list of strings of the format <file>;<line pattern> where the
23+ # line pattern needs to be removed from the file for periodic builds.
24+ FILE_LINES_TO_REMOVE=(" ./website/.dockerignore;/test_data/d" " ./website/.dockerignore;/testdata/d" " ./data/.gitignore;/data/d" )
1725
1826# Returns the first folder in a path-like string that doesn't start with /
1927#
@@ -116,6 +124,14 @@ function main {
116124 cloudbuild_path=$( echo " $cloudbuild_config " | cut -d' ' -f1)
117125 clone_dc $( get_root_folder_of_path_like $cloudbuild_path )
118126 done < " $BUILDS_FILE "
127+
128+ for file_line in ${FILE_LINES_TO_REMOVE[@]} ; do
129+ file_path=$( echo $file_line | cut -d' ;' -f1)
130+ line_pattern=$( echo $file_line | cut -d' ;' -f2)
131+ if [ -f $file_path ]; then
132+ sed -i $line_pattern $file_path
133+ fi
134+ done
119135
120136 # Launch the build jobs in parallel, accumulating process IDs
121137 # in $pids. reference: https://stackoverflow.com/a/26240420
You can’t perform that action at this time.
0 commit comments