Compare commits

...

10 Commits

Author SHA1 Message Date
dsotirakis
77f5045c29 Cleanup 2022-10-05 17:17:30 +03:00
dsotirakis
edcab90efd Stash changes from verify-gen-cue 2022-10-05 17:17:30 +03:00
dsotirakis
865919f6df Add rebase 2022-10-05 17:17:30 +03:00
dsotirakis
aebeb65383 Remove --quite 2022-10-05 17:17:30 +03:00
dsotirakis
3546a6b84e Fix fetch 2022-10-05 17:17:30 +03:00
dsotirakis
560264fad3 Remove fetch for origin 2022-10-05 17:17:30 +03:00
dsotirakis
82d17a5d1e Replace origin with full url 2022-10-05 17:17:30 +03:00
dsotirakis
25a6dd88a8 Remove remote addition 2022-10-05 17:17:30 +03:00
dsotirakis
3d33c1c8b0 Use github token available for PRs 2022-10-05 17:17:29 +03:00
dsotirakis
32534c4e5d Trigger tag on CI changes 2022-10-05 17:17:29 +03:00
4 changed files with 51 additions and 41 deletions

View File

@@ -361,6 +361,38 @@ steps:
- grabpl
image: grafana/build-container:1.6.2
name: yarn-install
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
--depth=1
- cd grafana-enterprise
- git fetch origin "refs/tags/*:refs/tags/*"
- if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git
push --delete origin $${TEST_TAG}; fi
- git tag $${TEST_TAG} && git push origin $${TEST_TAG}
- cd -
- git fetch https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git "refs/tags/*:refs/tags/*"
&& git fetch
- if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git
push --delete https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG};
fi
- git tag $${TEST_TAG} && git push https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git
$${TEST_TAG}
environment:
DOWNSTREAM_REPO:
from_secret: downstream
GITHUB_TOKEN:
from_secret: github_token_pr
TEST_TAG: v0.0.0-test
failure: ignore
image: grafana/build-container:1.6.2
name: trigger-test-release
when:
paths:
include:
- .drone.yml
- pkg/build/**
repo:
- grafana/grafana
- failure: ignore
image: grafana/drone-downstream
name: trigger-enterprise-downstream
@@ -1199,18 +1231,22 @@ steps:
--depth=1
- cd grafana-enterprise
- git fetch origin "refs/tags/*:refs/tags/*"
- git tag -d $${TEST_TAG} && git push --delete origin $${TEST_TAG} && git tag $${TEST_TAG}
&& git push origin $${TEST_TAG}
- if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git
push --delete origin $${TEST_TAG}; fi
- git tag $${TEST_TAG} && git push origin $${TEST_TAG}
- cd -
- git fetch origin "refs/tags/*:refs/tags/*"
- git remote add downstream https://$${GITHUB_TOKEN}@github.com/grafana/$${DOWNSTREAM_REPO}.git
- git tag -d $${TEST_TAG} && git push --delete downstream --quiet $${TEST_TAG} &&
git tag $${TEST_TAG} && git push downstream $${TEST_TAG} --quiet
- git fetch https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git "refs/tags/*:refs/tags/*"
&& git fetch
- if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git
push --delete https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG};
fi
- git tag $${TEST_TAG} && git push https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git
$${TEST_TAG}
environment:
DOWNSTREAM_REPO:
from_secret: downstream
GITHUB_TOKEN:
from_secret: github_token
from_secret: github_token_pr
TEST_TAG: v0.0.0-test
failure: ignore
image: grafana/build-container:1.6.2
@@ -2214,9 +2250,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -2329,9 +2362,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -2437,9 +2467,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -2509,9 +2536,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -2853,9 +2877,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -3010,9 +3031,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -3168,9 +3186,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -3260,9 +3275,6 @@ trigger:
- promote
ref:
- refs/tags/v*
repo:
exclude:
- grafana/grafana
type: docker
volumes:
- host:
@@ -5324,6 +5336,6 @@ kind: secret
name: packages_secret_access_key
---
kind: signature
hmac: 539cf8d41fba415e57c706a53c93b0f92ff3f69c48ba43526ea95ae506690d2d
hmac: f558c4f9c5483c28faa5bf0708f89250a7b8a5894f0538acf123f4f069316605
...

View File

@@ -460,9 +460,6 @@ def release_pipelines(ver_mode='release', trigger=None):
]
},
'ref': ['refs/tags/v*',],
'repo': {
'exclude': ['grafana/grafana'],
},
}
# The release pipelines include also enterprise ones, so both editions are built for a release.

View File

@@ -53,7 +53,7 @@ def build_e2e(trigger, ver_mode, edition):
yarn_install_step(),
]
build_steps = []
if ver_mode == 'main':
if ver_mode == 'main' or ver_mode == 'pr':
build_steps.extend([trigger_test_release()])
if ver_mode == 'pr':
build_steps.extend([enterprise_downstream_step(edition=edition, ver_mode=ver_mode)])

View File

@@ -1198,7 +1198,7 @@ def trigger_test_release():
'name': 'trigger-test-release',
'image': build_image,
'environment': {
'GITHUB_TOKEN': from_secret('github_token'),
'GITHUB_TOKEN': from_secret('github_token_pr'),
'DOWNSTREAM_REPO': from_secret('downstream'),
'TEST_TAG': 'v0.0.0-test',
},
@@ -1206,11 +1206,12 @@ def trigger_test_release():
'git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" --depth=1',
'cd grafana-enterprise',
'git fetch origin "refs/tags/*:refs/tags/*"',
'git tag -d $${TEST_TAG} && git push --delete origin $${TEST_TAG} && git tag $${TEST_TAG} && git push origin $${TEST_TAG}',
'if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git push --delete origin $${TEST_TAG}; fi',
'git tag $${TEST_TAG} && git push origin $${TEST_TAG}',
'cd -',
'git fetch origin "refs/tags/*:refs/tags/*"',
'git remote add downstream https://$${GITHUB_TOKEN}@github.com/grafana/$${DOWNSTREAM_REPO}.git',
'git tag -d $${TEST_TAG} && git push --delete downstream --quiet $${TEST_TAG} && git tag $${TEST_TAG} && git push downstream $${TEST_TAG} --quiet',
'git fetch https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git "refs/tags/*:refs/tags/*" && git fetch',
'if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git push --delete https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG}; fi',
'git tag $${TEST_TAG} && git push https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG}',
],
'failure': 'ignore',
'when': {