Skip to content

Commit

Permalink
Merge branch 'master' into evictorero/public-dashboards-support
Browse files Browse the repository at this point in the history
  • Loading branch information
evictorero authored Oct 30, 2023
2 parents 068074c + 6a10c67 commit 5ccfbd7
Show file tree
Hide file tree
Showing 104 changed files with 2,659 additions and 982 deletions.
73 changes: 3 additions & 70 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
local grafanaVersions = ['10.0.1', '9.5.5', '9.4.13', '9.3.16', '8.5.27', '7.5.17'];
local grafanaVersions = ['10.1.2', '10.0.6', '9.5.10', '8.5.27'];
local images = {
go: 'golang:1.20',
python: 'python:3.11-alpine',
lint: 'golangci/golangci-lint:v1.52',
go: 'golang:1.21',
terraform: 'hashicorp/terraform',
grafana(version): 'grafana/grafana:' + version,
grafanaEnterprise(version): 'grafana/grafana-enterprise:' + version,
Expand Down Expand Up @@ -117,72 +115,6 @@ local localTestPipeline(
);

[
pipeline(
'lint', steps=[
{
name: 'lint',
image: images.lint,
commands: [
'golangci-lint --version',
'golangci-lint run ./...',
],
},
{
name: 'terraform-fmt',
image: images.terraform,
commands: [
|||
terraform fmt -recursive -check || (echo "Terraform files aren't formatted. Run 'terraform fmt -recursive && go generate'"; exit 1;)
|||,
],
},
]
),

pipeline(
'docs', steps=[
{
name: 'check for drift',
image: images.go,
commands: [
'apt update && apt install -y jq',
'go generate',
'gitstatus="$(git status --porcelain)"',
'if [ -n "$gitstatus" ]; then',
' echo "$gitstatus"',
' echo "docs are out of sync, run \\"go generate\\""',
' exit 1',
'fi',
],
},
{
name: 'check for broken links',
image: images.python,
commands: [
'pip3 install linkchecker',
'linkchecker --config ./.linkcheckerrc docs/',
],
},
]
),

pipeline(
'unit tests',
steps=[
installTerraformStep,
{
name: 'tests',
image: images.go,
commands: [
'go test ./...',
],
environment: {
TF_ACC_TERRAFORM_PATH: terraformPath,
},
},
]
),

pipeline(
'cloud api tests',
steps=[
Expand Down Expand Up @@ -252,6 +184,7 @@ local localTestPipeline(
GRAFANA_TLS_KEY: '%s/client.key' % certPath,
GRAFANA_TLS_CERT: '%s/client.crt' % certPath,
GRAFANA_CA_CERT: '%s/ca.crt' % certPath,
TESTARGS: '-run ".*_basic"', // Tests are slower behind the proxy, let's just run the basic (smaller) ones
}
) + {
steps: [
Expand Down
Loading

0 comments on commit 5ccfbd7

Please sign in to comment.