mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Drone: Fix release pipelines (#28084)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
parent
a2e676f675
commit
98b94d3824
10
.drone.yml
10
.drone.yml
@ -1057,7 +1057,7 @@ steps:
|
||||
commands:
|
||||
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
||||
- cd grafana-enterprise
|
||||
- git checkout ${DRONE_COMMIT}
|
||||
- git checkout ${DRONE_TAG}
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
@ -1069,7 +1069,7 @@ steps:
|
||||
- chmod +x grabpl
|
||||
- mv grabpl /tmp
|
||||
- mv grafana-enterprise /tmp/
|
||||
- /tmp/grabpl init-enterprise /tmp/grafana-enterprise
|
||||
- /tmp/grabpl init-enterprise /tmp/grafana-enterprise ${DRONE_TAG}
|
||||
- mkdir bin
|
||||
- mv /tmp/grabpl bin/
|
||||
- ./bin/grabpl verify-version ${DRONE_TAG}
|
||||
@ -1336,7 +1336,7 @@ steps:
|
||||
commands:
|
||||
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
||||
- cd grafana-enterprise
|
||||
- git checkout $$env:DRONE_COMMIT
|
||||
- git checkout ${DRONE_TAG}
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
@ -1812,7 +1812,7 @@ steps:
|
||||
commands:
|
||||
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
||||
- cd grafana-enterprise
|
||||
- git checkout ${DRONE_COMMIT}
|
||||
- git checkout master
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
@ -2085,7 +2085,7 @@ steps:
|
||||
commands:
|
||||
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
||||
- cd grafana-enterprise
|
||||
- git checkout $$env:DRONE_COMMIT
|
||||
- git checkout master
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
|
@ -111,10 +111,18 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
|
||||
'yarn install --frozen-lockfile --no-progress',
|
||||
])
|
||||
if edition == 'enterprise':
|
||||
if is_downstream:
|
||||
source_commit = ' $${SOURCE_COMMIT}'
|
||||
else:
|
||||
if ver_mode == 'release':
|
||||
committish = '${DRONE_TAG}'
|
||||
source_commit = ' ${DRONE_TAG}'
|
||||
elif ver_mode == 'test-release':
|
||||
committish = 'master'
|
||||
source_commit = ''
|
||||
else:
|
||||
if is_downstream:
|
||||
source_commit = ' $${SOURCE_COMMIT}'
|
||||
else:
|
||||
source_commit = ''
|
||||
committish = '${DRONE_COMMIT}'
|
||||
steps = [
|
||||
identify_runner_step,
|
||||
{
|
||||
@ -128,7 +136,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
|
||||
'commands': [
|
||||
'git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"',
|
||||
'cd grafana-enterprise',
|
||||
'git checkout ${DRONE_COMMIT}',
|
||||
'git checkout {}'.format(committish),
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -863,6 +871,12 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
||||
})
|
||||
|
||||
if edition == 'enterprise':
|
||||
if ver_mode == 'release':
|
||||
committish = '${DRONE_TAG}'
|
||||
elif ver_mode == 'test-release':
|
||||
committish = 'master'
|
||||
else:
|
||||
committish = '$$env:DRONE_COMMIT'
|
||||
# For enterprise, we have to clone both OSS and enterprise and merge the latter into the former
|
||||
clone_commands = [
|
||||
'git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"',
|
||||
@ -870,7 +884,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
||||
if not is_downstream:
|
||||
clone_commands.extend([
|
||||
'cd grafana-enterprise',
|
||||
'git checkout $$env:DRONE_COMMIT',
|
||||
'git checkout {}'.format(committish),
|
||||
])
|
||||
steps.insert(0, {
|
||||
'name': 'clone',
|
||||
|
Loading…
Reference in New Issue
Block a user