]> git.proxmox.com Git - mirror_linux-firmware.git/blob - .gitlab-ci.yml
Merge branch 'robot/patch-0-1697735493' into 'main'
[mirror_linux-firmware.git] / .gitlab-ci.yml
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
10 check-commits:
11 stage: test
12 image: registry.gitlab.com/kernel-firmware/linux-firmware
13 rules:
14 - if: $CI_MERGE_REQUEST_ID
15 script:
16 - ci-fairy check-commits --signed-off-by --textwidth=0
17
18 pre-commit:
19 stage: test
20 image: registry.gitlab.com/kernel-firmware/linux-firmware
21 rules:
22 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
23 - if: $CI_COMMIT_TAG
24 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
25 script:
26 - pre-commit run --all-files
27
28 rpm:
29 stage: test
30 image: fedora
31 rules:
32 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
33 - if: $CI_COMMIT_TAG
34 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
35 script:
36 - *rpmcommon
37
38 deb:
39 stage: test
40 image: debian
41 rules:
42 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
43 - if: $CI_COMMIT_TAG
44 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
45 script:
46 - *debcommon
47
48 deb-release:
49 stage: deploy
50 image: debian
51 rules:
52 - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
53 when: never
54 - if: $RELEASE_TOKEN
55 artifacts:
56 paths:
57 - dist/*
58 script:
59 - *debcommon
60
61 rpm-release:
62 stage: deploy
63 image: fedora
64 rules:
65 - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
66 when: never
67 - if: $RELEASE_TOKEN
68 artifacts:
69 paths:
70 - dist/*
71 script:
72 - *rpmcommon
73
74 release:
75 stage: deploy
76 rules:
77 - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
78 when: never
79 - if: $RELEASE_TOKEN
80 artifacts:
81 paths:
82 - dist/*
83 script:
84 - CI_PUSH_REPO=`echo "$CI_REPOSITORY_URL" | sed 's/^.*@/@/g'`
85 - git remote set-url --push origin "https://gitlab-ci-token:${RELEASE_TOKEN}$CI_PUSH_REPO"
86 - git tag `date "+%Y%m%d"`
87 - git push --tags
88 - make dist