From a16be71a237aa291766bc93ef7524631300a7fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Sun, 31 Mar 2019 14:09:43 +0300 Subject: [PATCH] Update gitlab-ci.yml build stanza to match latest Salsa-CI standards --- debian/gitlab-ci.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml index b3218b24f..ca56c8004 100644 --- a/debian/gitlab-ci.yml +++ b/debian/gitlab-ci.yml @@ -13,18 +13,29 @@ stages: .build: &build stage: build image: registry.salsa.debian.org/salsa-ci-team/images/gbp + cache: + paths: + - ${CCACHE_WORK_DIR} + variables: + CCACHE_TMP_DIR: ${CI_PROJECT_DIR}/../.ccache + CCACHE_WORK_DIR: ${WORKING_DIR}/.ccache services: - docker:dind artifacts: - expire_in: 180 day - name: "$CI_BUILD_NAME" + expire_in: 90 day + name: "$CI_JOB_NAME:$CI_COMMIT_REF_NAME" paths: - ${WORKING_DIR}/ script: + - | + curl https://prittiau.debian.net/post -X POST --data "{\"project_id\":$CI_PROJECT_ID, \"pipeline_id\":$CI_PIPELINE_ID}" --header "Content-Type: application/json" + - mkdir -p ${CCACHE_WORK_DIR} + - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} - gbp pull --ignore-branch --pristine-tar --track-missing - while true; do sleep 600; echo "10 minutes passed" >&2; done & # Progress keeper since build is long and silent - - gbp buildpackage --git-ignore-branch --git-export-dir=${WORKING_DIR} -us -uc --git-builder="docker-build.sh registry.salsa.debian.org/salsa-ci-team/images/dockerbuilder:${RELEASE}" | tail -n 10000 # Keep log under 4 MB + - gbp buildpackage --git-ignore-branch --git-export-dir=${WORKING_DIR} --git-builder="docker-build.sh registry.salsa.debian.org/salsa-ci-team/images/dockerbuilder:${RELEASE}" | tail -n 10000 # Keep log under 4 MB - du -shc ${WORKING_DIR}/* # Show total file size of artifacts. Must stay are under 100 MB. + - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} build package stretch: <<: *build -- GitLab