diff options
Diffstat (limited to 'contrib/ci/jobs')
27 files changed, 483 insertions, 20 deletions
diff --git a/contrib/ci/jobs/000-codespell/job.sh b/contrib/ci/jobs/000-codespell/job.sh index 3270feb65..5b73aabf3 100755 --- a/contrib/ci/jobs/000-codespell/job.sh +++ b/contrib/ci/jobs/000-codespell/job.sh @@ -1,2 +1,107 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +skip=$(cat <<EOF +ABOUT-NLS +*/afl-tests/* +**/auditor/*.sql +**/templating/test-specs/* +*.bbl +*.bib +*build-aux* +*.bst +*.cache/* +*/cbdc-es.tex +*/cbdc-it.tex +*.cls +configure* +config.status +config.guess +./src/include/taler_dbevents.h +*/contrib/* +*/contrib/hellos/** +*.dat +*.deflate +*.doc +*/doc/* +**/doc/flows/main.de.tex +*/doc/texinfo.tex +*.docx +*.ecc +*.eot +*.epgz +*.eps +*.epub +**/ExchangeSelection/example.ts +*.fee +*.fees +*.file +**/fonts/** +*.gif +*/.git/** +*.gz +*/i18n/strings.ts +*.info +*.jpeg +*.jpg +*.??.json +*.json +*/keys/* +*key +*.latexmkrc +*libtool* +*.log +*/m4/* +*.m4 +**/*.map +*.min.js +*.mp4 +*.odg +*.ods +*.odt +*.pack.js +*.pdf +*.png +*.PNG +**/pnpm-lock.yaml +*.po +*.pptx +*.priv +**/rfc.bib +*.rpath +**/signing-key.asc +*.sqlite +*/src/anastasis-data.ts +**/*.svg +*.svg +*.tag +**/templating/mustach** +*/templating/test?/** +*/testcurl/test_tricky.c +*/debian/tmp/** +*/debian/taler-exchange/** +*/debian/.debhelper/** +*/debian/autoreconf.before +*/debian/autoreconf.after +debian/taler-terms-generator/**/* +taler-terms-generator +*.tgz +*.ttf +*.ttf +**/valgrind.h +*/vpn/tests/** +*.wav +*.woff +*.woff2 +*.xcf +*.xlsx +*.zkey +release-artifacts +EOF +); + +echo Current directory: `pwd` + +codespell -I "${job_dir}"/dictionary.txt -S ${skip//$'\n'/,} diff --git a/contrib/ci/jobs/002-test/job.sh b/contrib/ci/jobs/002-test/job.sh index 3270feb65..bfb24e335 100755 --- a/contrib/ci/jobs/002-test/job.sh +++ b/contrib/ci/jobs/002-test/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/test.sh diff --git a/contrib/ci/jobs/003-docs/job.sh b/contrib/ci/jobs/003-docs/job.sh index 3270feb65..a72bca4ba 100755 --- a/contrib/ci/jobs/003-docs/job.sh +++ b/contrib/ci/jobs/003-docs/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/docs.sh diff --git a/contrib/ci/jobs/100-build-debian-bookworm-amd64-gen/job.sh b/contrib/ci/jobs/100-build-debian-bookworm-amd64-gen/job.sh index 3270feb65..8d79902c5 100755 --- a/contrib/ci/jobs/100-build-debian-bookworm-amd64-gen/job.sh +++ b/contrib/ci/jobs/100-build-debian-bookworm-amd64-gen/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/build.sh diff --git a/contrib/ci/jobs/101-deb-package-debian-bookworm-amd64-gen/job.sh b/contrib/ci/jobs/101-deb-package-debian-bookworm-amd64-gen/job.sh new file mode 100755 index 000000000..922f8bf63 --- /dev/null +++ b/contrib/ci/jobs/101-deb-package-debian-bookworm-amd64-gen/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. + + +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 --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/exchange/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/101-deb-package-debian-bookworm-amd64-gen/version.sh b/contrib/ci/jobs/101-deb-package-debian-bookworm-amd64-gen/version.sh new file mode 100755 index 000000000..52031b23a --- /dev/null +++ b/contrib/ci/jobs/101-deb-package-debian-bookworm-amd64-gen/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*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD | sed -r 's/^v//' || 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/102-upload-debian-bookworm-amd64-gen/job.sh b/contrib/ci/jobs/102-upload-debian-bookworm-amd64-gen/job.sh index 3270feb65..bc77ef954 100755 --- a/contrib/ci/jobs/102-upload-debian-bookworm-amd64-gen/job.sh +++ b/contrib/ci/jobs/102-upload-debian-bookworm-amd64-gen/job.sh @@ -1,2 +1,18 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/exchange/${CI_COMMIT_REF}/*.deb" +RELEASE_ARTIFACT_DIR="${RELEASE_ARTIFACT_DIR:-"$(dirname $0)/../../../../release-artifacts"}" + +if [[ -d "$RELEASE_ARTIFACT_DIR" ]]; then + rsync -vP $ARTIFACT_PATH $RELEASE_ARTIFACT_DIR +else + RSYNC_HOST=${RSYNC_HOST:-"taler.host.internal"} + RSYNC_PORT=${RSYNC_PORT:-424242} + RSYNC_PATH=${RSYNC_PATH:-"incoming_packages/bookworm-taler-ci/"} + RSYNC_DEST=${RSYNC_DEST:-"rsync://${RSYNC_HOST}/${RSYNC_PATH}"} + + rsync -vP \ + --port ${RSYNC_PORT} \ + ${ARTIFACT_PATH} ${RSYNC_DEST} +fi; diff --git a/contrib/ci/jobs/105-build-debian-bookworm-arm64-gen/job.sh b/contrib/ci/jobs/105-build-debian-bookworm-arm64-gen/job.sh index 3270feb65..8d79902c5 100755 --- a/contrib/ci/jobs/105-build-debian-bookworm-arm64-gen/job.sh +++ b/contrib/ci/jobs/105-build-debian-bookworm-arm64-gen/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/build.sh diff --git a/contrib/ci/jobs/106-deb-package-debian-bookworm-arm64-gen/job.sh b/contrib/ci/jobs/106-deb-package-debian-bookworm-arm64-gen/job.sh index 3270feb65..922f8bf63 100755 --- a/contrib/ci/jobs/106-deb-package-debian-bookworm-arm64-gen/job.sh +++ b/contrib/ci/jobs/106-deb-package-debian-bookworm-arm64-gen/job.sh @@ -1,2 +1,23 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +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 --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/exchange/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/106-deb-package-debian-bookworm-arm64-gen/version.sh b/contrib/ci/jobs/106-deb-package-debian-bookworm-arm64-gen/version.sh new file mode 100755 index 000000000..52031b23a --- /dev/null +++ b/contrib/ci/jobs/106-deb-package-debian-bookworm-arm64-gen/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*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD | sed -r 's/^v//' || 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/107-upload-debian-bookworm-arm64-gen/job.sh b/contrib/ci/jobs/107-upload-debian-bookworm-arm64-gen/job.sh index 3270feb65..bc77ef954 100755 --- a/contrib/ci/jobs/107-upload-debian-bookworm-arm64-gen/job.sh +++ b/contrib/ci/jobs/107-upload-debian-bookworm-arm64-gen/job.sh @@ -1,2 +1,18 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/exchange/${CI_COMMIT_REF}/*.deb" +RELEASE_ARTIFACT_DIR="${RELEASE_ARTIFACT_DIR:-"$(dirname $0)/../../../../release-artifacts"}" + +if [[ -d "$RELEASE_ARTIFACT_DIR" ]]; then + rsync -vP $ARTIFACT_PATH $RELEASE_ARTIFACT_DIR +else + RSYNC_HOST=${RSYNC_HOST:-"taler.host.internal"} + RSYNC_PORT=${RSYNC_PORT:-424242} + RSYNC_PATH=${RSYNC_PATH:-"incoming_packages/bookworm-taler-ci/"} + RSYNC_DEST=${RSYNC_DEST:-"rsync://${RSYNC_HOST}/${RSYNC_PATH}"} + + rsync -vP \ + --port ${RSYNC_PORT} \ + ${ARTIFACT_PATH} ${RSYNC_DEST} +fi; diff --git a/contrib/ci/jobs/110-build-debian-trixie-amd64-gen/job.sh b/contrib/ci/jobs/110-build-debian-trixie-amd64-gen/job.sh index 3270feb65..8d79902c5 100755 --- a/contrib/ci/jobs/110-build-debian-trixie-amd64-gen/job.sh +++ b/contrib/ci/jobs/110-build-debian-trixie-amd64-gen/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/build.sh diff --git a/contrib/ci/jobs/111-deb-package-debian-trixie-amd64-gen/job.sh b/contrib/ci/jobs/111-deb-package-debian-trixie-amd64-gen/job.sh index 3270feb65..922f8bf63 100755 --- a/contrib/ci/jobs/111-deb-package-debian-trixie-amd64-gen/job.sh +++ b/contrib/ci/jobs/111-deb-package-debian-trixie-amd64-gen/job.sh @@ -1,2 +1,23 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +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 --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/exchange/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/111-deb-package-debian-trixie-amd64-gen/version.sh b/contrib/ci/jobs/111-deb-package-debian-trixie-amd64-gen/version.sh new file mode 100755 index 000000000..52031b23a --- /dev/null +++ b/contrib/ci/jobs/111-deb-package-debian-trixie-amd64-gen/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*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD | sed -r 's/^v//' || 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/112-upload-debian-trixie-amd64-gen/job.sh b/contrib/ci/jobs/112-upload-debian-trixie-amd64-gen/job.sh index 3270feb65..4793d5bb1 100755 --- a/contrib/ci/jobs/112-upload-debian-trixie-amd64-gen/job.sh +++ b/contrib/ci/jobs/112-upload-debian-trixie-amd64-gen/job.sh @@ -1,2 +1,18 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/exchange/${CI_COMMIT_REF}/*.deb" +RELEASE_ARTIFACT_DIR="${RELEASE_ARTIFACT_DIR:-"$(dirname $0)/../../../../release-artifacts"}" + +if [[ -d "$RELEASE_ARTIFACT_DIR" ]]; then + rsync -vP $ARTIFACT_PATH $RELEASE_ARTIFACT_DIR +else + RSYNC_HOST=${RSYNC_HOST:-"taler.host.internal"} + RSYNC_PORT=${RSYNC_PORT:-424242} + RSYNC_PATH=${RSYNC_PATH:-"incoming_packages/trixie-taler-ci/"} + RSYNC_DEST=${RSYNC_DEST:-"rsync://${RSYNC_HOST}/${RSYNC_PATH}"} + + rsync -vP \ + --port ${RSYNC_PORT} \ + ${ARTIFACT_PATH} ${RSYNC_DEST} +fi; diff --git a/contrib/ci/jobs/115-build-debian-trixie-arm64-gen/job.sh b/contrib/ci/jobs/115-build-debian-trixie-arm64-gen/job.sh index 3270feb65..8d79902c5 100755 --- a/contrib/ci/jobs/115-build-debian-trixie-arm64-gen/job.sh +++ b/contrib/ci/jobs/115-build-debian-trixie-arm64-gen/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/build.sh diff --git a/contrib/ci/jobs/116-deb-package-debian-trixie-arm64-gen/job.sh b/contrib/ci/jobs/116-deb-package-debian-trixie-arm64-gen/job.sh index 3270feb65..922f8bf63 100755 --- a/contrib/ci/jobs/116-deb-package-debian-trixie-arm64-gen/job.sh +++ b/contrib/ci/jobs/116-deb-package-debian-trixie-arm64-gen/job.sh @@ -1,2 +1,23 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +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 --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/exchange/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/116-deb-package-debian-trixie-arm64-gen/version.sh b/contrib/ci/jobs/116-deb-package-debian-trixie-arm64-gen/version.sh new file mode 100755 index 000000000..52031b23a --- /dev/null +++ b/contrib/ci/jobs/116-deb-package-debian-trixie-arm64-gen/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*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD | sed -r 's/^v//' || 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/117-upload-debian-trixie-arm64-gen/job.sh b/contrib/ci/jobs/117-upload-debian-trixie-arm64-gen/job.sh index 3270feb65..4793d5bb1 100755 --- a/contrib/ci/jobs/117-upload-debian-trixie-arm64-gen/job.sh +++ b/contrib/ci/jobs/117-upload-debian-trixie-arm64-gen/job.sh @@ -1,2 +1,18 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/exchange/${CI_COMMIT_REF}/*.deb" +RELEASE_ARTIFACT_DIR="${RELEASE_ARTIFACT_DIR:-"$(dirname $0)/../../../../release-artifacts"}" + +if [[ -d "$RELEASE_ARTIFACT_DIR" ]]; then + rsync -vP $ARTIFACT_PATH $RELEASE_ARTIFACT_DIR +else + RSYNC_HOST=${RSYNC_HOST:-"taler.host.internal"} + RSYNC_PORT=${RSYNC_PORT:-424242} + RSYNC_PATH=${RSYNC_PATH:-"incoming_packages/trixie-taler-ci/"} + RSYNC_DEST=${RSYNC_DEST:-"rsync://${RSYNC_HOST}/${RSYNC_PATH}"} + + rsync -vP \ + --port ${RSYNC_PORT} \ + ${ARTIFACT_PATH} ${RSYNC_DEST} +fi; diff --git a/contrib/ci/jobs/120-build-debian-unstable-amd64-gen/job.sh b/contrib/ci/jobs/120-build-debian-unstable-amd64-gen/job.sh index 3270feb65..8d79902c5 100755 --- a/contrib/ci/jobs/120-build-debian-unstable-amd64-gen/job.sh +++ b/contrib/ci/jobs/120-build-debian-unstable-amd64-gen/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/build.sh diff --git a/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh index 3270feb65..922f8bf63 100755 --- a/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh +++ b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh @@ -1,2 +1,23 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +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 --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/exchange/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/version.sh b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/version.sh new file mode 100755 index 000000000..52031b23a --- /dev/null +++ b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/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*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD | sed -r 's/^v//' || 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/122-upload-debian-unstable-amd64-gen/job.sh b/contrib/ci/jobs/122-upload-debian-unstable-amd64-gen/job.sh index 3270feb65..ac6c27e56 100755 --- a/contrib/ci/jobs/122-upload-debian-unstable-amd64-gen/job.sh +++ b/contrib/ci/jobs/122-upload-debian-unstable-amd64-gen/job.sh @@ -1,2 +1,18 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/exchange/${CI_COMMIT_REF}/*.deb" +RELEASE_ARTIFACT_DIR="${RELEASE_ARTIFACT_DIR:-"$(dirname $0)/../../../../release-artifacts"}" + +if [[ -d "$RELEASE_ARTIFACT_DIR" ]]; then + rsync -vP $ARTIFACT_PATH $RELEASE_ARTIFACT_DIR +else + RSYNC_HOST=${RSYNC_HOST:-"taler.host.internal"} + RSYNC_PORT=${RSYNC_PORT:-424242} + RSYNC_PATH=${RSYNC_PATH:-"incoming_packages/unstable-taler-ci/"} + RSYNC_DEST=${RSYNC_DEST:-"rsync://${RSYNC_HOST}/${RSYNC_PATH}"} + + rsync -vP \ + --port ${RSYNC_PORT} \ + ${ARTIFACT_PATH} ${RSYNC_DEST} +fi; diff --git a/contrib/ci/jobs/125-build-debian-unstable-arm64-gen/job.sh b/contrib/ci/jobs/125-build-debian-unstable-arm64-gen/job.sh index 3270feb65..8d79902c5 100755 --- a/contrib/ci/jobs/125-build-debian-unstable-arm64-gen/job.sh +++ b/contrib/ci/jobs/125-build-debian-unstable-arm64-gen/job.sh @@ -1,2 +1,6 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/build.sh diff --git a/contrib/ci/jobs/126-deb-package-debian-unstable-arm64-gen/job.sh b/contrib/ci/jobs/126-deb-package-debian-unstable-arm64-gen/job.sh index 3270feb65..922f8bf63 100755 --- a/contrib/ci/jobs/126-deb-package-debian-unstable-arm64-gen/job.sh +++ b/contrib/ci/jobs/126-deb-package-debian-unstable-arm64-gen/job.sh @@ -1,2 +1,23 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +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 --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/exchange/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/ diff --git a/contrib/ci/jobs/126-deb-package-debian-unstable-arm64-gen/version.sh b/contrib/ci/jobs/126-deb-package-debian-unstable-arm64-gen/version.sh new file mode 100755 index 000000000..52031b23a --- /dev/null +++ b/contrib/ci/jobs/126-deb-package-debian-unstable-arm64-gen/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*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD | sed -r 's/^v//' || 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/127-upload-debian-unstable-arm64-gen/job.sh b/contrib/ci/jobs/127-upload-debian-unstable-arm64-gen/job.sh index 3270feb65..ac6c27e56 100755 --- a/contrib/ci/jobs/127-upload-debian-unstable-arm64-gen/job.sh +++ b/contrib/ci/jobs/127-upload-debian-unstable-arm64-gen/job.sh @@ -1,2 +1,18 @@ #!/bin/bash -exec ./contrib/ci/debian-package-job.sh +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/exchange/${CI_COMMIT_REF}/*.deb" +RELEASE_ARTIFACT_DIR="${RELEASE_ARTIFACT_DIR:-"$(dirname $0)/../../../../release-artifacts"}" + +if [[ -d "$RELEASE_ARTIFACT_DIR" ]]; then + rsync -vP $ARTIFACT_PATH $RELEASE_ARTIFACT_DIR +else + RSYNC_HOST=${RSYNC_HOST:-"taler.host.internal"} + RSYNC_PORT=${RSYNC_PORT:-424242} + RSYNC_PATH=${RSYNC_PATH:-"incoming_packages/unstable-taler-ci/"} + RSYNC_DEST=${RSYNC_DEST:-"rsync://${RSYNC_HOST}/${RSYNC_PATH}"} + + rsync -vP \ + --port ${RSYNC_PORT} \ + ${ARTIFACT_PATH} ${RSYNC_DEST} +fi; |