From f1278f334c9bb16c24e974bfc5075bc311cd22bf Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Tue, 17 Jan 2023 14:15:54 +0700 Subject: [PATCH 1/8] Run release-snapshot workflow on publish-snapshot label --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a3a8488a860..19cb70f30fc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,6 +38,8 @@ workflows: only: - main - /release-v.*/ + tags: + only: publish-snapshot - release: filters: tags: From bbd3454c59524c66bd8f214fece41368d6a0ecbb Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Wed, 18 Jan 2023 21:28:10 +0700 Subject: [PATCH 2/8] check label --- .circleci/config.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 19cb70f30fc..9d942a7359a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,13 +33,6 @@ workflows: not: << pipeline.parameters.mapbox_navigation_native_upstream >> jobs: - release-snapshot: - filters: - branches: - only: - - main - - /release-v.*/ - tags: - only: publish-snapshot - release: filters: tags: @@ -103,6 +96,17 @@ workflows: #---------- COMMANDS ---------- #------------------------------ commands: + check-snapshot-label: + steps: + name: + command: | + PR=$(curl -s $CIRCLE_PULL_REQUEST) + if [[ $CIRCLE_BRANCH == main || $CIRCLE_BRANCH =~ release-v.* || $PR == *"mapbox/mapbox-navigation-android/labels/publish-snapshot"* ]]; then + exit 0 + else + exit 1 + fi + write-workspace: steps: - persist_to_workspace: @@ -770,6 +774,7 @@ jobs: executor: ndk-r22-latest-executor resource_class: medium+ steps: + - check-snapshot-label - checkout - assemble-core-release - assemble-ui-release From ca2a3b8f867f810ea77efad81dbaa63533c0b2f2 Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Wed, 18 Jan 2023 21:57:50 +0700 Subject: [PATCH 3/8] check label --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d942a7359a..27429271d6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,9 +100,12 @@ commands: steps: name: command: | - PR=$(curl -s $CIRCLE_PULL_REQUEST) + if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then + PR=$(curl -s $CIRCLE_PULL_REQUEST) + fi if [[ $CIRCLE_BRANCH == main || $CIRCLE_BRANCH =~ release-v.* || $PR == *"mapbox/mapbox-navigation-android/labels/publish-snapshot"* ]]; then exit 0 + fi else exit 1 fi From 4b9b43c5eb3fd1d24e2ff81a0815908bddb6524d Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Wed, 18 Jan 2023 22:00:06 +0700 Subject: [PATCH 4/8] check label --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 27429271d6a..bbb4b0944e0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,7 +98,7 @@ workflows: commands: check-snapshot-label: steps: - name: + name: 'Check snapshot label' command: | if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then PR=$(curl -s $CIRCLE_PULL_REQUEST) From 77ca04d01f547ff96ed1ff6c87a211b2d0ac1e10 Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Wed, 18 Jan 2023 22:01:14 +0700 Subject: [PATCH 5/8] check label --- .circleci/config.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bbb4b0944e0..d861e500ccd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,17 +98,18 @@ workflows: commands: check-snapshot-label: steps: - name: 'Check snapshot label' - command: | - if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then - PR=$(curl -s $CIRCLE_PULL_REQUEST) - fi - if [[ $CIRCLE_BRANCH == main || $CIRCLE_BRANCH =~ release-v.* || $PR == *"mapbox/mapbox-navigation-android/labels/publish-snapshot"* ]]; then - exit 0 - fi - else - exit 1 - fi + - run: + name: 'Check snapshot label' + command: | + if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then + PR=$(curl -s $CIRCLE_PULL_REQUEST) + fi + if [[ $CIRCLE_BRANCH == main || $CIRCLE_BRANCH =~ release-v.* || $PR == *"mapbox/mapbox-navigation-android/labels/publish-snapshot"* ]]; then + exit 0 + fi + else + exit 1 + fi write-workspace: steps: From 61a75c260bcb5724f24e5a37cddba41b5ae983fb Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Wed, 18 Jan 2023 22:03:04 +0700 Subject: [PATCH 6/8] check label --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d861e500ccd..ce53c89b409 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,7 +99,7 @@ commands: check-snapshot-label: steps: - run: - name: 'Check snapshot label' + name: Check snapshot label command: | if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then PR=$(curl -s $CIRCLE_PULL_REQUEST) From cb32434521df766d4c5e3a25f6ad0e16cdf12f94 Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Wed, 18 Jan 2023 22:04:14 +0700 Subject: [PATCH 7/8] check label --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce53c89b409..4862b5343a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ workflows: when: not: << pipeline.parameters.mapbox_navigation_native_upstream >> jobs: - - release-snapshot: + - release-snapshot - release: filters: tags: From 3241191edf3917bcdc3353881701b777ba00dd47 Mon Sep 17 00:00:00 2001 From: "sevastian.zhukov" Date: Wed, 18 Jan 2023 22:11:40 +0700 Subject: [PATCH 8/8] fix --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4862b5343a9..7de6e264bcc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -106,7 +106,6 @@ commands: fi if [[ $CIRCLE_BRANCH == main || $CIRCLE_BRANCH =~ release-v.* || $PR == *"mapbox/mapbox-navigation-android/labels/publish-snapshot"* ]]; then exit 0 - fi else exit 1 fi