Commit e9d5b28
committed
ci: stage the site with write_source_files instead of shell
Replaces the cp -RL plus two chmod passes with 'bazel run //:stage_site', using
write_source_files from aspect_bazel_lib -- already a dependency, so no new
module. It is used here as a directory-copy primitive rather than for its usual
round-tripping purpose, so diff_test and the destination-exists check are off:
out/ is build output, not something checked in.
Three measured improvements over the shell it replaces:
- Writes 644/755 directly, so the post-hoc chmod normalisation is gone. The
deploy job commits this tree, and Bazel's own outputs are 555, so that
compensation was load-bearing -- now it is simply not needed.
- Does not reach into bazel-bin, a convenience symlink that --symlink_prefix can
move or suppress.
- Removes files that are no longer part of the site. cp left them; verified by
planting a stale file and re-running.
Considered rules_pkg's pkg_install for the same job. write_source_files wins on
handling directory outputs natively -- both bundles are tree artifacts, which is
the fiddly part of pkg_files -- and on adding no dependency.
Verified end to end: the staged artifact is 38 files, content and modes
identical to the pre-migration CI output.1 parent eeee8cd commit e9d5b28
3 files changed
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
29 | 28 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 29 | + | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
0 commit comments