]>
Commit | Line | Data |
---|---|---|
ce33c671 ML |
1 | .debcommon: &debcommon |
2 | - apt update | |
3 | - apt install build-essential debhelper git python3-jinja2 -y | |
4 | - make deb | |
5 | ||
6 | .rpmcommon: &rpmcommon | |
7 | - dnf install make git python3-jinja2 rpmdevtools -y | |
8 | - make rpm | |
9 | ||
69e68cde | 10 | check-commits: |
b2f03c84 | 11 | stage: test |
69e68cde | 12 | image: registry.gitlab.com/kernel-firmware/linux-firmware |
d5c485f9 ML |
13 | rules: |
14 | - if: $CI_MERGE_REQUEST_ID | |
69e68cde | 15 | script: |
c801b3b8 | 16 | - ci-fairy check-commits --signed-off-by --textwidth=0 |
69e68cde ML |
17 | |
18 | pre-commit: | |
b2f03c84 | 19 | stage: test |
69e68cde | 20 | image: registry.gitlab.com/kernel-firmware/linux-firmware |
f48da6da ML |
21 | rules: |
22 | - if: $CI_PIPELINE_SOURCE == 'merge_request_event' | |
23 | - if: $CI_COMMIT_TAG | |
24 | - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH | |
69e68cde ML |
25 | script: |
26 | - pre-commit run --all-files | |
27 | ||
ce33c671 ML |
28 | deb-release: |
29 | stage: deploy | |
30 | image: debian | |
31 | rules: | |
32 | - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME | |
33 | when: never | |
34 | - if: $RELEASE_TOKEN | |
35 | artifacts: | |
36 | paths: | |
37 | - dist/* | |
38 | script: | |
39 | - *debcommon | |
40 | ||
41 | rpm-release: | |
42 | stage: deploy | |
43 | image: fedora | |
44 | rules: | |
45 | - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME | |
46 | when: never | |
47 | - if: $RELEASE_TOKEN | |
48 | artifacts: | |
49 | paths: | |
50 | - dist/* | |
51 | script: | |
52 | - *rpmcommon | |
53 | ||
b2f03c84 ML |
54 | release: |
55 | stage: deploy | |
56 | rules: | |
57 | - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME | |
58 | when: never | |
59 | - if: $RELEASE_TOKEN | |
f12059b7 ML |
60 | artifacts: |
61 | paths: | |
62 | - dist/* | |
b2f03c84 ML |
63 | script: |
64 | - CI_PUSH_REPO=`echo "$CI_REPOSITORY_URL" | sed 's/^.*@/@/g'` | |
65 | - git remote set-url --push origin "https://gitlab-ci-token:${RELEASE_TOKEN}$CI_PUSH_REPO" | |
66 | - git tag `date "+%Y%m%d"` | |
67 | - git push --tags | |
f12059b7 | 68 | - make dist |