-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathReleaserProperties.java
More file actions
1779 lines (1397 loc) · 48.2 KB
/
Copy pathReleaserProperties.java
File metadata and controls
1779 lines (1397 loc) · 48.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2013-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package releaser.internal;
import java.io.Serializable;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
import jakarta.validation.constraints.NotBlank;
import org.apache.commons.lang.SerializationUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
/**
* Since, we are making a deep copy of this object, remember to have all the nested
* classes to implement the Serializable interface.
*
* @author Marcin Grzejszczak
*/
@ConfigurationProperties("releaser")
@Validated
public class ReleaserProperties implements Serializable {
/**
* By default Releaser assumes running the program from the current working directory.
* If you want to change this behaviour - just change this value.
*/
private String workingDir;
/**
* If set to {@code true} will run only post release tasks.
*/
private boolean postReleaseTasksOnly = false;
/**
* If set to {@code true} will not run post release tasks.
*/
private boolean skipPostReleaseTasks = false;
private Flow flow = new Flow();
private Git git = new Git();
private Pom pom = new Pom();
private Maven maven = new Maven();
private Bash bash = new Bash();
private Gradle gradle = new Gradle();
private Sagan sagan = new Sagan();
private Template template = new Template();
private Versions versions = new Versions();
private boolean commercial = false;
private Bundles bundles = new Bundles();
/**
* Project name to its version - overrides all versions retrieved from a release train
* repository like Spring Cloud Release.
*/
private Map<String, String> fixedVersions = new LinkedHashMap<>();
private MetaRelease metaRelease = new MetaRelease();
public String getWorkingDir() {
return StringUtils.hasText(this.workingDir) ? this.workingDir : System.getProperty("user.dir");
}
public void setWorkingDir(String workingDir) {
this.workingDir = workingDir;
}
public Flow getFlow() {
return this.flow;
}
public void setFlow(Flow flow) {
this.flow = flow;
}
public Git getGit() {
return this.git;
}
public void setGit(Git git) {
this.git = git;
}
public Pom getPom() {
return this.pom;
}
public void setPom(Pom pom) {
this.pom = pom;
}
public Maven getMaven() {
return this.maven;
}
public void setMaven(Maven maven) {
this.maven = maven;
}
public Gradle getGradle() {
return this.gradle;
}
public void setGradle(Gradle gradle) {
this.gradle = gradle;
}
public Bash getBash() {
return bash;
}
public void setBash(Bash bash) {
this.bash = bash;
}
public Map<String, String> getFixedVersions() {
return this.fixedVersions;
}
public void setFixedVersions(Map<String, String> fixedVersions) {
this.fixedVersions = fixedVersions;
}
public MetaRelease getMetaRelease() {
return this.metaRelease;
}
public void setMetaRelease(MetaRelease metaRelease) {
this.metaRelease = metaRelease;
}
public Sagan getSagan() {
return this.sagan;
}
public void setSagan(Sagan sagan) {
this.sagan = sagan;
}
public Template getTemplate() {
return this.template;
}
public void setTemplate(Template template) {
this.template = template;
}
public boolean isPostReleaseTasksOnly() {
return this.postReleaseTasksOnly;
}
public void setPostReleaseTasksOnly(boolean postReleaseTasksOnly) {
this.postReleaseTasksOnly = postReleaseTasksOnly;
}
public boolean isSkipPostReleaseTasks() {
return this.skipPostReleaseTasks;
}
public void setSkipPostReleaseTasks(boolean skipPostReleaseTasks) {
this.skipPostReleaseTasks = skipPostReleaseTasks;
}
public Versions getVersions() {
return this.versions;
}
public void setVersions(Versions versions) {
this.versions = versions;
}
public boolean isCommercial() {
return commercial;
}
public void setCommercial(boolean commercial) {
this.commercial = commercial;
}
public Bundles getBundles() {
return bundles;
}
public void setBundles(Bundles bundles) {
this.bundles = bundles;
}
@Override
public String toString() {
return "ReleaserProperties{" + "workingDir='" + this.workingDir + '\'' + ", git=" + this.git + ", pom="
+ this.pom + ", maven=" + this.maven + ", gradle=" + this.gradle + ", sagan=" + this.sagan
+ ", fixedVersions=" + this.fixedVersions + ", metaRelease=" + this.metaRelease + ", template="
+ this.template + ", versions=" + this.versions + ", commercial=" + this.commercial + ", bundles="
+ this.bundles + '}';
}
public ReleaserProperties copy() {
return (ReleaserProperties) SerializationUtils.clone(this);
}
/**
* Abstraction over command execution using different languages and frameworks.
*/
public interface Command {
/**
* @return build command
*/
String getGaReleaseBuildCommand();
/**
* @param buildCommand to set
*/
void setGaReleaseBuildCommand(String buildCommand);
/**
* @return build command
*/
String getBuildCommand();
/**
* @param buildCommand to set
*/
void setBuildCommand(String buildCommand);
/**
* @return deploy command
*/
String getDeployCommand();
/**
* @param deployCommand to set
*/
void setDeployCommand(String deployCommand);
/**
* @return deploy guides command
*/
String getDeployGuidesCommand();
/**
* @param deployGuidesCommand to set
*/
void setDeployGuidesCommand(String deployGuidesCommand);
/**
* @return docs publishing commands
*/
String getPublishDocsCommand();
/**
* @param publishDocsCommand to set
*/
void setPublishDocsCommand(String publishDocsCommand);
/**
* @return generate release train docs command
*/
String getGenerateReleaseTrainDocsCommand();
/**
* @param generateReleaseTrainDocsCommand to set
*/
void setGenerateReleaseTrainDocsCommand(String generateReleaseTrainDocsCommand);
/**
* @return system properties
*/
String getSystemProperties();
/**
* @param systemProperties to set
*/
void setSystemProperties(String systemProperties);
}
public static class MetaRelease implements Serializable {
/**
* Are we releasing the whole suite of apps or only one?
*/
private boolean enabled = false;
/**
* Name of the release train project.
*/
@NotBlank
private String releaseTrainProjectName;
/**
* All the names of dependencies that should be updated with the release train
* project version.
*/
private List<String> releaseTrainDependencyNames = new ArrayList<>();
/**
* The URL of the Git organization. We'll append each project's name to it.
*/
@NotBlank
private String gitOrgUrl;
/**
* Names of projects to skip deployment for meta-release.
*/
private List<String> projectsToSkip = new ArrayList<String>();
/**
* If provided, allows to provide groups of projects that can be ran in parallel.
* E.g.
* {@code --releaser.meta-release.release-groups[0]=projectA,projectB,projectC}
* {@code --releaser.meta-release.release-groups[1]=projectD,projectE}
* {@code --releaser.meta-release.release-groups[2]=projectF,projectG} The order
* is still provided by the list of versions passed to the releaser. Basing on
* that order, and this value we are able to build a flow with projects.
*/
private List<String> releaseGroups = new LinkedList<>();
/**
* Timeout in minutes during which we're waiting for a single composite task per a
* project to be executed. That means that if set to e.g. 180 then a release
* process for a single project should take at most 180 minutes.
*/
private int releaseGroupTimeoutInMinutes = 180;
/**
* Number of threads per release group. E.g. for thread count of 4 if there are 6
* projects in a release group, 4 of them will be executed in parallel and 2 will
* wait for their turn.
*/
private int releaseGroupThreadCount = 4;
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getGitOrgUrl() {
return this.gitOrgUrl;
}
public void setGitOrgUrl(String gitOrgUrl) {
this.gitOrgUrl = gitOrgUrl;
}
public String getReleaseTrainProjectName() {
return this.releaseTrainProjectName;
}
public void setReleaseTrainProjectName(String releaseTrainProjectName) {
this.releaseTrainProjectName = releaseTrainProjectName;
}
public List<String> getReleaseTrainDependencyNames() {
return this.releaseTrainDependencyNames;
}
public void setReleaseTrainDependencyNames(List<String> releaseTrainDependencyNames) {
this.releaseTrainDependencyNames = releaseTrainDependencyNames;
}
public List<String> getProjectsToSkip() {
return this.projectsToSkip;
}
public void setProjectsToSkip(List<String> projectsToSkip) {
this.projectsToSkip = projectsToSkip;
}
public List<String> getReleaseGroups() {
return this.releaseGroups;
}
public void setReleaseGroups(List<String> releaseGroups) {
this.releaseGroups = releaseGroups;
}
public int getReleaseGroupTimeoutInMinutes() {
return this.releaseGroupTimeoutInMinutes;
}
public void setReleaseGroupTimeoutInMinutes(int releaseGroupTimeoutInMinutes) {
this.releaseGroupTimeoutInMinutes = releaseGroupTimeoutInMinutes;
}
public int getReleaseGroupThreadCount() {
return this.releaseGroupThreadCount;
}
public void setReleaseGroupThreadCount(int releaseGroupThreadCount) {
this.releaseGroupThreadCount = releaseGroupThreadCount;
}
@Override
public String toString() {
return "MetaRelease{" + "enabled=" + enabled + ", releaseTrainProjectName='" + releaseTrainProjectName
+ '\'' + ", releaseTrainDependencyNames=" + releaseTrainDependencyNames + ", gitOrgUrl='"
+ gitOrgUrl + '\'' + ", projectsToSkip=" + projectsToSkip + ", releaseGroups=" + releaseGroups
+ ", releaseGroupTimeoutInMinutes=" + releaseGroupTimeoutInMinutes + ", releaseGroupThreadCount="
+ releaseGroupThreadCount + '}';
}
}
public static class Flow implements Serializable {
/**
* Should the default flow of jobs be preserved. If set to {@code false} will not
* register any jobs as beans, and it will be up to you to set the whole
* configuration of jobs.
*/
private boolean defaultEnabled = true;
public boolean isDefaultEnabled() {
return this.defaultEnabled;
}
public void setDefaultEnabled(boolean defaultEnabled) {
this.defaultEnabled = defaultEnabled;
}
}
public static class Git implements Serializable {
/**
* Absolute path to a directory with cache for OkHTTP calls to GitHub.
*/
@NotBlank
private String cacheDirectory = temporaryDirectory();
/**
* URL to a release train repository.
*/
@NotBlank
private String releaseTrainBomUrl;
/**
* URL to the documentation Git repository.
*/
private String documentationUrl;
/**
* The organization name on Github.
*/
@NotBlank
private String orgName;
/**
* URL to the release train project page repository.
*/
private String springProjectUrl;
/**
* URL to test samples.
*/
private String testSamplesProjectUrl;
/**
* URL to the release train documentation.
*/
private String releaseTrainDocsUrl;
/**
* URL to the release train wiki.
*/
private String releaseTrainWikiUrl;
/**
* Branch to check out for the documentation project.
*/
private String documentationBranch;
/**
* Branch to check out for the release train project.
*/
// TODO: seems to only be for gh-docs? we guess when we could use this?
private String springProjectBranch;
/**
* Branch to check out for the test samples.
*/
private String testSamplesBranch;
/**
* Branch to check out for the release train.
*/
private String releaseTrainBranch;
/**
* Branch to check out for the release train docs.
*/
private String releaseTrainDocsBranch;
/**
* Page prefix for the release train wiki. E.g. for
* [Spring-Cloud-Finchley-Release-Notes] it would be [Spring-Cloud].
*/
private String releaseTrainWikiPagePrefix;
/**
* Where should the release train repo get cloned to. If {@code null} defaults to
* a temporary directory.
*/
private String cloneDestinationDir;
/**
* If {@code true} then should fill the map of versions from Git. If {@code false}
* then picks fixed versions.
*/
private boolean fetchVersionsFromGit = true;
/**
* GitHub OAuth token to be used to interact with GitHub repo.
*/
private String oauthToken = "";
/**
* Optional Git username. If not passed keys will be used for authentication.
*/
private String username;
/**
* Optional Git password. If not passed keys will be used for authentication.
*/
private String password;
/**
* URL to the fat jar with Github Changelog Generator.
*/
private String githubChangelogGeneratorUrl = "https://github.com/spring-io/github-changelog-generator/releases/download/v0.0.8/github-changelog-generator.jar";
/**
* In order not to iterate endlessly over milestones we introduce a threshold of
* milestones that we will go through to find the matching milestone.
*/
private Integer numberOfCheckedMilestones = 50;
/**
* If {@code false}, will not update the documentation repository.
*/
private boolean updateDocumentationRepo = false;
/**
* If set to {@code false}, will not update Github milestones.
*/
private boolean updateGithubMilestones = false;
/**
* If set to {@code false}, will not create release notes for milestone.
*/
private boolean createReleaseNotesForMilestone = false;
/**
* If set to {@code false}, will not update Spring Guides for a release train.
*/
private boolean updateSpringGuides = false;
/**
* If set to {@code false}, will not update start.spring.io for a release train.
*/
private boolean updateStartSpringIo = false;
/**
* If set to {@code false}, will not update the Spring Project for a release
* train. E.g. for Spring Cloud will not update https://cloud.spring.io .
*/
private boolean updateSpringProject = false;
/**
* If set to {@code false}, will not update the test samples.
*/
private boolean runUpdatedSamples = false;
/**
* If set to {@code false}, will not update the release train docs.
*/
private boolean updateReleaseTrainDocs = false;
// TODO: Spring Cloud specific?
/**
* If set to {@code false}, will not clone and update the release train wiki.
*/
private boolean updateReleaseTrainWiki = false;
/**
* If set to {@code false}, will not clone and update the samples for all
* projects.
*/
private boolean updateAllTestSamples = false;
/**
* If set to {@code true}, we will sign any commits we make. In order to do this
* GPG must contain the keys for the spring-builds user. This flag can be used to
* override signing preferences in the Git config. For example, JGit will sign
* commits/tags if signing is enabled the Git config (either repo config or global
* config). If you do not want to sign anything then you can set this flag to
* false and the releaser will not attempt to sign anything. The same is true if
* signing is set to false in your Git config but you would like the releaser to
* sign commits/tags, setting this flag to true would enable signing to take
* place.
*/
private boolean signCommits = false;
private String signingKeyPassphrase;
/**
* Project to urls mapping. For each project will clone the test project and will
* update its versions.
*/
private Map<String, List<String>> allTestSampleUrls = new HashMap<>();
public String getReleaseTrainBomUrl() {
return this.releaseTrainBomUrl;
}
public void setReleaseTrainBomUrl(String releaseTrainBomUrl) {
this.releaseTrainBomUrl = releaseTrainBomUrl;
}
public String getDocumentationUrl() {
return this.documentationUrl;
}
public void setDocumentationUrl(String documentationUrl) {
this.documentationUrl = documentationUrl;
}
public String getSpringProjectUrl() {
return this.springProjectUrl;
}
public void setSpringProjectUrl(String springProjectUrl) {
this.springProjectUrl = springProjectUrl;
}
public String getTestSamplesProjectUrl() {
return this.testSamplesProjectUrl;
}
public void setTestSamplesProjectUrl(String testSamplesProjectUrl) {
this.testSamplesProjectUrl = testSamplesProjectUrl;
}
public String getTestSamplesBranch() {
return this.testSamplesBranch;
}
public void setTestSamplesBranch(String testSamplesBranch) {
this.testSamplesBranch = testSamplesBranch;
}
public String getDocumentationBranch() {
return this.documentationBranch;
}
public void setDocumentationBranch(String documentationBranch) {
this.documentationBranch = documentationBranch;
}
public String getSpringProjectBranch() {
return this.springProjectBranch;
}
public void setSpringProjectBranch(String springProjectBranch) {
this.springProjectBranch = springProjectBranch;
}
public boolean isUpdateDocumentationRepo() {
return this.updateDocumentationRepo;
}
public void setUpdateDocumentationRepo(boolean updateDocumentationRepo) {
this.updateDocumentationRepo = updateDocumentationRepo;
}
public boolean isRunUpdatedSamples() {
return this.runUpdatedSamples;
}
public void setRunUpdatedSamples(boolean runUpdatedSamples) {
this.runUpdatedSamples = runUpdatedSamples;
}
public boolean isUpdateAllTestSamples() {
return this.updateAllTestSamples;
}
public void setUpdateAllTestSamples(boolean updateAllTestSamples) {
this.updateAllTestSamples = updateAllTestSamples;
}
public String getCloneDestinationDir() {
return this.cloneDestinationDir;
}
public void setCloneDestinationDir(String cloneDestinationDir) {
this.cloneDestinationDir = cloneDestinationDir;
}
public String getOauthToken() {
return this.oauthToken;
}
public void setOauthToken(String oauthToken) {
this.oauthToken = oauthToken;
}
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getNumberOfCheckedMilestones() {
return this.numberOfCheckedMilestones;
}
public void setNumberOfCheckedMilestones(Integer numberOfCheckedMilestones) {
this.numberOfCheckedMilestones = numberOfCheckedMilestones;
}
public boolean isFetchVersionsFromGit() {
return this.fetchVersionsFromGit;
}
public void setFetchVersionsFromGit(boolean fetchVersionsFromGit) {
this.fetchVersionsFromGit = fetchVersionsFromGit;
}
public boolean isUpdateSpringGuides() {
return this.updateSpringGuides;
}
public void setUpdateSpringGuides(boolean updateSpringGuides) {
this.updateSpringGuides = updateSpringGuides;
}
public boolean isUpdateStartSpringIo() {
return this.updateStartSpringIo;
}
public void setUpdateStartSpringIo(boolean updateStartSpringIo) {
this.updateStartSpringIo = updateStartSpringIo;
}
public boolean isUpdateSpringProject() {
return this.updateSpringProject;
}
public void setUpdateSpringProject(boolean updateSpringProject) {
this.updateSpringProject = updateSpringProject;
}
public String getReleaseTrainBranch() {
return this.releaseTrainBranch;
}
public void setReleaseTrainBranch(String releaseTrainBranch) {
this.releaseTrainBranch = releaseTrainBranch;
}
public String getReleaseTrainDocsUrl() {
return this.releaseTrainDocsUrl;
}
public void setReleaseTrainDocsUrl(String releaseTrainDocsUrl) {
this.releaseTrainDocsUrl = releaseTrainDocsUrl;
}
public String getReleaseTrainDocsBranch() {
return this.releaseTrainDocsBranch;
}
public void setReleaseTrainDocsBranch(String releaseTrainDocsBranch) {
this.releaseTrainDocsBranch = releaseTrainDocsBranch;
}
public boolean isUpdateReleaseTrainDocs() {
return this.updateReleaseTrainDocs;
}
public void setUpdateReleaseTrainDocs(boolean updateReleaseTrainDocs) {
this.updateReleaseTrainDocs = updateReleaseTrainDocs;
}
public Map<String, List<String>> getAllTestSampleUrls() {
return this.allTestSampleUrls;
}
public void setAllTestSampleUrls(Map<String, List<String>> allTestSampleUrls) {
this.allTestSampleUrls = allTestSampleUrls;
}
public String getReleaseTrainWikiUrl() {
return this.releaseTrainWikiUrl;
}
public void setReleaseTrainWikiUrl(String releaseTrainWikiUrl) {
this.releaseTrainWikiUrl = releaseTrainWikiUrl;
}
public boolean isUpdateReleaseTrainWiki() {
return this.updateReleaseTrainWiki;
}
public void setUpdateReleaseTrainWiki(boolean updateReleaseTrainWiki) {
this.updateReleaseTrainWiki = updateReleaseTrainWiki;
}
public String getReleaseTrainWikiPagePrefix() {
return this.releaseTrainWikiPagePrefix;
}
public void setReleaseTrainWikiPagePrefix(String releaseTrainWikiPagePrefix) {
this.releaseTrainWikiPagePrefix = releaseTrainWikiPagePrefix;
}
public boolean isUpdateGithubMilestones() {
return this.updateGithubMilestones;
}
public void setUpdateGithubMilestones(boolean updateGithubMilestones) {
this.updateGithubMilestones = updateGithubMilestones;
}
public boolean isCreateReleaseNotesForMilestone() {
return createReleaseNotesForMilestone;
}
public void setCreateReleaseNotesForMilestone(boolean createReleaseNotesForMilestone) {
this.createReleaseNotesForMilestone = createReleaseNotesForMilestone;
}
public String getGithubChangelogGeneratorUrl() {
return githubChangelogGeneratorUrl;
}
public void setGithubChangelogGeneratorUrl(String githubChangelogGeneratorUrl) {
this.githubChangelogGeneratorUrl = githubChangelogGeneratorUrl;
}
public String getOrgName() {
return this.orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public String getCacheDirectory() {
return cacheDirectory;
}
public void setCacheDirectory(String cacheDirectory) {
this.cacheDirectory = cacheDirectory;
}
public boolean isSignCommits() {
return signCommits;
}
public void setSignCommits(boolean signCommits) {
this.signCommits = signCommits;
}
public String getSigningKeyPassphrase() {
return signingKeyPassphrase;
}
public void setSigningKeyPassphrase(String signingKeyPassphrase) {
this.signingKeyPassphrase = signingKeyPassphrase;
}
@Override
public String toString() {
return "Git{" + "releaseTrainBomUrl='" + this.releaseTrainBomUrl + '\'' + ", documentationUrl='"
+ this.documentationUrl + '\'' + ", documentationBranch='" + this.documentationBranch + '\''
+ ", releaseTrainBranch='" + this.releaseTrainBranch + '\'' + ", releaseTrainWikiUrl='"
+ this.releaseTrainWikiUrl + '\'' + ", updateDocumentationRepo=" + this.updateDocumentationRepo
+ ", springProjectUrl=" + this.springProjectUrl + ", springProjectBranch="
+ this.springProjectBranch + ", releaseTrainWikiPagePrefix=" + this.releaseTrainWikiPagePrefix
+ ", cloneDestinationDir='" + this.cloneDestinationDir + '\'' + ", fetchVersionsFromGit="
+ this.fetchVersionsFromGit + ", numberOfCheckedMilestones=" + this.numberOfCheckedMilestones
+ ", updateSpringGuides=" + this.updateSpringGuides + ", updateSpringProject="
+ this.updateSpringProject + ", sampleUrlsSize=" + this.allTestSampleUrls.size() + ", signCommits="
+ this.signCommits + '}';
}
private static String temporaryDirectory() {
try {
return Files.createTempDirectory("github-cache").toAbsolutePath().toString();
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
}
public static class Pom implements Serializable {
/**
* Which branch of release train BOM should be checked out. Defaults to
* {@code main}.
*/
private String branch = "main";
/**
* Subfolder of the pom that contains the {@code spring-boot-starer-parent}
* dependency.
*/
private String pomWithBootStarterParent;
/**
* Subfolder of the pom that contains the versions for the release train.
*/
@NotBlank
private String thisTrainBom;
/**
* The pattern to match a version property in a BOM. Remember to catch the
* dependency name in a group. E.g. "^(spring-cloud-.*)\\.version$".
*/
@NotBlank
private String bomVersionPattern;
/**
* List of regular expressions of ignored poms. Defaults to test projects and
* samples.
*/
@SuppressWarnings("unchecked")
private List<String> ignoredPomRegex = Collections.singletonList("^.*\\.git/.*$");
public String getBranch() {
return this.branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
public List<String> getIgnoredPomRegex() {
return this.ignoredPomRegex;
}
public void setIgnoredPomRegex(List<String> ignoredPomRegex) {
this.ignoredPomRegex = ignoredPomRegex;
}
public String getPomWithBootStarterParent() {
return this.pomWithBootStarterParent;
}