File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,16 @@ this.helper = new JobHelper(this)
96
96
helper. runWithNotification {
97
97
98
98
stage(' Configure' ) {
99
+ // We want to make sure that if we are building a PR that the branch name will not require any escaping of symbols in it.
100
+ // Otherwise, it may lead to cryptic build errors.
101
+ if (helper. scmSource. branch. name && ! (helper. scmSource. branch. name ==~ / ^[\w\d\/\\ _\-\. ]+$/ )) {
102
+ throw new IllegalArgumentException ("""
103
+ Branch name ${ helper.scmSource.branch.name} contains unexpected symbols.
104
+ Only characters, digits and -_.\\ / symbols are allowed in the branch name.
105
+ Change the branch name and open a new Pull Request.
106
+ """ )
107
+ }
108
+
99
109
this . environments = AlternativeMultiMap . create([
100
110
jdk : [
101
111
// This should not include every JDK; in particular let's not care too much about EOL'd JDKs like version 9
You can’t perform that action at this time.
0 commit comments