2023-09-19 03:32:59 +00:00
|
|
|
.debcommon: &debcommon
|
|
|
|
- apt update
|
2023-12-12 02:37:35 +00:00
|
|
|
- apt install build-essential debhelper git python3-jinja2 rdfind -y
|
2023-09-19 03:32:59 +00:00
|
|
|
- make deb
|
|
|
|
|
|
|
|
.rpmcommon: &rpmcommon
|
2023-12-12 02:37:35 +00:00
|
|
|
- dnf install make git python3-jinja2 rpmdevtools rdfind -y
|
2023-09-19 03:32:59 +00:00
|
|
|
- make rpm
|
|
|
|
|
2023-08-30 03:00:04 +00:00
|
|
|
check-commits:
|
2023-08-31 02:19:49 +00:00
|
|
|
stage: test
|
2023-08-30 03:00:04 +00:00
|
|
|
image: registry.gitlab.com/kernel-firmware/linux-firmware
|
2023-08-31 16:21:51 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_ID
|
2023-08-30 03:00:04 +00:00
|
|
|
script:
|
2023-09-07 11:31:29 +00:00
|
|
|
- ci-fairy check-commits --signed-off-by --textwidth=0
|
2023-08-30 03:00:04 +00:00
|
|
|
|
|
|
|
pre-commit:
|
2023-08-31 02:19:49 +00:00
|
|
|
stage: test
|
2023-08-30 03:00:04 +00:00
|
|
|
image: registry.gitlab.com/kernel-firmware/linux-firmware
|
2023-09-18 16:55:20 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
|
|
- if: $CI_COMMIT_TAG
|
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
2023-08-30 03:00:04 +00:00
|
|
|
script:
|
|
|
|
- pre-commit run --all-files
|
|
|
|
|
2023-09-19 03:32:59 +00:00
|
|
|
deb-release:
|
|
|
|
stage: deploy
|
|
|
|
image: debian
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
|
|
|
when: never
|
|
|
|
- if: $RELEASE_TOKEN
|
2023-11-15 19:54:43 +00:00
|
|
|
- if: $CI_COMMIT_TAG
|
2023-09-19 03:32:59 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- dist/*
|
|
|
|
script:
|
|
|
|
- *debcommon
|
|
|
|
|
|
|
|
rpm-release:
|
|
|
|
stage: deploy
|
|
|
|
image: fedora
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
|
|
|
when: never
|
|
|
|
- if: $RELEASE_TOKEN
|
2023-11-15 19:54:43 +00:00
|
|
|
- if: $CI_COMMIT_TAG
|
2023-09-19 03:32:59 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- dist/*
|
|
|
|
script:
|
|
|
|
- *rpmcommon
|
|
|
|
|
2023-08-31 02:19:49 +00:00
|
|
|
release:
|
|
|
|
stage: deploy
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
|
|
|
|
when: never
|
|
|
|
- if: $RELEASE_TOKEN
|
2023-08-31 15:17:37 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- dist/*
|
2023-08-31 02:19:49 +00:00
|
|
|
script:
|
|
|
|
- CI_PUSH_REPO=`echo "$CI_REPOSITORY_URL" | sed 's/^.*@/@/g'`
|
|
|
|
- git remote set-url --push origin "https://gitlab-ci-token:${RELEASE_TOKEN}$CI_PUSH_REPO"
|
|
|
|
- git tag `date "+%Y%m%d"`
|
|
|
|
- git push --tags
|
2023-08-31 15:17:37 +00:00
|
|
|
- make dist
|