diff options
author | drebs <drebs@riseup.net> | 2017-10-09 09:03:08 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-10-09 13:08:19 -0300 |
commit | f9d99d23fe3a91adf63051290fc95c0290a33ed9 (patch) | |
tree | 4ef6df98d6d1436b79a17b7b5f0ce9db3971a034 | |
parent | 9b62e2ffaba021dd7f4741178f3b6ce61ca714ea (diff) |
[pkg] add timestamps to packaging jobs
-rw-r--r-- | .gitlab-ci.yml | 18 | ||||
-rwxr-xr-x | scripts/packaging/run-packaging-ci-job.sh | 26 |
2 files changed, 32 insertions, 12 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9df3a32b..66c14232 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,19 +79,13 @@ e2e: # "package" stage # -.job_template: &job_definition +.job_template: &package stage: package except: - schedules image: "0xacab.org:4567/leap/gitlab-buildpackage:build_${DIST}_${ARCH}" script: - - "if [ -z \"$(git remote | grep upstream)\" ]; then git remote add upstream https://0xacab.org/leap/soledad; fi" - - "git fetch --tags upstream" - - "pwd; git describe" - - build-build-package - # Test the package with lintian - - build-test-lintian - - "if [ -n \"${SSH_PRIVATE_KEY}\" ]; then upload-package; else echo \"Skipping package upload because SSH_PRIVATE_KEY is not set.\"; fi" + - /usr/bin/unbuffer scripts/packaging/run-packaging-ci-job.sh | /usr/bin/ts -s # sleep 1h to allow debugging of running container # - sleep 3600 artifacts: @@ -111,7 +105,7 @@ package:amd64_jessie: # Default is to fail on warnings, we disable it here # unless a manpage is included (see #8895) LINTIAN_OPTS: "-X filename-length" - <<: *job_definition + <<: *package package:amd64_stretch: @@ -122,7 +116,7 @@ package:amd64_stretch: # Default is to fail on warnings, we disable it here # unless a manpage is included (see #8895) LINTIAN_OPTS: "-X filename-length" - <<: *job_definition + <<: *package package:amd64_buster: variables: @@ -135,7 +129,7 @@ package:amd64_buster: # until we can deprecate jessie and take out the dh-systemd # build-depends (see #8963) LINTIAN_OPTS: "-X filename-length --suppress-tags build-depends-on-obsolete-package" - <<: *job_definition + <<: *package package:amd64_zesty: variables: @@ -145,7 +139,7 @@ package:amd64_zesty: # Default is to fail on warnings, we disable it here # unless a manpage is included (see #8895) LINTIAN_OPTS: "-X filename-length" - <<: *job_definition + <<: *package # diff --git a/scripts/packaging/run-packaging-ci-job.sh b/scripts/packaging/run-packaging-ci-job.sh new file mode 100755 index 00000000..3547e1e1 --- /dev/null +++ b/scripts/packaging/run-packaging-ci-job.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +set -eu + +echo "Starting packaging script for architecture ${ARCH}, distribution ${DIST}..." + +# checkout the relevant branch +if [ -z "$(git remote | grep upstream)" ]; then + git remote add upstream https://0xacab.org/leap/soledad; +fi + +git fetch --tags upstream +pwd; git describe +build-build-package + +# test the package with lintian +build-test-lintian + +# maybe upload the package +if [ -n "${SSH_PRIVATE_KEY}" ]; then + upload-package; +else + echo "Skipping package upload because SSH_PRIVATE_KEY is not set."; +fi + +echo "Packaging script finished." |