Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
9360d96f
Unverified
Commit
9360d96f
authored
Jul 14, 2020
by
Arve Knudsen
Committed by
GitHub
Jul 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drone: Tighten grafana-enterprise access to token (#26321)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent
187612ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
27 deletions
+49
-27
.drone.yml
+2
-0
scripts/lib.star
+47
-27
No files found.
.drone.yml
View file @
9360d96f
...
...
@@ -160,6 +160,8 @@ steps:
-
mkdir -p /hugo/content/docs/grafana
-
cp -r docs/sources /hugo/content/docs/grafana/latest
-
cd /hugo && make prod
depends_on
:
-
initialize
-
name
:
copy-packages-for-docker
image
:
grafana/build-container:1.2.21
...
...
scripts/lib.star
View file @
9360d96f
...
...
@@ -45,8 +45,7 @@ def pipelines(kind, name, edition):
},
},
],
'steps': [
init_step(edition),
'steps': init_steps(edition) + [
lint_backend_step(edition),
{
'name': 'codespell',
...
...
@@ -230,6 +229,9 @@ def pipelines(kind, name, edition):
'name': 'build-docs-website',
# Use latest revision here, since we want to catch if it breaks
'image': 'grafana/docs-base:latest',
'depends_on': [
'initialize',
],
'commands': [
'mkdir -p /hugo/content/docs/grafana',
'cp -r docs/sources /hugo/content/docs/grafana/latest',
...
...
@@ -328,7 +330,7 @@ def pipelines(kind, name, edition):
return pipelines
def init_step(edition):
def init_step
s
(edition):
grabpl_version = '0.4.24'
common_cmds = [
'curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz',
...
...
@@ -339,41 +341,59 @@ def init_step(edition):
'cp -r $(yarn cache dir) yarn-cache',
]
if edition == 'enterprise':
return {
return [
{
'name': 'clone',
'image': 'alpine/git:v2.26.2',
'environment': {
'GITHUB_TOKEN': {
'from_secret': 'github_token',
},
},
'commands': [
'git clone https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git',
'cd grafana-enterprise',
'git checkout ${DRONE_COMMIT}',
],
},
{
'name': 'initialize',
'image': build_image,
'environment': {
'GRABPL_VERSION': grabpl_version,
'DOCKERIZE_VERSION': '0.6.1',
},
'depends_on': [
'clone',
],
'commands': [
'curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl',
'chmod +x grabpl',
'mv grabpl /tmp',
'mv grafana-enterprise /tmp/',
'/tmp/grabpl init-enterprise /tmp/grafana-enterprise',
'mkdir bin',
'mv /tmp/grabpl bin/'
] + common_cmds,
},
]
return [
{
'name': 'initialize',
'image': build_image,
'environment': {
'GRABPL_VERSION': grabpl_version,
'DOCKERIZE_VERSION': '0.6.1',
'GITHUB_TOKEN': {
'from_secret': 'github_token',
},
},
'commands': [
# Have grabpl clone Grafana OSS and pull enterprise extensions into it
'curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl',
'chmod +x grabpl',
'mv grabpl /tmp',
'/tmp/grabpl init-enterprise ${DRONE_COMMIT} $${GITHUB_TOKEN}',
'mkdir bin',
'mv /tmp/grabpl bin/'
'mkdir -p bin',
'mv grabpl bin',
] + common_cmds,
}
return {
'name': 'initialize',
'image': build_image,
'environment': {
'GRABPL_VERSION': grabpl_version,
'DOCKERIZE_VERSION': '0.6.1',
},
'commands': [
'curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl',
'chmod +x grabpl',
'mkdir -p bin',
'mv grabpl bin',
] + common_cmds,
}
]
def lint_backend_step(edition):
cmd = 'make lint-go'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment