Repository navigation
Expand file tree
/
Copy pathci.xml
More file actions
88 lines (83 loc) · 5.74 KB
/
Copy pathci.xml
File metadata and controls
88 lines (83 loc) · 5.74 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a
Grant of Patent License.
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any
warranty.
You should have received a copy of the CC0 Public Domain Dedication
along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<!-- MR Moqui's own pipelines, for a server that hosts this repository (docs/interfaces/Pipelines.md; plans/Dogfood.md
§8.5). The jobs run in the moqui-build image (podman/Containerfile.build) in a pool named linux. The suites' rules
hold here as on a laptop (docs/Build-Test.md): the regression suite on every change, acceptance only nightly and
when asked, budgets not raised. A component's own repository needs no file: it gets the built-in pipeline. -->
<ci xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/mr-git-ci.xsd">
<!-- A push or a merge request: lint, the packages' feature sets, and the framework's regression suite -->
<pipeline name="check" on="push merge-request">
<env name="CARGO_BUILD_JOBS" value="4"/>
<env name="CARGO_TERM_COLOR" value="never"/>
<job name="lint" image="moqui-build" pool="linux" timeout-minutes="90">
<cache key="cargo-lint-${hash:Cargo.lock}-${hash:rust-toolchain.toml}" path="target"/>
<step run="cargo lint"/>
<step run="cargo lint-min"/>
<step run="scripts/check-packages.sh"/>
</job>
<job name="framework" image="moqui-build" pool="linux" timeout-minutes="180">
<cache key="cargo-test-${hash:Cargo.lock}-${hash:rust-toolchain.toml}" path="target"/>
<env name="npm_config_cache" value="/workspace/src/.npm-cache"/>
<cache key="npm-${hash:runtime/components/base/webroot/build/libs/package-lock.json}-${hash:runtime/components/base/webroot/build/whiteboard/package-lock.json}" path=".npm-cache"/>
<!-- libs/ is never cached, so build-js here rebuilds from the locks and fails on any difference from
MANIFEST.json: it is the verify-js check, done once -->
<step run="./moq build-js"/>
<step run="./moq test-framework"/>
</job>
</pipeline>
<!-- A merge to main: the whole regression suite, with the components addons.xml names -->
<pipeline name="main" on="push manual" branches="master main">
<env name="CARGO_BUILD_JOBS" value="4"/>
<job name="regression" image="moqui-build" pool="linux" timeout-minutes="300">
<cache key="cargo-test-${hash:Cargo.lock}-${hash:rust-toolchain.toml}" path="target"/>
<step name="Get the components" run="./moq component-get"/>
<env name="npm_config_cache" value="/workspace/src/.npm-cache"/>
<cache key="npm-${hash:runtime/components/base/webroot/build/libs/package-lock.json}-${hash:runtime/components/base/webroot/build/whiteboard/package-lock.json}" path=".npm-cache"/>
<step run="./moq build-js"/>
<step run="./moq test-all"/>
</job>
</pipeline>
<!-- Nightly, and by hand before a release: every acceptance test -->
<pipeline name="nightly" on="schedule manual" cron="0 0 3 * * ?">
<env name="CARGO_BUILD_JOBS" value="4"/>
<job name="acceptance" image="moqui-build" pool="linux" timeout-minutes="360">
<cache key="cargo-test-${hash:Cargo.lock}-${hash:rust-toolchain.toml}" path="target"/>
<step name="Get the components" run="./moq component-get"/>
<env name="npm_config_cache" value="/workspace/src/.npm-cache"/>
<cache key="npm-${hash:runtime/components/base/webroot/build/libs/package-lock.json}-${hash:runtime/components/base/webroot/build/whiteboard/package-lock.json}" path=".npm-cache"/>
<step run="./moq build-js"/>
<step run="./moq accept-all --junit test-results"/>
<report junit="test-results/*/*.xml"/>
</job>
</pipeline>
<!-- A tag: the release's archive, kept as an artifact of the run -->
<pipeline name="release" on="tag" tags="v*">
<env name="CARGO_BUILD_JOBS" value="4"/>
<job name="archive" image="moqui-build" pool="linux" timeout-minutes="180">
<env name="npm_config_cache" value="/workspace/src/.npm-cache"/>
<cache key="npm-${hash:runtime/components/base/webroot/build/libs/package-lock.json}-${hash:runtime/components/base/webroot/build/whiteboard/package-lock.json}" path=".npm-cache"/>
<cache key="release-source-${hash:.git/HEAD}" path="target/release-source"/>
<step name="Get release components" run="./moq component-get"/>
<step name="Prepare offline sources" run="mkdir -p target/release-source && ./moq source-archive target/source.tar.gz && cp target/source.tar.gz target/release-source/mr-moqui-source.tar.gz"/>
<step run="./moq build-js"/>
<step run="./moq build --release"/>
<step run="mkdir -p dist && ./moq archive dist/mr-moqui.zip"/>
<artifact name="mr-moqui-source" path="target/release-source/*.tar.gz" retention-days="365"/>
<artifact name="mr-moqui" path="dist/*.zip" retention-days="365"/>
</job>
<job name="offline-source" image="moqui-build" pool="linux-offline" needs="archive" timeout-minutes="360">
<cache key="release-source-${hash:.git/HEAD}" path="target/release-source"/>
<step run="scripts/test-source-archive.sh target/release-source/mr-moqui-source.tar.gz"/>
</job>
</pipeline>
</ci>