Skip to content

Commit ade7fd3

Browse files
committed
ayufan: ci: use CI_PIPELINE_IID
Change-Id: I4d00b5c2d4d10eb23ff2e406c42623b623df1cb2
1 parent 5183d4f commit ade7fd3

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,7 @@ build:
1717
only: [branches]
1818
script:
1919
- rm -f ../*.deb
20-
- |
21-
set -x
22-
23-
all_pipeline_ids() {
24-
for i in $(seq 1 "${2:-10}"); do
25-
result=$(curl --fail "https://gitlab.com/$1/pipelines.json?page=$i" |
26-
jq -r '.pipelines[].id')
27-
28-
[[ -z "$result" ]] && return 0
29-
echo "$result"
30-
done
31-
32-
echo "all_pipeline_ids: failed to get all ids" 1>&2
33-
return 1
34-
}
35-
36-
get_pipeline_iid() {
37-
all_pipeline_ids "$1" "$3" | jq -r "select(. <= $2)" | wc -l
38-
}
39-
40-
export RELEASE=$((1000+$(get_pipeline_iid "$CI_PROJECT_PATH" "$CI_PIPELINE_ID")))
41-
42-
echo "Current release is $RELEASE."
20+
- export RELEASE=$((1000+$CI_PIPELINE_IID))
4321
- ./dev-make kernel-package
4422
- |
4523
set -x

0 commit comments

Comments
 (0)