Commit d7a9ab9c authored by ale's avatar ale
Browse files

Refactor the CI file using templates, and update the backports file

parent 6137e6f5
# This file controls the Debian package build process.
#
# Define supported target releases / archs by editing this file, in
# combination with this repository's own .gitlab-ci.yml (to build the
# necessary base Docker images).
#
# This version builds against stable+backports, and nextstable.
stages:
- test
- build
- release
pkg_src:
stage: build
image: "registry.git.autistici.org/ai3/build-deb:buster-amd64"
script:
- build-dsc
artifacts:
paths:
- build-deb/
# Template for building packages. These are distro/arch dependent.
.build_pkg_template: &build_pkg_template
stage: build
needs: ["pkg_src"]
script:
- build-deb
artifacts:
paths:
- output-deb/
build_pkg:buster:amd64:
image: "registry.git.autistici.org/ai3/build-deb:buster-backports-amd64"
tags:
- amd64
<<: *build_pkg_template
build_pkg:bullseye:amd64:
image: "registry.git.autistici.org/ai3/build-deb:bullseye-amd64"
tags:
- amd64
<<: *build_pkg_template
# Template for uploading packages to a repository. We can always use
# the same Docker image, the version of that one doesn't matter.
.upload_pkg_template: &upload_pkg_template
stage: release
image: "registry.git.autistici.org/ai3/build-deb:buster-amd64"
# Changes to the 'master' branch are uploaded to the main repositories.
upload_pkg:buster:
needs: ["build_pkg:buster:amd64"]
script:
- upload-packages --repository ${REPOSITORY:-float/buster}
only:
- master
<<: *upload_pkg_template
upload_pkg:bullseye:
needs: ["build_pkg:bullseye:amd64"]
script:
- upload-packages --repository ${REPOSITORY:-float/bullseye}
only:
- master
<<: *upload_pkg_template
# Changes to other branches are uploaded to the scratch repositories.
upload_pkg:ci:buster:
needs: ["build_pkg:buster:amd64"]
script:
- upload-packages --repository buster-ci
except:
- master
<<: *upload_pkg_template
upload_pkg:ci:bullseye:
needs: ["build_pkg:bullseye:amd64"]
script:
- upload-packages --repository bullseye-ci
except:
- master
<<: *upload_pkg_template
# This file controls the Debian package build process.
#
# Define supported target releases / archs by editing this file, in
# combination with this repository's own .gitlab-ci.yml (to build the
# necessary base Docker images).
#
# Packages are uploaded only on commits on the 'master' branch.
stages:
- build_pkgsrc
- build_pkg
- upload_pkg
build_pkgsrc:buster:
stage: build_pkgsrc
image: "registry.git.autistici.org/ai3/build-deb:buster-backports-amd64"
script:
- build-dsc
artifacts:
paths:
- build-deb/
build_pkg:buster:amd64:
stage: build_pkg
image: "registry.git.autistici.org/ai3/build-deb:buster-backports-amd64"
tags:
- amd64
script:
- build-deb
dependencies:
- build_pkgsrc:buster
artifacts:
paths:
- output-deb/
upload_pkg:
stage: upload_pkg
image: "registry.git.autistici.org/ai3/build-deb:buster-backports-amd64"
script:
- upload-packages
dependencies:
- build_pkg:buster:amd64
only:
- master
ci-backports.yml
\ No newline at end of file
......@@ -3,8 +3,6 @@
# Define supported target releases / archs by editing this file, in
# combination with this repository's own .gitlab-ci.yml (to build the
# necessary base Docker images).
#
# Packages are uploaded only on commits on the 'master' branch.
stages:
- test
......@@ -20,62 +18,64 @@ pkg_src:
paths:
- build-deb/
build_pkg:buster:amd64:
# Template for building packages. These are distro/arch dependent.
.build_pkg_template: &build_pkg_template
stage: build
needs: ["pkg_src"]
image: "registry.git.autistici.org/ai3/build-deb:buster-amd64"
tags:
- amd64
script:
- build-deb
artifacts:
paths:
- output-deb/
build_pkg:buster:amd64:
image: "registry.git.autistici.org/ai3/build-deb:buster-amd64"
tags:
- amd64
<<: *build_pkg_template
build_pkg:bullseye:amd64:
stage: build
needs: ["pkg_src"]
image: "registry.git.autistici.org/ai3/build-deb:bullseye-amd64"
tags:
- amd64
script:
- build-deb
artifacts:
paths:
- output-deb/
<<: *build_pkg_template
upload_pkg:buster:
# Template for uploading packages to a repository. We can always use
# the same Docker image, the version of that one doesn't matter.
.upload_pkg_template: &upload_pkg_template
stage: release
needs: ["build_pkg:buster:amd64"]
image: "registry.git.autistici.org/ai3/build-deb:buster-amd64"
# Changes to the 'master' branch are uploaded to the main repositories.
upload_pkg:buster:
needs: ["build_pkg:buster:amd64"]
script:
- upload-packages --repository ${REPOSITORY:-float/buster}
only:
- master
<<: *upload_pkg_template
upload_pkg:bullseye:
stage: release
needs: ["build_pkg:bullseye:amd64"]
image: "registry.git.autistici.org/ai3/build-deb:bullseye-amd64"
script:
- upload-packages --repository ${REPOSITORY:-float/bullseye}
only:
- master
<<: *upload_pkg_template
# Changes to other branches are uploaded to the scratch repositories.
upload_pkg:ci:buster:
stage: release
needs: ["build_pkg:buster:amd64"]
image: "registry.git.autistici.org/ai3/build-deb:buster-amd64"
script:
- upload-packages --repository buster-ci
except:
- master
<<: *upload_pkg_template
upload_pkg:ci:bullseye:
stage: release
needs: ["build_pkg:bullseye:amd64"]
image: "registry.git.autistici.org/ai3/build-deb:bullseye-amd64"
script:
- upload-packages --repository bullseye-ci
except:
- master
<<: *upload_pkg_template
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment