Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-19 21:07:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-19 21:07:48 +0300
commitb5571e6e22cdacc81f78eff5943d68c8ba220fbb (patch)
tree3677b792f5afe0b4853cee59e166df961993b7e8 /doc
parentf92a53a216e6e7d5037ac701efbee5628f91aa9a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/development/go_guide/index.md22
-rw-r--r--doc/raketasks/generate_sample_prometheus_data.md10
2 files changed, 23 insertions, 9 deletions
diff --git a/doc/development/go_guide/index.md b/doc/development/go_guide/index.md
index 724bc240bc2..f6aae945f62 100644
--- a/doc/development/go_guide/index.md
+++ b/doc/development/go_guide/index.md
@@ -78,13 +78,27 @@ projects:
All Go projects should include these GitLab CI/CD jobs:
```yaml
-go lint:
- image: golang:1.11
+lint:
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine
+ stage: test
script:
- - go get -u golang.org/x/lint/golint
- - golint -set_exit_status $(go list ./... | grep -v "vendor/")
+ # Use default .golangci.yml file from the image if one is not present in the project root.
+ - '[ -e .golangci.yml ] || cp /golangci/.golangci.yml .'
+ # Write the code coverage report to gl-code-quality-report.json
+ # and print linting issues to stdout in the format: path/to/file:line description
+ - golangci-lint run --out-format code-climate | tee gl-code-quality-report.json | jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
+ artifacts:
+ reports:
+ codequality: gl-code-quality-report.json
+ paths:
+ - gl-code-quality-report.json
+ allow_failure: true
```
+Including a `.golangci.yml` in the root directory of the project allows for
+configuration of `golangci-lint`. All options for `golangci-lint` are listed in
+this [example](https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml).
+
Once [recursive includes](https://gitlab.com/gitlab-org/gitlab-foss/issues/56836)
become available, you will be able to share job templates like this
[analyzer](https://gitlab.com/gitlab-org/security-products/ci-templates/raw/master/includes-dev/analyzer.yml).
diff --git a/doc/raketasks/generate_sample_prometheus_data.md b/doc/raketasks/generate_sample_prometheus_data.md
index 2489a2c2ad3..bb0ed68ec0f 100644
--- a/doc/raketasks/generate_sample_prometheus_data.md
+++ b/doc/raketasks/generate_sample_prometheus_data.md
@@ -1,11 +1,11 @@
# Generate Sample Prometheus Data
This command will run Prometheus queries for each of the metrics of a specific environment
-for a default time interval of 7 days ago to now. The results of each of query are stored
-under a `sample_metrics` directory as a yaml file named by the metric's `identifier`.
-When the environmental variable `USE_SAMPLE_METRICS` is set, the Prometheus API query is
-re-routed to `Projects::Environments::SampleMetricsController` which loads the appropriate
-data set if it is present within the `sample_metrics` directory.
+for a series of time intervals: 30 minutes, 3 hours, 8 hours, 24 hours, 72 hours, and 7 days
+to now. The results of each of query are stored under a `sample_metrics` directory as a yaml
+file named by the metric's `identifier`. When the environmental variable `USE_SAMPLE_METRICS`
+is set, the Prometheus API query is re-routed to `Projects::Environments::SampleMetricsController`
+which loads the appropriate data set if it is present within the `sample_metrics` directory.
- This command requires an id from an Environment with an available Prometheus installation.