Commit 10707a5
committed
fix(ui): Provide prebuilt UI assets in release
In #5113 I removed the
build artifacts from our source repo. This complicated the packaging
process for downstream maintainers significantly.
We will still not check the artifacts into our repo directly, since this
is a burden to the review process and opens us up to attacks such as the
https://en.wikipedia.org/wiki/XZ_Utils_backdoor .
Instead we provide two new mechanisms to obtain the artifacts:
* alertmanager-web-ui-(file <VERSION).tar.gz will provide the `dist`
folder needed for calling `make build`.
* We will upload artifacts via actions/upload-artifact. These can then
be easily retrieved for 90 days using `gh`.
Finally, this commit also ensures that `ui/app/dist` is always available
during build steps. The reason is that caching `npm` dependencies is not
sufficient: `Elm` will download its files again anyway, since it stores
them in `~/.elm`. This causes unnecessary network calls.
Technical approach:
* By moving the validation `.build_stamp` to `dist/`, we don't have to
upload that file seperately. `embed` will exclude that file.
* Storing artifacts in `.tarballs` is our method for including files in
the release. This approach was directly taken from
`prometheus/prometheus`.
Relates-to: #5173
Fixes: #5163
Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>1 parent c769adc commit 10707a5
4 files changed
Lines changed: 33 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
34 | 48 | | |
35 | 49 | | |
36 | 50 | | |
| |||
40 | 54 | | |
41 | 55 | | |
42 | 56 | | |
| 57 | + | |
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| |||
58 | 73 | | |
59 | 74 | | |
60 | 75 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 76 | + | |
64 | 77 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 78 | + | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | | - | |
| 106 | + | |
0 commit comments