CI: supports move from master to main in 7.5.x release branch (#35747)

* CI: supports move from master to main in 7.5.x release branch

* CI: points to the correct branch/tag of oss

* CI: one more master -> main
This commit is contained in:
Leonard Gram
2021-06-16 09:24:24 +02:00
committed by GitHub
parent 45894f90ba
commit 300344dc15
2 changed files with 20 additions and 8 deletions
+14 -5
View File
@@ -1110,6 +1110,7 @@ steps:
- yarn install --frozen-lockfile --no-progress
environment:
DOCKERIZE_VERSION: 0.6.1
DRONE_TARGET_BRANCH: main
depends_on:
- clone
@@ -1489,9 +1490,11 @@ steps:
- rm -r -force grafana-enterprise
- cp grabpl.exe C:\App\grabpl.exe
- rm -force grabpl.exe
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise ${DRONE_TAG}
- cp C:\App\grabpl.exe grabpl.exe
- .\grabpl.exe verify-drone
environment:
DRONE_TARGET_BRANCH: main
depends_on:
- clone
@@ -1996,7 +1999,7 @@ steps:
- chmod +x bin/grabpl
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout master
- git checkout main
environment:
GITHUB_TOKEN:
from_secret: github_token
@@ -2018,6 +2021,7 @@ steps:
- yarn install --frozen-lockfile --no-progress
environment:
DOCKERIZE_VERSION: 0.6.1
DRONE_TARGET_BRANCH: main
depends_on:
- clone
@@ -2379,7 +2383,7 @@ steps:
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.43/windows/grabpl.exe -OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout master
- git checkout main
environment:
GITHUB_TOKEN:
from_secret: github_token
@@ -2391,9 +2395,11 @@ steps:
- rm -r -force grafana-enterprise
- cp grabpl.exe C:\App\grabpl.exe
- rm -force grabpl.exe
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise main
- cp C:\App\grabpl.exe grabpl.exe
- .\grabpl.exe verify-drone
environment:
DRONE_TARGET_BRANCH: main
depends_on:
- clone
@@ -2890,6 +2896,7 @@ steps:
- yarn install --frozen-lockfile --no-progress
environment:
DOCKERIZE_VERSION: 0.6.1
DRONE_TARGET_BRANCH: main
depends_on:
- clone
@@ -3267,9 +3274,11 @@ steps:
- rm -r -force grafana-enterprise
- cp grabpl.exe C:\App\grabpl.exe
- rm -force grabpl.exe
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise
- C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise $$env:DRONE_BRANCH
- cp C:\App\grabpl.exe grabpl.exe
- .\grabpl.exe verify-drone
environment:
DRONE_TARGET_BRANCH: main
depends_on:
- clone
+6 -3
View File
@@ -124,7 +124,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
committish = '${DRONE_TAG}'
source_commit = ' ${DRONE_TAG}'
elif ver_mode == 'test-release':
committish = 'master'
committish = 'main'
elif ver_mode == 'release-branch':
committish = '${DRONE_BRANCH}'
else:
@@ -152,6 +152,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
'image': build_image,
'environment': {
'DOCKERIZE_VERSION': dockerize_version,
'DRONE_TARGET_BRANCH':'main',
},
'depends_on': [
'clone',
@@ -945,6 +946,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
'name': 'initialize',
'image': wix_image,
'commands': init_cmds,
'environment': {},
},
]
if (ver_mode == 'master' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in (
@@ -1003,7 +1005,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
if ver_mode == 'release':
committish = '${DRONE_TAG}'
elif ver_mode == 'test-release':
committish = 'master'
committish = 'main'
elif ver_mode == 'release-branch':
committish = '$$env:DRONE_BRANCH'
else:
@@ -1031,6 +1033,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
},
'commands': download_grabpl_cmds + clone_cmds,
})
steps[1]['environment']['DRONE_TARGET_BRANCH'] = 'main'
steps[1]['depends_on'] = [
'clone',
]
@@ -1040,7 +1043,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
'rm -r -force grafana-enterprise',
'cp grabpl.exe C:\\App\\grabpl.exe',
'rm -force grabpl.exe',
'C:\\App\\grabpl.exe init-enterprise C:\\App\\grafana-enterprise{}'.format(source_commit),
'C:\\App\\grabpl.exe init-enterprise C:\\App\\grafana-enterprise {}'.format(committish),
'cp C:\\App\\grabpl.exe grabpl.exe',
'.\\grabpl.exe verify-drone',
])