From 893d74f6ef195c9bbf27657486a9f30cc272381a Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 7 Oct 2020 09:54:27 +1100 Subject: [PATCH] ci: Check version tags are always annotated Closes https://github.com/espressif/esp-idf/issues/3114 --- tools/ci/config/check.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/ci/config/check.yml b/tools/ci/config/check.yml index ba022c7ce6..8d6cc25854 100644 --- a/tools/ci/config/check.yml +++ b/tools/ci/config/check.yml @@ -125,3 +125,16 @@ check_pipeline_triggered_by_label: # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added. # We want to make sure some jobs are always executed to detect regression. - test "$BOT_LABEL_REGULAR_TEST" = "true" || { echo "CI can only pass if 'regular_test' label is included"; exit -1; } + +# For release tag pipelines only, make sure the tag was created with 'git tag -a' so it will update +# the version returned by 'git describe' +check_version_tag: + extends: .check_job_template + only: + refs: + - /^v\d+\.\d+(\.\d+)?($|-)/ + variables: + - $BOT_TRIGGER_WITH_LABEL == null + script: + - (git cat-file -t $CI_COMMIT_REF_NAME | grep tag) || echo "ESP-IDF versions must be annotated tags." && exit 1 +