toys-release 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +9 -0
- data/docs/guide.md +533 -513
- data/lib/toys/release/version.rb +1 -1
- metadata +3 -3
data/docs/guide.md
CHANGED
|
@@ -53,11 +53,11 @@ RubyGem, but does not require familiarity with Toys.
|
|
|
53
53
|
|
|
54
54
|
Toys-Release must be installed into a GitHub repository. This involves:
|
|
55
55
|
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
|
|
60
|
-
*
|
|
56
|
+
* Installing a Toys tool;
|
|
57
|
+
* Writing a configuration file;
|
|
58
|
+
* Defining a set of GitHub Actions workflows and a set of GitHub labels
|
|
59
|
+
(a tool is provided to perform this step); and
|
|
60
|
+
* Providing necessary credentials.
|
|
61
61
|
|
|
62
62
|
### Prerequisites
|
|
63
63
|
|
|
@@ -286,12 +286,16 @@ appending the version to the component name, separated by a colon.
|
|
|
286
286
|
For example, to request releases of the `toys` and `toys-release` components,
|
|
287
287
|
you can enter the following text into "Components to release":
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
```sh
|
|
290
|
+
toys toys-release
|
|
291
|
+
```
|
|
290
292
|
|
|
291
293
|
To make the above request but specifically request version 0.3.0 of the
|
|
292
294
|
`toys-release` component:
|
|
293
295
|
|
|
294
|
-
|
|
296
|
+
```sh
|
|
297
|
+
toys toys-release:0.3.0
|
|
298
|
+
```
|
|
295
299
|
|
|
296
300
|
### Managing release pull requests
|
|
297
301
|
|
|
@@ -315,10 +319,10 @@ label, the automation will not process the release.
|
|
|
315
319
|
Finally, you can even create a release pull request manually, or using your own
|
|
316
320
|
tools or processes. You must simply ensure that:
|
|
317
321
|
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
|
|
322
|
+
* The pull request has the `release: pending` label applied
|
|
323
|
+
* The pull request merges as a single commit (i.e. "squashed")
|
|
324
|
+
* For each component you want to release, the version and changelog are
|
|
325
|
+
updated appropriately.
|
|
322
326
|
|
|
323
327
|
If you close a release pull request without merging, the release will be
|
|
324
328
|
canceled. The automation will apply the `release: aborted` label to indicate
|
|
@@ -342,18 +346,18 @@ Most of the useful workflow logs will appear in the "Process release request"
|
|
|
342
346
|
job under the workflow. If you follow the logs, you will see the release goes
|
|
343
347
|
through the following stages:
|
|
344
348
|
|
|
345
|
-
*
|
|
346
|
-
|
|
347
|
-
*
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
*
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
*
|
|
354
|
-
|
|
355
|
-
*
|
|
356
|
-
|
|
349
|
+
* First, it publishes a comment to the pull request indicating that the
|
|
350
|
+
release is starting.
|
|
351
|
+
* Second, it polls the GitHub checks for the merge commit. Toys-Release will
|
|
352
|
+
perform a release only if all required checks pass, so the release job will
|
|
353
|
+
wait for them to complete. If any checks fail, the release will fail.
|
|
354
|
+
* Third, it runs a set of sanity checks, for example that it is looking at
|
|
355
|
+
the correct repository and commit, that there are no locally modified
|
|
356
|
+
files, and that the version numbers are set as expected.
|
|
357
|
+
* Next, it runs the release pipeline itself. It first does an analysis of
|
|
358
|
+
which steps in the pipeline should run, then runs those steps in order.
|
|
359
|
+
* Finally, it publishes a comment to the pull request reporting the final
|
|
360
|
+
result of the release.
|
|
357
361
|
|
|
358
362
|
### Troubleshooting and retrying releases
|
|
359
363
|
|
|
@@ -361,12 +365,12 @@ If a release fails, generally an issue will be opened in the repository, and
|
|
|
361
365
|
the pull request will have the `release: error` label applied. Releases can
|
|
362
366
|
fail for a number of reasons, including:
|
|
363
367
|
|
|
364
|
-
*
|
|
365
|
-
|
|
366
|
-
*
|
|
367
|
-
|
|
368
|
-
*
|
|
369
|
-
|
|
368
|
+
* The GitHub checks for the commit representing the merge of the release pull
|
|
369
|
+
request, have failed or did not complete in a timely manner.
|
|
370
|
+
* A failure during the release pipeline, such as an error during the build or
|
|
371
|
+
publication of a release artifact.
|
|
372
|
+
* An intermittent failure of the release pipeline infrastructure, such as a
|
|
373
|
+
failure to obtain a VM to execute a GitHub Actions workflow.
|
|
370
374
|
|
|
371
375
|
If a failure occurs, the release workflow may have published some basic
|
|
372
376
|
information on the cause, to the release pull request. You can also find more
|
|
@@ -411,35 +415,37 @@ the Toys gem at https://dazuma.github.io/toys/gems/toys.
|
|
|
411
415
|
|
|
412
416
|
The features of this system are:
|
|
413
417
|
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
|
|
418
|
-
*
|
|
418
|
+
* Host generated Yardoc (or rdoc) documentation for every version of the gem.
|
|
419
|
+
* Host documentation for multiple gems per repository.
|
|
420
|
+
* Permanent GitHub Pages (github.io) URL for each gem, which redirects to the
|
|
421
|
+
documentation for the latest version.
|
|
422
|
+
* Automatically publish documentation with each release.
|
|
419
423
|
|
|
420
424
|
#### Setting up documentation publication
|
|
421
425
|
|
|
422
426
|
To set up documentation, do the following:
|
|
423
427
|
|
|
424
|
-
*
|
|
425
|
-
|
|
428
|
+
* [Install the release tool](#install-the-release-tool) as documented in the
|
|
429
|
+
main setup procedure. This provides access to the Toys-Release command line.
|
|
426
430
|
|
|
427
|
-
*
|
|
428
|
-
|
|
429
|
-
|
|
431
|
+
* Make sure you have a release config file. See the section on
|
|
432
|
+
[writing the configuration file](#write-the-configuration-file) for how to
|
|
433
|
+
get started here.
|
|
430
434
|
|
|
431
|
-
*
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
+
* For each gem that you want documented, include the configuration setting
|
|
436
|
+
`gh_pages_enabled: true` in the component's configuration. Alternately, you
|
|
437
|
+
can set `gh_pages_enabled: true` at the top level of the configuration file
|
|
438
|
+
to enable documenting for all components.
|
|
435
439
|
|
|
436
|
-
*
|
|
440
|
+
* Create a starting gh-pages branch by running:
|
|
437
441
|
|
|
438
|
-
|
|
442
|
+
```sh
|
|
443
|
+
toys release gen-gh-pages
|
|
444
|
+
```
|
|
439
445
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
446
|
+
This will generate the gh-pages branch and push some key files to it,
|
|
447
|
+
notably a `404.html` that does the redirecting to the latest documentation
|
|
448
|
+
version. This may clobber any other gh-pages that you have present.
|
|
443
449
|
|
|
444
450
|
From this point on, any releases you do should also publish documentation to
|
|
445
451
|
your page. To find the page, use the URL
|
|
@@ -454,20 +460,20 @@ previously.
|
|
|
454
460
|
|
|
455
461
|
There are a few configuration fields that affect documentation publication.
|
|
456
462
|
|
|
457
|
-
*
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
463
|
+
* **gh_pages_directory** is the directory name for this component in the
|
|
464
|
+
documentation URL. This takes the place of the `<component-name>` in the
|
|
465
|
+
URL. For example, if you set `gh_pages_directory: foo/bar` for your
|
|
466
|
+
component, the documentation will be generated under the URL:
|
|
467
|
+
`https://<github-user>.github.io/<repo-name>/foo/bar`.
|
|
462
468
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
469
|
+
Note that if you modify this field after previously generating
|
|
470
|
+
documentation for some releases, you will need to manually move the
|
|
471
|
+
previous documentation into the new directory.
|
|
466
472
|
|
|
467
|
-
*
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
473
|
+
* **gh_pages_version_var** is the name of the Javascript variable in the
|
|
474
|
+
`404.html` file that stores the latest version of this component's release.
|
|
475
|
+
You will generally not need to modify this unless the
|
|
476
|
+
automatically-generated variable name isn't unique for some reason.
|
|
471
477
|
|
|
472
478
|
See the [component configuration](#component-configuration) section for more
|
|
473
479
|
details.
|
|
@@ -478,31 +484,35 @@ Several special cases can be handled via commit tags that are defined by
|
|
|
478
484
|
Toys-Release. These conventional commit messages can appear in a commit message
|
|
479
485
|
and affect the behavior of that and other commits.
|
|
480
486
|
|
|
481
|
-
*
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
487
|
+
* **semver-change:** This tag forces a certain semver change to apply to this
|
|
488
|
+
commit even if other commit tags say otherwise. For example, if a commit
|
|
489
|
+
describes a new feature, but you want it released as a patch version bump
|
|
490
|
+
rather than a minor version bump, you can include `semver-change: patch` in
|
|
491
|
+
the commit message. The full commit message might read thus:
|
|
486
492
|
|
|
487
|
-
|
|
488
|
-
|
|
493
|
+
```
|
|
494
|
+
feat: Add a small button that doesn't do a lot
|
|
495
|
+
semver-change: patch
|
|
496
|
+
```
|
|
489
497
|
|
|
490
|
-
|
|
498
|
+
Valid values for semver-change are `patch`, `minor`, `major`, and `none`.
|
|
491
499
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
500
|
+
The semver-change tag affects only the commit it is part of. If multiple
|
|
501
|
+
commits are included in a release, other commits in the release might still
|
|
502
|
+
upgrade the version bump to minor or higher.
|
|
495
503
|
|
|
496
|
-
*
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
504
|
+
* **revert-commit:** This tag indicates that the commit reverts, and thus
|
|
505
|
+
nullifies the effect of, an earlier commit, thus removing any version bump
|
|
506
|
+
and any changelog entries that would otherwise have been generated. Use the
|
|
507
|
+
SHA of the earlier commit as the content of the tag. For example:
|
|
500
508
|
|
|
501
|
-
|
|
509
|
+
```
|
|
510
|
+
revert-commit: b10c6fb3363bd1335dcfbd671bdceae53cd55716
|
|
511
|
+
```
|
|
502
512
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
513
|
+
A commit can combine revert-commit with other conventional commit tags. It
|
|
514
|
+
can even include multiple revert-commit tags if the commit reverts more than
|
|
515
|
+
one previous commit.
|
|
506
516
|
|
|
507
517
|
### Running on the command line
|
|
508
518
|
|
|
@@ -524,23 +534,25 @@ usage information. For example: `toys release request --help`. You can also run
|
|
|
524
534
|
The following are the available command line tools. You may recognize some of
|
|
525
535
|
these as tools you used during the [installation](#installation) procedure.
|
|
526
536
|
|
|
527
|
-
*
|
|
537
|
+
* **create-labels** Creates the GitHub labels used by the release system
|
|
528
538
|
|
|
529
|
-
*
|
|
539
|
+
* **gen-config** Generates an initial release configuration file
|
|
530
540
|
|
|
531
|
-
*
|
|
541
|
+
* **gen-gh-pages** Initializes the gh-pages branch for publishing
|
|
542
|
+
documentation
|
|
532
543
|
|
|
533
|
-
*
|
|
544
|
+
* **gen-workflows** Generates the GitHub Actions workflows used by
|
|
545
|
+
Toys-Release
|
|
534
546
|
|
|
535
|
-
*
|
|
536
|
-
|
|
547
|
+
* **perform** Runs the release pipeline from the command line. Assumes you
|
|
548
|
+
have already updated the version number and the changelog.
|
|
537
549
|
|
|
538
|
-
*
|
|
539
|
-
|
|
540
|
-
|
|
550
|
+
* **request** Analyzes the repository history and opens a release pull
|
|
551
|
+
request including any pending releases. This is the command line tool used
|
|
552
|
+
by the "Open release request" GitHub Action.
|
|
541
553
|
|
|
542
|
-
*
|
|
543
|
-
|
|
554
|
+
* **retry** Retries a failed release. This is the command line tool used by
|
|
555
|
+
the "Retry release" GitHub Action.
|
|
544
556
|
|
|
545
557
|
There are also internal (hidden) subtools called "_onclosed" and "_onpush".
|
|
546
558
|
These are the tools called by GitHub Actions automation in response to pull
|
|
@@ -551,9 +563,9 @@ request events, and you should generally not call them directly.
|
|
|
551
563
|
Toys-Release features a highly configurable build pipeline. By default it is
|
|
552
564
|
configured to handle most RubyGems packages, and will:
|
|
553
565
|
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
*
|
|
566
|
+
* Tag and post a GitHub Release
|
|
567
|
+
* Build a RubyGems package and push it to rubygems.org
|
|
568
|
+
* Optionally build Yardoc documentation and push it to GitHub Pages
|
|
557
569
|
|
|
558
570
|
The pipeline system, however, lets you customize any aspect of the process, and
|
|
559
571
|
even replace it with an entirely different process altogether, possibly even
|
|
@@ -670,29 +682,29 @@ step never runs at all.
|
|
|
670
682
|
The default release pipeline illustrates the above features of steps. It
|
|
671
683
|
includes the following steps:
|
|
672
684
|
|
|
673
|
-
*
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
*
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
*
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
*
|
|
686
|
-
|
|
687
|
-
*
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
*
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
685
|
+
* **bundle**: Installs the bundle, and copies the `Gemfile.lock` to its
|
|
686
|
+
output directory. This step runs because the later step **build_yard**
|
|
687
|
+
declares it as a dependency and accesses the `Gemfile.lock`.
|
|
688
|
+
* **build_gem**: Builds the gem package, and copies the package file to its
|
|
689
|
+
output directory. This step runs because the later step **release_gem**
|
|
690
|
+
declares it as a dependency and accesses the built package.
|
|
691
|
+
* **build_yard**: Builds the Yardoc documentation. By default, this step uses
|
|
692
|
+
the `yard` gem from the bundle, and thus depends on the earlier **bundle**
|
|
693
|
+
step. It copies the `Gemfile.lock` output by the earlier step. After
|
|
694
|
+
building the documentation into the `doc` directory, it copies that
|
|
695
|
+
directory to its output directory. This step runs *if* the later step
|
|
696
|
+
**push_gh_pages**, which lists it as a dependency, runs.
|
|
697
|
+
* **release_github**: Pushes a release tag to GitHub and creates a GitHub
|
|
698
|
+
release. This step always runs and has no dependencies.
|
|
699
|
+
* **release_gem**: Pushes the built gem package to rubygems.org. This step
|
|
700
|
+
lists the earlier **build_gem** step as a dependency, and copies the built
|
|
701
|
+
gem package from that step's output.
|
|
702
|
+
* **push_gh_pages**: Pushes the built documentation to the `gh-pages` branch
|
|
703
|
+
so it shows up on the repository's GitHub Pages site. This step runs only
|
|
704
|
+
if the repository actually has a `gh-pages` branch and the release
|
|
705
|
+
configuration specifies that it should be pushed to. If this step does run,
|
|
706
|
+
it lists the earlier **build_yard** step as a dependency, and copies the
|
|
707
|
+
built documentation from that step's output.
|
|
696
708
|
|
|
697
709
|
Ultimately, this pipeline will create a GitHub release, push a RubyGems
|
|
698
710
|
package, and optionally push documentation.
|
|
@@ -708,18 +720,18 @@ the [top level configuration reference](#top-level-configuration)) or
|
|
|
708
720
|
underneath a particular component's configuration (see the
|
|
709
721
|
[component configuration reference](#component-configuration)).
|
|
710
722
|
|
|
711
|
-
*
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
*
|
|
715
|
-
|
|
716
|
-
*
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
*
|
|
721
|
-
|
|
722
|
-
|
|
723
|
+
* To insert new steps, at the beginning or end of the pipeline, or before or
|
|
724
|
+
after specific named steps, use the **append_steps** and **prepend_steps**
|
|
725
|
+
configurations.
|
|
726
|
+
* To modify existing steps, use the **modify_steps** configuration. See the
|
|
727
|
+
reference on [build step modification](#build-step-modification).
|
|
728
|
+
* There is no specific way to delete an existing step. This is because a step
|
|
729
|
+
might be referenced by other steps. To ensure a step does not run, you can
|
|
730
|
+
modify it to change its type to `noop` (which has no behavior and does not
|
|
731
|
+
run by default) and ensure that no step depends on it.
|
|
732
|
+
* If your changes are more complex than can reasonably be expressed by
|
|
733
|
+
modifying the default pipeline, you can replace the pipeline completely
|
|
734
|
+
using the **steps** configuration.
|
|
723
735
|
|
|
724
736
|
#### Pipeline modification example
|
|
725
737
|
|
|
@@ -814,132 +826,137 @@ The top level of the yaml file is a dictionary that can include the following
|
|
|
814
826
|
keys. Out of these, **repo**, **git_user_name**, and **git_user_email** are all
|
|
815
827
|
required. The rest are optional.
|
|
816
828
|
|
|
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
|
-
|
|
829
|
+
* **append_steps**: *array of [BuildStepConfig](#build-step-configuration)* (optional) --
|
|
830
|
+
A list of build steps to append to the end of the default build pipeline.
|
|
831
|
+
This can be used to modify the default build pipeline instead of redefining
|
|
832
|
+
the entire pipeline using the **steps** key.
|
|
833
|
+
|
|
834
|
+
* **breaking_change_header**: *string* (optional) --
|
|
835
|
+
A changelog entry prefix that appears when a change is marked as breaking.
|
|
836
|
+
Default is `BREAKING CHANGE`.
|
|
837
|
+
|
|
838
|
+
* **commit_tags**: *array of [CommitTagConfig](#commit-tag-configuration)* (optional) --
|
|
839
|
+
A set of configurations defining how to interpret
|
|
840
|
+
[conventional commit](https://conventionalcommits.org) tags, including how
|
|
841
|
+
they trigger releases, bump versions, and generate changelog entries. See
|
|
842
|
+
[commit tag configuration](#commit-tag-configuration) for details.
|
|
843
|
+
If not included, Toys-Release will use a default configuration as follows:
|
|
844
|
+
|
|
845
|
+
```yaml
|
|
846
|
+
- tag: feat
|
|
847
|
+
semver: minor
|
|
848
|
+
header: ADDED
|
|
849
|
+
- tag: fix
|
|
850
|
+
semver: patch
|
|
851
|
+
header: FIXED
|
|
852
|
+
- tag: docs
|
|
853
|
+
semver: patch
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
* **components**: *array of [ComponentConfig](#component-configuration)* (optional) --
|
|
857
|
+
An array of releasable components, usually RubyGems packages. See
|
|
858
|
+
[Component Configuration](#component-configuration) for details on the
|
|
859
|
+
format of each component. You can also use the name **gems** for this
|
|
860
|
+
config key.
|
|
861
|
+
|
|
862
|
+
* **coordinate_versions**: *boolean* (optional) --
|
|
863
|
+
If set to true, this is a shorthand for setting up a coordination group
|
|
864
|
+
containing all components in this repository. Defaults to *false*.
|
|
865
|
+
|
|
866
|
+
* **coordination_groups**: *array of array of string* (optional) --
|
|
867
|
+
A list of disjoint sets of component names. Each set defines a group of
|
|
868
|
+
components that will always be released together with the same version
|
|
869
|
+
number. That is, if one or more components in a set are released, the
|
|
870
|
+
entire set is released, even components with no changes. This is useful for
|
|
871
|
+
sets of gems, such as the Rails gems, that are always released together.
|
|
872
|
+
|
|
873
|
+
* **enable_release_automation**: *boolean* (optional) --
|
|
874
|
+
When enabled, the release pipeline runs automatically when a release pull
|
|
875
|
+
request is merged. Defaults to *true*.
|
|
876
|
+
|
|
877
|
+
* **gh_pages_enabled**: *boolean* (optional) --
|
|
878
|
+
Whether to globally enable gh-pages publication for all releases. Defaults
|
|
879
|
+
to *false*.
|
|
880
|
+
|
|
881
|
+
* **git_user_email**: *string* (required) --
|
|
882
|
+
The git `user.email` setting to use when making git commits.
|
|
883
|
+
|
|
884
|
+
* **git_user_name**: *string* (required) --
|
|
885
|
+
The git `user.name` setting to use when making git commits.
|
|
886
|
+
|
|
887
|
+
* **main_branch**: *string* (optional) --
|
|
888
|
+
The name of the main branch. Defaults to `main` if not provided.
|
|
889
|
+
|
|
890
|
+
* **modify_steps**: *array of [BuildStepModification](#build-step-modification)* (optional) --
|
|
891
|
+
A set of modifications to the default build steps. This can be used to
|
|
892
|
+
modify the default build pipeline instead of redefining the entire pipeline
|
|
893
|
+
using the **steps** key.
|
|
894
|
+
|
|
895
|
+
* **no_significant_updates_notice**: *string* (optional) --
|
|
896
|
+
A notice that appears in a changelog when a release is done but no other
|
|
897
|
+
changelog entries are present. Default is `No significant updates.`
|
|
898
|
+
|
|
899
|
+
* **prepend_steps**: *array of [BuildStepConfig](#build-step-configuration)* (optional) --
|
|
900
|
+
A list of build steps to prepend to the start of the default build
|
|
901
|
+
pipeline. This can be used to modify the default build pipeline instead of
|
|
902
|
+
redefining the entire pipeline using the **steps** key.
|
|
903
|
+
|
|
904
|
+
* **release_branch_prefix**: *string* (optional) --
|
|
905
|
+
The prefix for all release branch names. Defaults to `release`.
|
|
906
|
+
|
|
907
|
+
* **release_aborted_label**: *string* (optional) --
|
|
908
|
+
The name of the GitHub issue label that identifies aborted release pull
|
|
909
|
+
requests. Defaults to `release: aborted`.
|
|
910
|
+
|
|
911
|
+
* **release_complete_label**: *string* (optional) --
|
|
912
|
+
The name of the GitHub issue label that identifies successfully completed
|
|
913
|
+
release pull requests. Defaults to `release: complete`.
|
|
914
|
+
|
|
915
|
+
* **release_error_label**: *string* (optional) --
|
|
916
|
+
The name of the GitHub issue label that identifies release pull requests in
|
|
917
|
+
an error state. Defaults to `release: error`.
|
|
918
|
+
|
|
919
|
+
* **release_pending_label**: *string* (optional) --
|
|
920
|
+
The name of the GitHub issue label that identifies pending release pull
|
|
921
|
+
requests. Defaults to `release: pending`.
|
|
922
|
+
|
|
923
|
+
* **repo**: *string* (required) --
|
|
924
|
+
The GitHub repository name in the form `owner/repo`. For example, the Toys
|
|
925
|
+
repo is `dazuma/toys`.
|
|
926
|
+
|
|
927
|
+
* **required_checks**: *regexp/boolean* (optional) --
|
|
928
|
+
Identifies which GitHub checks must pass as a prerequisite for a release.
|
|
929
|
+
If a string is provided, it is interpreted as a Ruby regexp (PCRE) and
|
|
930
|
+
identifies the check names. A boolean value of *true* (the default) means
|
|
931
|
+
all checks must pass. A boolean value of *false* disables checking.
|
|
932
|
+
|
|
933
|
+
* **required_checks_timeout**: *integer* (optional) --
|
|
934
|
+
The time to wait, in seconds, for required checks to pass during release
|
|
935
|
+
processing. Defaults to 900 (i.e. 15 minutes).
|
|
936
|
+
|
|
937
|
+
* **signoff_commits**: *boolean* (optional) --
|
|
938
|
+
Whether to make commits with `--signoff`. Set this to true if your
|
|
939
|
+
repository has a policy that commits require signoff. Defaults to *false*.
|
|
940
|
+
|
|
941
|
+
* **steps**: *array of [BuildStepConfig](#build-step-configuration)* (optional) --
|
|
942
|
+
The build pipeline as a list of build steps. See
|
|
943
|
+
[build step configuration](#build-step-configuration) for details on how to
|
|
944
|
+
define the pipeline. If this is not included, Toys-Release will use a
|
|
945
|
+
default pipeline as follows:
|
|
946
|
+
|
|
947
|
+
```yaml
|
|
948
|
+
- name: bundle
|
|
949
|
+
- name: build_gem
|
|
950
|
+
- name: build_yard
|
|
951
|
+
- name: release_github
|
|
952
|
+
- name: release_gem
|
|
953
|
+
source: build_gem
|
|
954
|
+
- name: push_gh_pages
|
|
955
|
+
source: build_yard
|
|
956
|
+
```
|
|
957
|
+
|
|
958
|
+
See the earlier section on [the standard pipeline](#the-standard-pipeline)
|
|
959
|
+
for a detailed description of the behavior of this default pipeline.
|
|
943
960
|
|
|
944
961
|
### Commit tag configuration
|
|
945
962
|
|
|
@@ -950,19 +967,19 @@ and how it should appear in the changelog. The format of the configuration is a
|
|
|
950
967
|
dictionary with the keys documented here. The **tag** key is required; the
|
|
951
968
|
remaining keys are optional and have defaults.
|
|
952
969
|
|
|
953
|
-
*
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
970
|
+
* **header**: *string,null* (optional) --
|
|
971
|
+
A prefix that appears before each changelog entry generated by this tag.
|
|
972
|
+
The special value *null* suppresses changelog entry generation for this
|
|
973
|
+
scope. Defaults to the tag itself in all caps.
|
|
957
974
|
|
|
958
|
-
*
|
|
959
|
-
|
|
975
|
+
* **scopes**: *array of [ScopeConfig](#scope-configuration)* (optional) --
|
|
976
|
+
Overrides for conventional commit scopes.
|
|
960
977
|
|
|
961
|
-
*
|
|
962
|
-
|
|
963
|
-
|
|
978
|
+
* **semver**: *string* (optional) --
|
|
979
|
+
The semver version bump implied by changes of this type. Possible values
|
|
980
|
+
are `patch`, `minor`, `major`, and `none`. Default is `none`.
|
|
964
981
|
|
|
965
|
-
*
|
|
982
|
+
* **tag**: *string* (required) -- The conventional commit tag.
|
|
966
983
|
|
|
967
984
|
#### Scope configuration
|
|
968
985
|
|
|
@@ -973,17 +990,17 @@ dependency-updating bots. Typically, `chore:` does not indicate a significant
|
|
|
973
990
|
change that should trigger a release or appear in a changelog, but you might
|
|
974
991
|
choose different behavior for dependency changes.
|
|
975
992
|
|
|
976
|
-
*
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
993
|
+
* **header**: *string,null* (optional) --
|
|
994
|
+
A prefix that appears before each changelog entry generated by this tag.
|
|
995
|
+
The special value *null* suppresses changelog entry generation for this
|
|
996
|
+
scope. Defaults to the same setting used by the tag.
|
|
980
997
|
|
|
981
|
-
*
|
|
998
|
+
* **scope**: *string* (required) -- The scope name.
|
|
982
999
|
|
|
983
|
-
*
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
1000
|
+
* **semver**: *string* (optional) --
|
|
1001
|
+
The semver version bump implied by changes of this type. Possible values
|
|
1002
|
+
are `patch`, `minor`, `major`, and `none`. Defaults to the same setting
|
|
1003
|
+
used by the tag.
|
|
987
1004
|
|
|
988
1005
|
### Component configuration
|
|
989
1006
|
|
|
@@ -991,87 +1008,90 @@ A component configuration specifies how a particular component (often a
|
|
|
991
1008
|
RubyGems package) should be released. Its format is a dictionary with the keys
|
|
992
1009
|
documented here.
|
|
993
1010
|
|
|
994
|
-
*
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
*
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
*
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
*
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
*
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
*
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
*
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
*
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1011
|
+
* **append_steps**: *array of [BuildStepConfig](#build-step-configuration)* (optional) --
|
|
1012
|
+
A list of build steps to append to the end of this component's build
|
|
1013
|
+
pipeline. This can be used to modify the build pipeline instead of
|
|
1014
|
+
redefining the entire pipeline using the **steps** key.
|
|
1015
|
+
|
|
1016
|
+
* **changelog_path**: *string* (optional) --
|
|
1017
|
+
The path to the component's changelog file, relative to the component's
|
|
1018
|
+
directory. Default is `CHANGELOG.md`.
|
|
1019
|
+
|
|
1020
|
+
* **directory**: *string* (optional) --
|
|
1021
|
+
The directory within the repository where this component is located.
|
|
1022
|
+
Defaults to the component name, unless there is exactly one component in
|
|
1023
|
+
this repository, in which case the default is the root of the repository,
|
|
1024
|
+
i.e. "`.`". This directory is used to identify when files related to this
|
|
1025
|
+
component have been changed, and is also used as a base directory for other
|
|
1026
|
+
paths related to the component.
|
|
1027
|
+
|
|
1028
|
+
* **exclude_globs**: *array of string* (optional) --
|
|
1029
|
+
An array of globs identifying files or directories that should be ignored
|
|
1030
|
+
when identifying changes to this component. These paths are relative to the
|
|
1031
|
+
repo root.
|
|
1032
|
+
|
|
1033
|
+
* **gh_pages_directory**: *string* (optional) --
|
|
1034
|
+
The directory in the `gh-pages` branch under which this component's
|
|
1035
|
+
documentation is published. The default is the component name.
|
|
1036
|
+
|
|
1037
|
+
* **gh_pages_enabled**: *boolean* (optional) --
|
|
1038
|
+
Whether gh-pages documentation publishing is enabled for this component.
|
|
1039
|
+
Default is *true* if either **gh_pages_directory** or
|
|
1040
|
+
**gh_pages_version_var** is set explicitly; otherwise *false*.
|
|
1041
|
+
|
|
1042
|
+
* **gh_pages_version_var**: *string* (optional) --
|
|
1043
|
+
The name of a Javascript variable within the `404.html` page under gh-pages
|
|
1044
|
+
that identifies the latest release of this component. Defaults to an
|
|
1045
|
+
auto-generated variable name corresponding to the component name.
|
|
1046
|
+
|
|
1047
|
+
* **include_globs**: *array of string* (optional) --
|
|
1048
|
+
An array of globs identifying additional files or directories, not located
|
|
1049
|
+
in the component's directory itself, that should signal changes to this
|
|
1050
|
+
component. This can be used, for example, if the repo has global files
|
|
1051
|
+
shared by multiple components, where a change in such a file should trigger
|
|
1052
|
+
releases for all those components. These paths are relative to the repo
|
|
1053
|
+
root.
|
|
1054
|
+
|
|
1055
|
+
* **modify_steps**: *array of [BuildStepModification](#build-step-modification)* (optional) --
|
|
1056
|
+
A set of modifications to this component's build steps. This can be used to
|
|
1057
|
+
modify the build pipeline instead of redefining the entire pipeline using
|
|
1058
|
+
the **steps** key.
|
|
1059
|
+
|
|
1060
|
+
* **name**: *string* (required) --
|
|
1061
|
+
The name of the component, e.g. the name of the RubyGems package if this
|
|
1062
|
+
component represents a gem.
|
|
1063
|
+
|
|
1064
|
+
* **prepend_steps**: *array of [BuildStepConfig](#build-step-configuration)* (optional) --
|
|
1065
|
+
A list of build steps to prepend to the start of this component's build
|
|
1066
|
+
pipeline. This can be used to modify the build pipeline instead of
|
|
1067
|
+
redefining the entire pipeline using the **steps** key.
|
|
1068
|
+
|
|
1069
|
+
* **steps**: *array of [BuildStepConfig](#build-step-configuration)* (optional) --
|
|
1070
|
+
A way to override the complete build pipeline for this component. If not
|
|
1071
|
+
present, the default pipeline for the entire repository is used. (See the
|
|
1072
|
+
**steps** key under [Top level configuration](#top-level-configuration).)
|
|
1073
|
+
|
|
1074
|
+
* **version_constant**: *string* (optional) --
|
|
1075
|
+
The fully-qualified name of the version constant. This is used to determine
|
|
1076
|
+
the current version of the component. The default uses the module implied
|
|
1077
|
+
by the component name. For example, if the component (gem) name is
|
|
1078
|
+
`toys-release`, this defaults to `Toys::Release::VERSION`.
|
|
1079
|
+
|
|
1080
|
+
* **version_rb_path**: *string* (optional) --
|
|
1081
|
+
The path to a Ruby file that contains the current version of the component.
|
|
1082
|
+
This file *must* include Ruby code that looks like this:
|
|
1083
|
+
|
|
1084
|
+
```ruby
|
|
1085
|
+
VERSION = "1.2.3"
|
|
1086
|
+
```
|
|
1067
1087
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1088
|
+
where the string is the latest released version. (Prior to the initial
|
|
1089
|
+
release, this version should be `0.0.0`.) Typically, `VERSION` is a
|
|
1090
|
+
constant defined in the "base module" for the Ruby library.
|
|
1071
1091
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1092
|
+
The default is `version.rb` within the lib path associated with the Ruby
|
|
1093
|
+
module implied by the component name. For example, if the component (gem)
|
|
1094
|
+
name is `toys-release`, this defaults to `lib/toys/release/version.rb`.
|
|
1075
1095
|
|
|
1076
1096
|
### Build step configuration
|
|
1077
1097
|
|
|
@@ -1081,28 +1101,28 @@ define additional keys as documented under the section
|
|
|
1081
1101
|
[build step types](#build-step-types). For more introductory information, see
|
|
1082
1102
|
the section on [the release pipeline](#the-release-pipeline) above.
|
|
1083
1103
|
|
|
1084
|
-
*
|
|
1085
|
-
|
|
1086
|
-
|
|
1104
|
+
* **name**: *string* (optional) --
|
|
1105
|
+
The unique name of this build step in the build pipeline. If not explicitly
|
|
1106
|
+
provided, a unique name will be generated.
|
|
1087
1107
|
|
|
1088
|
-
*
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1108
|
+
* **type**: *string* (optional) --
|
|
1109
|
+
The type of build step, defining what it does. Possible values are:
|
|
1110
|
+
`build_gem`, `build_yard`, `bundle`, `command`, `noop`, `push_gh_pages`,
|
|
1111
|
+
`release_gem`, `release_github`, and `tool`. For more information, see the
|
|
1112
|
+
section [build step types](#build-step-types).
|
|
1093
1113
|
|
|
1094
|
-
*
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1114
|
+
* **run**: *boolean* (optional) --
|
|
1115
|
+
Whether to force this step to run. Typically, build steps will run only if
|
|
1116
|
+
the build type determines that it should run, or if the step is a
|
|
1117
|
+
dependency of another step that will run. You can, however, force a step to
|
|
1118
|
+
run that would otherwise not do so by setting this key to *true*.
|
|
1099
1119
|
|
|
1100
|
-
*
|
|
1101
|
-
|
|
1102
|
-
|
|
1120
|
+
* **inputs**: *array of [InputConfig](#step-input-configuration)* (optional) --
|
|
1121
|
+
Inputs to this step, indicating dependencies on other steps and files to
|
|
1122
|
+
copy from those steps' outputs.
|
|
1103
1123
|
|
|
1104
|
-
*
|
|
1105
|
-
|
|
1124
|
+
* **outputs**: *array of [OutputConfig](#step-output-configuration)* (optional) --
|
|
1125
|
+
Files to copy to this step's output so they become available to other steps.
|
|
1106
1126
|
|
|
1107
1127
|
#### Step input configuration
|
|
1108
1128
|
|
|
@@ -1111,41 +1131,41 @@ is run, that other (dependent) step will also be run. It also describes files
|
|
|
1111
1131
|
that should be copied from the dependent step's output and made available to
|
|
1112
1132
|
the depending step. This configuration is a dictionary with the following keys:
|
|
1113
1133
|
|
|
1114
|
-
*
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
*
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
*
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
*
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
*
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1134
|
+
* **collisions**: *string* (optional) --
|
|
1135
|
+
A symbolic value indicating what to do if a collision occurs between
|
|
1136
|
+
incoming and existing files. Possible values are:
|
|
1137
|
+
|
|
1138
|
+
* `error`: (the default) Abort with an error
|
|
1139
|
+
* `keep`: Keep the existing file
|
|
1140
|
+
* `replace`: Replace the existing file with the incoming file
|
|
1141
|
+
|
|
1142
|
+
* **dest**: *string or false* (optional) --
|
|
1143
|
+
A symbolic value indicating where to copy the dependent step's output to.
|
|
1144
|
+
Possible values are:
|
|
1145
|
+
|
|
1146
|
+
* `component`: (the default) Copy files to the component directory
|
|
1147
|
+
* `repo_root`: Copy files to the repository root
|
|
1148
|
+
* `output`: Copy files to this step's output directory
|
|
1149
|
+
* `temp`: Copy files to this step's temp directory
|
|
1150
|
+
* `none`: Do not copy any files, but just declare a dependency
|
|
1151
|
+
|
|
1152
|
+
* **dest_path**: *string* (optional) --
|
|
1153
|
+
The path in the destination to copy to. If **source_path** is provided,
|
|
1154
|
+
**dest_path** is the corresponding path in the destination. If
|
|
1155
|
+
**source_path** is not provided, **dest_path** is a directory into which
|
|
1156
|
+
the source contents are copied. If **dest_path** is not provided, it
|
|
1157
|
+
defaults to the effective value of **source_path**, i.e. things are copied
|
|
1158
|
+
into the same locations within the destination as they were in the source.
|
|
1159
|
+
|
|
1160
|
+
* **name**: *string* (required) --
|
|
1161
|
+
The name of the step to depend on. The dependent step must be located
|
|
1162
|
+
earlier in the pipeline than the depending step.
|
|
1163
|
+
|
|
1164
|
+
* **source_path**: *string* (optional) --
|
|
1165
|
+
The path of the file or directory to copy from the source output. Only this
|
|
1166
|
+
item (recursively, if a directory) is copied. If this key is not provided,
|
|
1167
|
+
*all* contents of the source output are copied (e.g. the default is
|
|
1168
|
+
effectively "`.`")
|
|
1149
1169
|
|
|
1150
1170
|
#### Step output configuration
|
|
1151
1171
|
|
|
@@ -1153,157 +1173,157 @@ A step output represents files automatically copied to the step's output
|
|
|
1153
1173
|
directory after the step runs. This configuration is a dictionary supporting
|
|
1154
1174
|
the following keys:
|
|
1155
1175
|
|
|
1156
|
-
*
|
|
1157
|
-
|
|
1158
|
-
|
|
1176
|
+
* **collisions**: *string* (optional) --
|
|
1177
|
+
A symbolic value indicating what to do if a collision occurs between incoming
|
|
1178
|
+
and existing files. Possible values are:
|
|
1159
1179
|
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1180
|
+
* `error`: (the default) Abort with an error
|
|
1181
|
+
* `keep`: Keep the existing file
|
|
1182
|
+
* `replace`: Replace the existing file with the incoming file
|
|
1163
1183
|
|
|
1164
|
-
*
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1184
|
+
* **dest_path**: *string* (optional) --
|
|
1185
|
+
The path in the output directory to copy to. If **source_path** is
|
|
1186
|
+
provided, **dest_path** is the corresponding path in the output. If
|
|
1187
|
+
**source_path** is not provided, **dest_path** is a directory into which
|
|
1188
|
+
the source contents are copied. If **dest_path** is not provided, it
|
|
1189
|
+
defaults to the effective value of **source_path**, i.e. things are copied
|
|
1190
|
+
into the same locations within the output as they were in the source.
|
|
1171
1191
|
|
|
1172
|
-
*
|
|
1173
|
-
|
|
1192
|
+
* **source**: *string* (optional) --
|
|
1193
|
+
A symbolic value indicating where to copy from. Possible values are:
|
|
1174
1194
|
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1195
|
+
* `component`: (the default) Copy files from the component directory
|
|
1196
|
+
* `repo_root`: Copy files from the repository root
|
|
1197
|
+
* `temp`: Copy files from this step's temp directory
|
|
1178
1198
|
|
|
1179
|
-
*
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1199
|
+
* **source_path**: *string* (optional) --
|
|
1200
|
+
The path of the file or directory to copy from the source. Only this item
|
|
1201
|
+
(recursively, if a directory) is copied. If this key is not provided, *all*
|
|
1202
|
+
contents of the source are copied (e.g. the default is effectively "`.`")
|
|
1183
1203
|
|
|
1184
1204
|
#### Build step types
|
|
1185
1205
|
|
|
1186
1206
|
This is a list of the available build step types, including their behavior and
|
|
1187
1207
|
any additional configuration keys supported by each.
|
|
1188
1208
|
|
|
1189
|
-
*
|
|
1209
|
+
* **build_gem** -- A step that builds a gem package.
|
|
1190
1210
|
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1211
|
+
This step builds the gem described by the properly named gemspec file for
|
|
1212
|
+
this component. The built package file is copied to this step's output.
|
|
1213
|
+
Other steps (such as **release_gem**) can declare it as an input to get
|
|
1214
|
+
access to the built package. This step does not run unless it is declared
|
|
1215
|
+
as an input dependency, or unless it is requested explicitly using the
|
|
1216
|
+
**run** configuration.
|
|
1197
1217
|
|
|
1198
|
-
*
|
|
1218
|
+
* **build_yard** -- A step that builds Yardocs.
|
|
1199
1219
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1220
|
+
This step builds documentation using [YARD](https://yardoc.org). The built
|
|
1221
|
+
documentation is copied to this step's output in the directory `doc/`.
|
|
1222
|
+
Other steps (such as **push_gh_pages**) can declare it as an input to get
|
|
1223
|
+
access to the built documentation. This step does not run unless it is
|
|
1224
|
+
declared as an input dependency, or unless it is requested explicitly using
|
|
1225
|
+
the **run** configuration.
|
|
1206
1226
|
|
|
1207
|
-
|
|
1227
|
+
This step supports the following additional configuration keys:
|
|
1208
1228
|
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1229
|
+
* **bundle_step**: *string* (optional) --
|
|
1230
|
+
The name of the bundle step. Defaults to `bundle`. This is used if the
|
|
1231
|
+
**uses_gems** key is *not* provided.
|
|
1212
1232
|
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1233
|
+
* **uses_gems**: *array of (string or array of string)* (optional) --
|
|
1234
|
+
An array of gem specifications, each of which can be a simple gem name
|
|
1235
|
+
or an array including rubygems-style version requirements. These gems
|
|
1236
|
+
are provided to Yard, and can include gems such as `redcarpet` that may
|
|
1237
|
+
be needed for markup handling. If this key is included, the specified
|
|
1238
|
+
gems are installed directly; if not, the bundle step is declared as a
|
|
1239
|
+
dependency instead.
|
|
1220
1240
|
|
|
1221
|
-
*
|
|
1241
|
+
* **bundle** -- A step that installs the bundle in the component directory.
|
|
1222
1242
|
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1243
|
+
This step copies the resulting `Gemfile.lock` to its output. Other steps
|
|
1244
|
+
can declare it as an input to get access to the `Gemfile.lock`. This step
|
|
1245
|
+
does not run unless it is declared as an input dependency, or unless it is
|
|
1246
|
+
requested explicitly using the **run** configuration.
|
|
1227
1247
|
|
|
1228
|
-
|
|
1248
|
+
This step supports the following additional configuration keys:
|
|
1229
1249
|
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1250
|
+
* **chdir**: *string* (optional) --
|
|
1251
|
+
Change to the specified directory (relative to the component directory)
|
|
1252
|
+
when installing the bundle. Defaults to component directory.
|
|
1233
1253
|
|
|
1234
|
-
*
|
|
1254
|
+
* **command** -- A step that runs a command in the component directory.
|
|
1235
1255
|
|
|
1236
|
-
|
|
1256
|
+
This step supports the following additional configuration keys:
|
|
1237
1257
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1258
|
+
* **chdir**: *string* (optional) --
|
|
1259
|
+
Change to the specified directory (relative to the component directory)
|
|
1260
|
+
when running the command. Defaults to component directory.
|
|
1241
1261
|
|
|
1242
|
-
|
|
1243
|
-
|
|
1262
|
+
* **command**: *array of string* (required) --
|
|
1263
|
+
The command to run
|
|
1244
1264
|
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1265
|
+
* **continue_on_error**: *boolean* (optional) --
|
|
1266
|
+
If *true*, continue to run the pipeline if the command exits
|
|
1267
|
+
abnormally. If *false* (the default), the pipeline aborts.
|
|
1248
1268
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1269
|
+
This step does not run unless it is requested explicitly using the **run**
|
|
1270
|
+
configuration, or it is declared as a dependency.
|
|
1251
1271
|
|
|
1252
|
-
*
|
|
1253
|
-
|
|
1254
|
-
|
|
1272
|
+
* **noop** -- A no-op step that does nothing. This type is usually configured
|
|
1273
|
+
with inputs and outputs and is used to collect or consolidate data from
|
|
1274
|
+
other steps.
|
|
1255
1275
|
|
|
1256
|
-
|
|
1257
|
-
|
|
1276
|
+
This step does not run unless it is requested explicitly using the **run**
|
|
1277
|
+
configuration, or it is declared as a dependency.
|
|
1258
1278
|
|
|
1259
|
-
*
|
|
1279
|
+
* **push_gh_pages** -- A step that pushes documentation to the gh-pages branch.
|
|
1260
1280
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1281
|
+
The documentation to publish should be under `doc/` in the output directory
|
|
1282
|
+
of a "source" step, normally the **build_yard** step. This source step is
|
|
1283
|
+
automatically declared as a dependency.
|
|
1264
1284
|
|
|
1265
|
-
|
|
1285
|
+
This step supports the following additional configuration keys:
|
|
1266
1286
|
|
|
1267
|
-
|
|
1268
|
-
|
|
1287
|
+
* **source**: *string* (optional) --
|
|
1288
|
+
The name of the source step. Defaults to `build_yard`.
|
|
1269
1289
|
|
|
1270
|
-
|
|
1290
|
+
This step runs if gh-pages publishing is enabled for the component.
|
|
1271
1291
|
|
|
1272
|
-
*
|
|
1292
|
+
* **release_gem** -- A step that pushes a gem package to rubygems.org.
|
|
1273
1293
|
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1294
|
+
The package must be provided under `pkg/` in the output directory of a
|
|
1295
|
+
"source" step, normally the **build_gem** step. This source step is
|
|
1296
|
+
automatically declared as a dependency.
|
|
1277
1297
|
|
|
1278
|
-
|
|
1298
|
+
This step supports the following additional configuration keys:
|
|
1279
1299
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1300
|
+
* **source**: *string* (optional) --
|
|
1301
|
+
The name of the source step. Defaults to `build_gem`.
|
|
1282
1302
|
|
|
1283
|
-
|
|
1284
|
-
|
|
1303
|
+
This step runs if a correctly-named gemspec file is present in the component
|
|
1304
|
+
directory.
|
|
1285
1305
|
|
|
1286
|
-
*
|
|
1306
|
+
* **release_github** -- A step that creates a git tag and GitHub release.
|
|
1287
1307
|
|
|
1288
|
-
|
|
1308
|
+
This step always runs if present in the pipeline.
|
|
1289
1309
|
|
|
1290
|
-
*
|
|
1310
|
+
* **tool** -- A step that runs a Toys tool in the component directory.
|
|
1291
1311
|
|
|
1292
|
-
|
|
1312
|
+
This step supports the following additional configuration keys:
|
|
1293
1313
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1314
|
+
* **chdir**: *string* (optional) --
|
|
1315
|
+
Change to the specified directory (relative to the component directory)
|
|
1316
|
+
when running the tool. Defaults to component directory.
|
|
1297
1317
|
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1318
|
+
* **continue_on_error**: *boolean* (optional) --
|
|
1319
|
+
If *true*, continue to run the pipeline if the tool exits abnormally.
|
|
1320
|
+
If *false* (the default), the pipeline aborts.
|
|
1301
1321
|
|
|
1302
|
-
|
|
1303
|
-
|
|
1322
|
+
* **tool**: *array of string* (required) --
|
|
1323
|
+
The tool to run
|
|
1304
1324
|
|
|
1305
|
-
|
|
1306
|
-
|
|
1325
|
+
This step does not run unless it is requested explicitly using the **run**
|
|
1326
|
+
configuration, or it is declared as a dependency.
|
|
1307
1327
|
|
|
1308
1328
|
#### Build step modification
|
|
1309
1329
|
|
|
@@ -1314,11 +1334,11 @@ below.
|
|
|
1314
1334
|
The **name** and **type** fields filter the steps to modify. If neither is
|
|
1315
1335
|
provided, *all* steps are modified.
|
|
1316
1336
|
|
|
1317
|
-
*
|
|
1318
|
-
|
|
1337
|
+
* **name**: *string* (optional) --
|
|
1338
|
+
Modify only the step with this unique name.
|
|
1319
1339
|
|
|
1320
|
-
*
|
|
1321
|
-
|
|
1340
|
+
* **type**: *string* (optional) --
|
|
1341
|
+
Modify only steps matching this type.
|
|
1322
1342
|
|
|
1323
1343
|
All other keys represent changes to the configuration of matching steps. You
|
|
1324
1344
|
can provide either the *null* value to delete the key, or a new full value for
|