Skip to content

Commit

Permalink
Merge remote-tracking branch 'grafana/master' into series-facade
Browse files Browse the repository at this point in the history
* grafana/master: (65 commits)
  v6.3.0-beta2 is latest testing (grafana#18283)
  Release: Changelog update with v6.3.0-beta2 (grafana#18281)
  Chore: Upgrades typescript to version 3.5 (grafana#18263)
  docs: team sync (grafana#18239)
  SAML: Only show SAML login button on Enterprise version (grafana#18270)
  Permissions: Show plugins in nav for non admin users but hide plugin configuration (grafana#18234)
  CI: Change target branch in CI task trigger-docs-update (grafana#18255)
  Plugins: Include build number and PR in metadata (grafana#18260)
  Run End-to-End tests for release builds (grafana#18211)
  DataLinks: Fixed interpolation of series name, fixes grafana#18250 (grafana#18251)
  Timerange: Fixes a bug where custom time ranges didn't respect UTC (grafana#18248)
  Loki: Remove prefetching of default label values (grafana#18213)
  Build: fix use of env vars in parentheses execs (grafana#18249)
  TimePicker: Increase max height of quick range dropdown (grafana#18247)
  TimePicker: Fixed css issue casued by CSS Optimizer (grafana#18244)
  Revert "Timerange: Fixes a bug where custom time ranges didn't respect UTC (grafana#18217)" (grafana#18246)
  Timerange: Fixes a bug where custom time ranges didn't respect UTC (grafana#18217)
  LDAP: improve POSIX support (grafana#18235)
  Instrumentation: Add failed notifications metric (grafana#18089)
  Docs: update links to sample plugins (grafana#18240)
  ...
  • Loading branch information
ryantxu committed Jul 27, 2019
2 parents 79cb821 + e22269f commit 4b81366
Show file tree
Hide file tree
Showing 293 changed files with 3,600 additions and 1,705 deletions.
61 changes: 60 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,34 @@ jobs:
path: public/e2e-test/screenShots/theOutput
destination: output-screenshots

end-to-end-test-release:
docker:
- image: circleci/node:10-browsers
- image: grafana/grafana:$CIRCLE_TAG
steps:
- run: dockerize -wait tcp://127.0.0.1:3000 -timeout 120s
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
- run:
name: yarn install
command: 'yarn install --pure-lockfile --no-progress'
no_output_timeout: 5m
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: run end-to-end tests
command: 'env BASE_URL=http://127.0.0.1:3000 yarn e2e-tests'
no_output_timeout: 5m
- store_artifacts:
path: public/e2e-test/screenShots/theTruth
destination: expected-screenshots
- store_artifacts:
path: public/e2e-test/screenShots/theOutput
destination: output-screenshots

codespell:
docker:
- image: circleci/python
Expand Down Expand Up @@ -127,6 +155,15 @@ jobs:
name: Lint Go
command: 'make lint-go'

shellcheck:
machine: true
working_directory: ~/go/src/github.com/grafana/grafana
steps:
- checkout
- run:
name: ShellCheck
command: 'make shellcheck'

test-frontend:
docker:
- image: circleci/node:10
Expand Down Expand Up @@ -617,7 +654,7 @@ jobs:
echo "Build URL:"
curl -s -u "$DOCS_CIRCLE_TOKEN:" \
-d build_parameters[CIRCLE_JOB]=pull-submodule-changes \
https://circleci.com/api/v1.1/project/github/grafana/docs.grafana.com/tree/staging \
https://circleci.com/api/v1.1/project/github/grafana/docs.grafana.com/tree/master \
| jq .build_url
else
echo "-- no changes to docs files --"
Expand Down Expand Up @@ -650,6 +687,8 @@ workflows:
filters: *filter-only-master
- lint-go:
filters: *filter-only-master
- shellcheck:
filters: *filter-only-master
- test-frontend:
filters: *filter-only-master
- test-backend:
Expand All @@ -665,6 +704,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
- build-oss-msi
Expand All @@ -677,6 +717,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-master
Expand All @@ -687,6 +728,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
- build-all-enterprise
Expand All @@ -698,6 +740,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-master
Expand All @@ -724,6 +767,8 @@ workflows:
filters: *filter-only-release
- lint-go:
filters: *filter-only-release
- shellcheck:
filters: *filter-only-release
- test-frontend:
filters: *filter-only-release
- test-backend:
Expand All @@ -739,6 +784,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
- build-oss-msi
Expand All @@ -751,6 +797,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-release
Expand All @@ -762,6 +809,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-release
Expand All @@ -772,9 +820,14 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
filters: *filter-only-release
- end-to-end-test-release:
requires:
- grafana-docker-release
filters: *filter-only-release

build-branches-and-prs:
jobs:
Expand All @@ -791,6 +844,10 @@ workflows:
filters: *filter-not-release-or-master
- lint-go:
filters: *filter-not-release-or-master
- lint-go:
filters: *filter-not-release-or-master
- shellcheck:
filters: *filter-not-release-or-master
- test-frontend:
filters: *filter-not-release-or-master
- test-backend:
Expand All @@ -808,6 +865,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
- cache-server-test
Expand All @@ -819,6 +877,7 @@ workflows:
- test-frontend
- codespell
- lint-go
- shellcheck
- mysql-integration-test
- postgres-integration-test
- cache-server-test
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ public/css/*.min.css
/data/*
/bin/*

# devenv
/devenv/docker-compose.yaml
/devenv/.env

conf/custom.ini
fig.yml
devenv/docker-compose.yml
devenv/docker-compose.yaml
/conf/provisioning/**/custom.yaml
/conf/provisioning/**/dev.yaml
/conf/ldap_dev.toml
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# 6.4.0 (unreleased)

# 6.3.0-beta1
# 6.3.0-beta2 (2019-07-26)
### Features / Enhancements
* **Build grafana images consistently**. [#18224](https://github.com/grafana/grafana/pull/18224), [@hassanfarid](https://github.com/hassanfarid)
* **Docs**: SAML. [#18069](https://github.com/grafana/grafana/pull/18069), [@gotjosh](https://github.com/gotjosh)
* **Permissions**: Show plugins in nav for non admin users but hide plugin configuration. [#18234](https://github.com/grafana/grafana/pull/18234), [@aocenas](https://github.com/aocenas)
* **TimePicker**: Increase max height of quick range dropdown. [#18247](https://github.com/grafana/grafana/pull/18247), [@torkelo](https://github.com/torkelo)

### Bug Fixes
* **DataLinks**: Fixes incorrect interpolation of ${__series_name} . [#18251](https://github.com/grafana/grafana/pull/18251), [@torkelo](https://github.com/torkelo)
* **Loki**: Display live tailed logs in correct order in Explore. [#18031](https://github.com/grafana/grafana/pull/18031), [@kaydelaney](https://github.com/kaydelaney)
* **PhantomJS**: Fixes rendering on Debian Buster. [#18162](https://github.com/grafana/grafana/pull/18162), [@xlson](https://github.com/xlson)
* **TimePicker**: Fixed style issue for custom range popover. [#18244](https://github.com/grafana/grafana/pull/18244), [@torkelo](https://github.com/torkelo)
* **Timerange**: Fixes a bug where custom time ranges didn't respect UTC. [#18248](https://github.com/grafana/grafana/pull/18248), [@kaydelaney](https://github.com/kaydelaney)
* **remote_cache**: Fix redis connstr parsing. [#18204](https://github.com/grafana/grafana/pull/18204), [@mblaschke](https://github.com/mblaschke)


# 6.3.0-beta1 (2019-07-10)
### Features / Enhancements
* **Alerting**: Add tags to alert rules. [#10989](https://github.com/grafana/grafana/pull/10989), [@Thib17](https://github.com/Thib17)
* **Alerting**: Attempt to send email notifications to all given email addresses. [#16881](https://github.com/grafana/grafana/pull/16881), [@zhulongcheng](https://github.com/zhulongcheng)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY packages packages

RUN yarn install --pure-lockfile --no-progress

COPY Gruntfile.js tsconfig.json tslint.json ./
COPY Gruntfile.js tsconfig.json tslint.json .browserslistrc ./
COPY public public
COPY scripts scripts
COPY emails emails
Expand All @@ -33,7 +33,7 @@ ENV NODE_ENV production
RUN ./node_modules/.bin/grunt build

# Final container
FROM ubuntu:latest
FROM ubuntu:18.04

LABEL maintainer="Grafana team <[email protected]>"

Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go gosec revive golangci-lint go-vet test-go test-js test run clean devenv devenv-down revive-alerting

GO := GO111MODULE=on go
GO_FILES := ./pkg/...
GO = GO111MODULE=on go
GO_FILES ?= ./pkg/...
SH_FILES ?= $(shell find ./scripts -name *.sh)

all: deps build

Expand Down Expand Up @@ -111,6 +112,11 @@ go-vet:

lint-go: go-vet golangci-lint revive revive-alerting gosec

# with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts
shellcheck: $(SH_FILES)
@docker run --rm -v "$$PWD:/mnt" koalaman/shellcheck:stable \
$(SH_FILES) -e SC1071

run: scripts/go/bin/bra
@scripts/go/bin/bra run

Expand All @@ -125,7 +131,7 @@ devenv: devenv-down

@cd devenv; \
./create_docker_compose.sh $(targets) || \
(rm -rf docker-compose.yaml; exit 1)
(rm -rf {docker-compose.yaml,conf.tmp,.env}; exit 1)

@cd devenv; \
docker-compose up -d --build
Expand Down
32 changes: 30 additions & 2 deletions conf/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,45 @@ send_client_credentials_via_post = false

#################################### SAML Auth ###########################
[auth.saml] # Enterprise only
# Defaults to false. If true, the feature is enabled
enabled = false
private_key =
private_key_path =

# Base64-encoded public X.509 certificate. Used to sign requests to the IdP
certificate =

# Path to the public X.509 certificate. Used to sign requests to the IdP
certificate_path =

# Base64-encoded private key. Used to decrypt assertions from the IdP
private_key =

# Path to the private key. Used to decrypt assertions from the IdP
private_key_path =

# Base64-encoded IdP SAML metadata XML. Used to verify and obtain binding locations from the IdP
idp_metadata =

# Path to the SAML metadata XML. Used to verify and obtain binding locations from the IdP
idp_metadata_path =

# URL to fetch SAML IdP metadata. Used to verify and obtain binding locations from the IdP
idp_metadata_url =

# Duration, since the IdP issued a response and the SP is allowed to process it. Defaults to 90 seconds
max_issue_delay = 90s

# Duration, for how long the SP's metadata should be valid. Defaults to 48 hours
metadata_valid_duration = 48h

# Friendly name or name of the attribute within the SAML assertion to use as the user's name
assertion_attribute_name = displayName

# Friendly name or name of the attribute within the SAML assertion to use as the user's login handle
assertion_attribute_login = mail

# Friendly name or name of the attribute within the SAML assertion to use as the user's email
assertion_attribute_email = mail

#################################### Basic Auth ##########################
[auth.basic]
enabled = true
Expand Down
34 changes: 31 additions & 3 deletions conf/sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,46 @@
;send_client_credentials_via_post = false

#################################### SAML Auth ###########################
;[auth.saml] # Enterprise only
[auth.saml] # Enterprise only
# Defaults to false. If true, the feature is enabled.
;enabled = false
;private_key =
;private_key_path =

# Base64-encoded public X.509 certificate. Used to sign requests to the IdP
;certificate =

# Path to the public X.509 certificate. Used to sign requests to the IdP
;certificate_path =

# Base64-encoded private key. Used to decrypt assertions from the IdP
;private_key =

;# Path to the private key. Used to decrypt assertions from the IdP
;private_key_path =

# Base64-encoded IdP SAML metadata XML. Used to verify and obtain binding locations from the IdP
;idp_metadata =

# Path to the SAML metadata XML. Used to verify and obtain binding locations from the IdP
;idp_metadata_path =

# URL to fetch SAML IdP metadata. Used to verify and obtain binding locations from the IdP
;idp_metadata_url =

# Duration, since the IdP issued a response and the SP is allowed to process it. Defaults to 90 seconds.
;max_issue_delay = 90s

# Duration, for how long the SP's metadata should be valid. Defaults to 48 hours.
;metadata_valid_duration = 48h

# Friendly name or name of the attribute within the SAML assertion to use as the user's name
;assertion_attribute_name = displayName

# Friendly name or name of the attribute within the SAML assertion to use as the user's login handle
;assertion_attribute_login = mail

# Friendly name or name of the attribute within the SAML assertion to use as the user's email
;assertion_attribute_email = mail

#################################### Grafana.com Auth ####################
[auth.grafana_com]
;enabled = false
Expand Down
8 changes: 6 additions & 2 deletions devenv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ found. The dashboards are located in the `devenv/dev-dashboards` folder.
# docker-compose with databases

```bash
./create_docker_compose.sh influxdb prometheus2 elastic5
docker-compose up
make devenv sources=influxdb,prometheus2,elastic5
```

This command will create a docker compose file with specified databases configured and ready to run. Each database has
a prepared image with some fake data ready to use. For available databases see `docker/blocks` directory. Mind that
for some databases there are multiple images, for example there is prometheus_mac specifically for Macs or different
version.

Some of the blocks support dynamic change of the image version used in docker file. The signature looks like this - `make devenv sources=postgres,openldap name-of-block_version=9.2` -

```bash
make devenv sources=postgres,openldap postgres_version=9.2
```
Loading

0 comments on commit 4b81366

Please sign in to comment.