Skip to content

Commit

Permalink
ayufan: ci: use CI_PIPELINE_IID
Browse files Browse the repository at this point in the history
Change-Id: I4d00b5c2d4d10eb23ff2e406c42623b623df1cb2
  • Loading branch information
ayufan committed Jun 10, 2018
1 parent 5183d4f commit ade7fd3
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ade7fd3

Please sign in to comment.