[v11.1.x] CI: Fix release-pr call in releases (#91096)
* CI: Fix release-pr call in releases (#91088) * Fix release-pr call in releases * Remove backport arg * set TARGET to v_target (cherry picked from commit2ffdc2d5b0) * Release Pipeline: [RPM pkg verification] Fix linefeeds converted to literal backslash-n sequences (#90989) fix lf converted to literal backslash-n sequence (cherry picked from commit9852513c65) --------- Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
This commit is contained in:
co-authored by
Diego Augusto Molina
parent
fe032f10c7
commit
3d38f30ff4
+7
-13
@@ -2850,12 +2850,9 @@ steps:
|
||||
- commands:
|
||||
- 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/'`
|
||||
- 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
|
||||
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${TARGET:-$default_target}
|
||||
-f backport=$${BACKPORT:-$default_backport} --repo=grafana/grafana release-pr.yml
|
||||
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${v_target}
|
||||
-f latest=$${LATEST} --repo=grafana/grafana release-pr.yml
|
||||
depends_on: []
|
||||
environment:
|
||||
GH_CLI_URL: https://github.com/cli/cli/releases/download/v2.50.0/gh_2.50.0_linux_amd64.tar.gz
|
||||
@@ -2935,12 +2932,9 @@ steps:
|
||||
- commands:
|
||||
- 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/'`
|
||||
- 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
|
||||
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${TARGET:-$default_target}
|
||||
-f backport=$${BACKPORT:-$default_backport} --repo=grafana/grafana release-pr.yml
|
||||
- gh workflow run -f dry_run=$${DRY_RUN} -f version=$${TAG} -f target=$${v_target}
|
||||
-f latest=$${LATEST} --repo=grafana/grafana release-pr.yml
|
||||
depends_on:
|
||||
- publish-artifacts
|
||||
- publish-static-assets
|
||||
@@ -3124,7 +3118,7 @@ steps:
|
||||
- rpm --import https://rpm.grafana.com/gpg.key
|
||||
- 'echo "Step 4: Configuring Grafana repository..."'
|
||||
- |-
|
||||
echo '[grafana]
|
||||
echo -e '[grafana]
|
||||
name=grafana
|
||||
baseurl=https://rpm.grafana.com
|
||||
repo_gpgcheck=0
|
||||
@@ -3302,7 +3296,7 @@ steps:
|
||||
- rpm --import https://rpm.grafana.com/gpg.key
|
||||
- 'echo "Step 4: Configuring Grafana repository..."'
|
||||
- |-
|
||||
echo '[grafana]
|
||||
echo -e '[grafana]
|
||||
name=grafana
|
||||
baseurl=https://rpm.grafana.com
|
||||
repo_gpgcheck=0
|
||||
@@ -5329,6 +5323,6 @@ kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: 542c04f476c1edd5f3006b10f3b129ab0dcc3cef1688976b474f53c7686812da
|
||||
hmac: f81095a620e0dcfb639533c375755ab430c08eaa2043ac990f573965e971ed75
|
||||
|
||||
...
|
||||
|
||||
@@ -75,8 +75,6 @@ def release_pr_step(depends_on = []):
|
||||
"commands": [
|
||||
"apk add perl",
|
||||
"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
|
||||
"curl -L $${GH_CLI_URL} | tar -xz --strip-components=1 -C /usr",
|
||||
# Run the release-pr workflow
|
||||
@@ -84,9 +82,8 @@ def release_pr_step(depends_on = []):
|
||||
"-f dry_run=$${DRY_RUN} " +
|
||||
"-f version=$${TAG} " +
|
||||
# If the submitter has set a target branch, then use that, otherwise use the default
|
||||
"-f target=$${TARGET:-$default_target} " +
|
||||
# If the submitter has set a backport branch, then use that, otherwise use the default
|
||||
"-f backport=$${BACKPORT:-$default_backport} " +
|
||||
"-f target=$${v_target} " +
|
||||
"-f latest=$${LATEST} " +
|
||||
"--repo=grafana/grafana release-pr.yml",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1279,7 +1279,7 @@ def verify_linux_RPM_packages_step(depends_on = []):
|
||||
'echo "Step 3: Adding Grafana GPG key..."',
|
||||
"rpm --import https://rpm.grafana.com/gpg.key",
|
||||
'echo "Step 4: Configuring Grafana repository..."',
|
||||
"echo '" + repo_config + "' > /etc/yum.repos.d/grafana.repo",
|
||||
"echo -e '" + repo_config + "' > /etc/yum.repos.d/grafana.repo",
|
||||
'echo "Step 5: Checking RPM repository..."',
|
||||
"dnf list available grafana-${TAG}",
|
||||
"if [ $? -eq 0 ]; then",
|
||||
|
||||
Reference in New Issue
Block a user