taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 1080987ed08b7ec4b1595bfbd07bb75ac0dfec4c
parent 6c237ff1460e7f136c128f544c97f7605f8e6f88
Author: Devan Carpenter <devan@taler.net>
Date:   Sat, 20 Jan 2024 10:14:34 -0500

ci: add taler-harness package build job

Diffstat:
Acontrib/ci/jobs/3-wallet-cli-deb-package/config.ini | 6++++++
Acontrib/ci/jobs/4-taler-harness-deb-package/config.ini | 6++++++
Acontrib/ci/jobs/4-taler-harness-deb-package/job.sh | 36++++++++++++++++++++++++++++++++++++
Acontrib/ci/jobs/4-taler-harness-deb-package/version.sh | 17+++++++++++++++++
Rcontrib/ci/jobs/4-deploy-package/config.ini -> contrib/ci/jobs/5-deploy-packages/config.ini | 0
Rcontrib/ci/jobs/4-deploy-package/job.sh -> contrib/ci/jobs/5-deploy-packages/job.sh | 0
6 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/contrib/ci/jobs/3-wallet-cli-deb-package/config.ini b/contrib/ci/jobs/3-wallet-cli-deb-package/config.ini @@ -0,0 +1,6 @@ +[build] +HALT_ON_FAILURE = False +WARN_ON_FAILURE = True +CONTAINER_BUILD = True +CONTAINER_NAME = localhost/wallet-core +CONTAINER_ARCH = amd64 diff --git a/contrib/ci/jobs/4-taler-harness-deb-package/config.ini b/contrib/ci/jobs/4-taler-harness-deb-package/config.ini @@ -0,0 +1,6 @@ +[build] +HALT_ON_FAILURE = False +WARN_ON_FAILURE = True +CONTAINER_BUILD = True +CONTAINER_NAME = localhost/wallet-core +CONTAINER_ARCH = amd64 diff --git a/contrib/ci/jobs/4-taler-harness-deb-package/job.sh b/contrib/ci/jobs/4-taler-harness-deb-package/job.sh @@ -0,0 +1,36 @@ +#!/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 + +# Run the bootstrap script in case it hasn't been done already at this point +./bootstrap + +# gbp wants the debian directory in the root of the git repo +# so we symlink in the debian directory for the package we want to create +rm -f ./debian # in case we already have a symlink there +ln -s packages/taler-harness/debian . + +# Change to our package directory +cd packages/taler-harness + +# 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/5-taler-harness-deb-package/version.sh)" +echo "Building package version ${VERSION}" + +EMAIL=none gbp dch --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}" +echo "Current PWD is $PWD" +./configure --prefix=$HOME/local/ +dpkg-buildpackage -rfakeroot -b -uc -us + +ls -alh ../*.deb +mkdir -p /artifacts/wallet-core/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/wallet-core/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/4-taler-harness-deb-package/version.sh b/contrib/ci/jobs/4-taler-harness-deb-package/version.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -ex + +BRANCH=$(git name-rev --name-only HEAD) +if [ -z "${BRANCH}" ]; then + exit 1 +else + # "Unshallow" our checkout, but only our current branch, and exclude the submodules. + git fetch --no-recurse-submodules --tags --depth=1000 origin "${BRANCH}" + RECENT_VERSION_TAG=$(git describe --tags --match 'v*.*.*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD || exit 1 + else + echo $(echo ${RECENT_VERSION_TAG} | sed -r 's/^v//')-${commits}-$(git rev-parse --short=8 HEAD) + fi +fi diff --git a/contrib/ci/jobs/4-deploy-package/config.ini b/contrib/ci/jobs/5-deploy-packages/config.ini diff --git a/contrib/ci/jobs/4-deploy-package/job.sh b/contrib/ci/jobs/5-deploy-packages/job.sh