diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-08-19 11:00:03 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-08-19 11:00:13 +0200 |
commit | 88a599d031dbc559b6a9f5f5c1a5803aa18b86ba (patch) | |
tree | 4623803c2637805ae4d3fa7960b419e06ba85cc5 /contrib/ci | |
parent | ad2db925d84ba2981691c49c5137b880ed5ffd6f (diff) |
unify CI jobs
Diffstat (limited to 'contrib/ci')
-rwxr-xr-x | contrib/ci/debian-package-job.sh | 23 | ||||
-rw-r--r--[-rwxr-xr-x] | contrib/ci/jobs/4-deb-package/job.sh | 23 | ||||
-rw-r--r--[l---------] | contrib/ci/jobs/7-arm64-deb-package/job.sh | 3 | ||||
l--------- | contrib/ci/jobs/7-arm64-deb-package/version.sh | 1 | ||||
-rwxr-xr-x | contrib/ci/version.sh (renamed from contrib/ci/jobs/4-deb-package/version.sh) | 3 |
5 files changed, 29 insertions, 24 deletions
diff --git a/contrib/ci/debian-package-job.sh b/contrib/ci/debian-package-job.sh new file mode 100755 index 00000000..a97c3a2a --- /dev/null +++ b/contrib/ci/debian-package-job.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -exuo pipefail +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. +# Shared between various jobs. + +unset LD_LIBRARY_PATH + +# Install build-time dependencies. +# Update apt cache first +apt-get update +apt-get upgrade -y +mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control + +export VERSION="$(./contrib/ci/version.sh)" +echo "Building package version ${VERSION}" +EMAIL=none gbp dch --dch-opt=-b --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}" +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us + +ls -alh ../*.deb +mkdir -p /artifacts/merchant/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/merchant/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/4-deb-package/job.sh b/contrib/ci/jobs/4-deb-package/job.sh index a0801b41..3270feb6 100755..100644 --- a/contrib/ci/jobs/4-deb-package/job.sh +++ b/contrib/ci/jobs/4-deb-package/job.sh @@ -1,23 +1,2 @@ #!/bin/bash -set -exuo pipefail -# This file is in the public domain. -# Helper script to build the latest DEB packages in the container. - - -unset LD_LIBRARY_PATH - -# Install build-time dependencies. -# Update apt cache first -apt-get update -apt-get upgrade -y -mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control - -export VERSION="$(./contrib/ci/jobs/4-deb-package/version.sh)" -echo "Building package version ${VERSION}" -EMAIL=none gbp dch --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}" -./bootstrap -dpkg-buildpackage -rfakeroot -b -uc -us - -ls -alh ../*.deb -mkdir -p /artifacts/merchant/${CI_COMMIT_REF} # Variable comes from CI environment -mv ../*.deb /artifacts/merchant/${CI_COMMIT_REF}/ +exec ./contrib/ci/debian-package-job.sh diff --git a/contrib/ci/jobs/7-arm64-deb-package/job.sh b/contrib/ci/jobs/7-arm64-deb-package/job.sh index 333db77e..3270feb6 120000..100644 --- a/contrib/ci/jobs/7-arm64-deb-package/job.sh +++ b/contrib/ci/jobs/7-arm64-deb-package/job.sh @@ -1 +1,2 @@ -../4-deb-package/job.sh
\ No newline at end of file +#!/bin/bash +exec ./contrib/ci/debian-package-job.sh diff --git a/contrib/ci/jobs/7-arm64-deb-package/version.sh b/contrib/ci/jobs/7-arm64-deb-package/version.sh deleted file mode 120000 index d67f72c7..00000000 --- a/contrib/ci/jobs/7-arm64-deb-package/version.sh +++ /dev/null @@ -1 +0,0 @@ -../4-deb-package/version.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/4-deb-package/version.sh b/contrib/ci/version.sh index 52031b23..e98e5862 100755 --- a/contrib/ci/jobs/4-deb-package/version.sh +++ b/contrib/ci/version.sh @@ -1,5 +1,8 @@ #!/bin/sh set -ex +# This file is in the public domain. +# Determines the current version of our code. +# Shared between various jobs. BRANCH=$(git name-rev --name-only HEAD) if [ -z "${BRANCH}" ]; then |