mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CI: Fix release-pr call in releases (#91088)
* Fix release-pr call in releases * Remove backport arg * set TARGET to v_target
This commit is contained in:
parent
4e84234424
commit
2ffdc2d5b0
16
.drone.yml
16
.drone.yml
@ -3034,12 +3034,9 @@ steps:
|
|||||||
- commands:
|
- commands:
|
||||||
- apk add perl
|
- apk add perl
|
||||||
- v_target=`echo $${TAG} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/v\1.\2.x/'`
|
- v_target=`echo $${TAG} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/v\1.\2.x/'`
|
||||||
- default_target=`if [[ -n $$LATEST ]]; then echo 'main'; else echo $$v_target;
|
|
||||||
fi`
|
|
||||||
- backport=`if [[ -n $$LATEST ]]; then echo $$v_target; fi`
|
|
||||||
- curl -L $${GH_CLI_URL} | tar -xz --strip-components=1 -C /usr
|
- curl -L $${GH_CLI_URL} | tar -xz --strip-components=1 -C /usr
|
||||||
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${TARGET:-$default_target}
|
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${v_target}
|
||||||
-f backport=$${BACKPORT:-$default_backport} --repo=grafana/grafana release-pr.yml
|
-f latest=$${LATEST} --repo=grafana/grafana release-pr.yml
|
||||||
depends_on: []
|
depends_on: []
|
||||||
environment:
|
environment:
|
||||||
GH_CLI_URL: https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_linux_amd64.tar.gz
|
GH_CLI_URL: https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_linux_amd64.tar.gz
|
||||||
@ -3119,12 +3116,9 @@ steps:
|
|||||||
- commands:
|
- commands:
|
||||||
- apk add perl
|
- apk add perl
|
||||||
- v_target=`echo $${TAG} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/v\1.\2.x/'`
|
- v_target=`echo $${TAG} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/v\1.\2.x/'`
|
||||||
- default_target=`if [[ -n $$LATEST ]]; then echo 'main'; else echo $$v_target;
|
|
||||||
fi`
|
|
||||||
- backport=`if [[ -n $$LATEST ]]; then echo $$v_target; fi`
|
|
||||||
- curl -L $${GH_CLI_URL} | tar -xz --strip-components=1 -C /usr
|
- curl -L $${GH_CLI_URL} | tar -xz --strip-components=1 -C /usr
|
||||||
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${TARGET:-$default_target}
|
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${v_target}
|
||||||
-f backport=$${BACKPORT:-$default_backport} --repo=grafana/grafana release-pr.yml
|
-f latest=$${LATEST} --repo=grafana/grafana release-pr.yml
|
||||||
depends_on:
|
depends_on:
|
||||||
- publish-artifacts
|
- publish-artifacts
|
||||||
- publish-static-assets
|
- publish-static-assets
|
||||||
@ -5514,6 +5508,6 @@ kind: secret
|
|||||||
name: gcr_credentials
|
name: gcr_credentials
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 1a6176686248c5751036eef67b3972b3ea002aa82226dfc28bd565febf17cb19
|
hmac: f82713cb6d029eded29632a21a394d16f0778462a6cd7de647422f34cd1fae39
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -75,8 +75,6 @@ def release_pr_step(depends_on = []):
|
|||||||
"commands": [
|
"commands": [
|
||||||
"apk add perl",
|
"apk add perl",
|
||||||
"v_target=`echo $${{TAG}} | perl -pe 's/{}/v\\1.\\2.x/'`".format(semver_regex),
|
"v_target=`echo $${{TAG}} | perl -pe 's/{}/v\\1.\\2.x/'`".format(semver_regex),
|
||||||
"default_target=`if [[ -n $$LATEST ]]; then echo 'main'; else echo $$v_target; fi`",
|
|
||||||
"backport=`if [[ -n $$LATEST ]]; then echo $$v_target; fi`",
|
|
||||||
# Install gh CLI
|
# Install gh CLI
|
||||||
"curl -L $${GH_CLI_URL} | tar -xz --strip-components=1 -C /usr",
|
"curl -L $${GH_CLI_URL} | tar -xz --strip-components=1 -C /usr",
|
||||||
# Run the release-pr workflow
|
# Run the release-pr workflow
|
||||||
@ -84,9 +82,8 @@ def release_pr_step(depends_on = []):
|
|||||||
"-f dry_run=$${DRY_RUN} " +
|
"-f dry_run=$${DRY_RUN} " +
|
||||||
"-f version=$${TAG} " +
|
"-f version=$${TAG} " +
|
||||||
# If the submitter has set a target branch, then use that, otherwise use the default
|
# If the submitter has set a target branch, then use that, otherwise use the default
|
||||||
"-f target=$${TARGET:-$default_target} " +
|
"-f target=$${v_target} " +
|
||||||
# If the submitter has set a backport branch, then use that, otherwise use the default
|
"-f latest=$${LATEST} " +
|
||||||
"-f backport=$${BACKPORT:-$default_backport} " +
|
|
||||||
"--repo=grafana/grafana release-pr.yml",
|
"--repo=grafana/grafana release-pr.yml",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user