From ade7fd398d2bf7e4af0b82c83a81299b79912b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Sun, 10 Jun 2018 10:50:44 +0200 Subject: [PATCH] ayufan: ci: use CI_PIPELINE_IID Change-Id: I4d00b5c2d4d10eb23ff2e406c42623b623df1cb2 --- .gitlab-ci.yml | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b81d4870e3afc..54c439f1c1ee1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,29 +17,7 @@ build: only: [branches] script: - rm -f ../*.deb - - | - set -x - - all_pipeline_ids() { - for i in $(seq 1 "${2:-10}"); do - result=$(curl --fail "https://gitlab.com/$1/pipelines.json?page=$i" | - jq -r '.pipelines[].id') - - [[ -z "$result" ]] && return 0 - echo "$result" - done - - echo "all_pipeline_ids: failed to get all ids" 1>&2 - return 1 - } - - get_pipeline_iid() { - all_pipeline_ids "$1" "$3" | jq -r "select(. <= $2)" | wc -l - } - - export RELEASE=$((1000+$(get_pipeline_iid "$CI_PROJECT_PATH" "$CI_PIPELINE_ID"))) - - echo "Current release is $RELEASE." + - export RELEASE=$((1000+$CI_PIPELINE_IID)) - ./dev-make kernel-package - | set -x