From 2d50e66b34e7b885c475828e70d4fa46732a64f0 Mon Sep 17 00:00:00 2001 From: Horst Gutmann Date: Mon, 22 May 2023 10:50:03 +0200 Subject: [PATCH] [v8.5.x] CI: Fix windows-init (enterprise) step (#68763) --- .drone.yml | 6 +++++- scripts/drone/steps/lib.star | 12 +++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index afc1eec0b05..5fcd6548851 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2684,12 +2684,14 @@ steps: - cp grabpl.exe C:\App\grabpl.exe - rm -force grabpl.exe - C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise + ${DRONE_TAG} - cp C:\App\grabpl.exe grabpl.exe depends_on: - clone environment: GITHUB_TOKEN: from_secret: github_token + GRAFANA_BRANCH: v8.5.x image: grafana/ci-wix:0.1.1 name: windows-init - commands: @@ -4542,12 +4544,14 @@ steps: - cp grabpl.exe C:\App\grabpl.exe - rm -force grabpl.exe - C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise + $$env:DRONE_BRANCH - cp C:\App\grabpl.exe grabpl.exe depends_on: - clone environment: GITHUB_TOKEN: from_secret: github_token + GRAFANA_BRANCH: v8.5.x image: grafana/ci-wix:0.1.1 name: windows-init - commands: @@ -4796,6 +4800,6 @@ kind: secret name: aws_secret_access_key --- kind: signature -hmac: 702107d1f512b722de5103aa8c80ff0f0048b3e42acbc3af17064301414def49 +hmac: 11722c95d8ea29a67300b8fd0a6e98501f14e2f66a6cee4400e0069a0cd7e537 ... diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index e2645cf1cc5..9ad67bf777e 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -1182,13 +1182,19 @@ def get_windows_steps(edition, ver_mode): 'rm -r -force grafana-enterprise', 'cp grabpl.exe C:\\App\\grabpl.exe', 'rm -force grabpl.exe', - 'C:\\App\\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\\App\\grafana-enterprise', + 'C:\\App\\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\\App\\grafana-enterprise {}'.format(committish), 'cp C:\\App\\grabpl.exe grabpl.exe', ]) if 'environment' in steps[1]: - steps[1]['environment'] + {'GITHUB_TOKEN': from_secret(github_token)} + steps[1]['environment'] + { + 'GITHUB_TOKEN': from_secret(github_token), + 'GRAFANA_BRANCH': 'v8.5.x', + } else: - steps[1]['environment'] = {'GITHUB_TOKEN': from_secret(github_token)} + steps[1]['environment'] = { + 'GITHUB_TOKEN': from_secret(github_token), + 'GRAFANA_BRANCH': 'v8.5.x', + } return steps