Skip to content

Commit b75273a

Browse files
committed
Merge branch 'job-properties' into 'main'
chore: Support exporting job log embedded properties See merge request akun73/gitlab-exporter!1
2 parents 40492e5 + 45f2a46 commit b75273a

23 files changed

+553
-170
lines changed

.gitlab/gitlab-ci.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,30 @@ lint:
4141
GOLANGCI_LINT_VERSION: v1.64.6
4242
GOLANGCI_LINT_CACHE: ${CACHE_DIR}/golangci-lint
4343
before_script:
44-
- | # Download golangci-lint binary
44+
- |
45+
# Download golangci-lint binary
4546
echo -e "\e[0Ksection_start:$(date +%s):script_step_before\r\e[0KRunning script_step_before"
4647
curl -sSfL https://github.com/golangci/golangci-lint/releases/download/${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION#v}-linux-amd64.tar.gz -o /tmp/golangci-lint.tar.gz
4748
mkdir -p ${GOPATH}/bin
4849
tar -C ${GOPATH}/bin/ -zxof /tmp/golangci-lint.tar.gz --strip-components=1 golangci-lint-${GOLANGCI_LINT_VERSION#v}-linux-amd64/golangci-lint
4950
echo -e "\e[0Ksection_end:$(date +%s):script_step_before\r\e[0K"
5051
script:
52+
- |
53+
# Print some job properties
54+
printf 'PROPERTY_%s="%s"\n' "golangci_lint_version" "${GOLANGCI_LINT_VERSION}"
5155
- ${GOPATH}/bin/golangci-lint run --verbose ./...
5256
allow_failure: true
5357

5458
build:
5559
stage: build
5660
cache:
5761
- <<: *cache-defaults
62+
before_script:
63+
- |
64+
# Print some job properties
65+
printf 'PROPERTY_%s="%s"\n' "ci_runner_id" "${CI_RUNNER_ID}"
66+
printf 'PROPERTY_%s="%s"\n' "ci_runner_version" "${CI_RUNNER_VERSION}"
67+
printf 'PROPERTY_%s="%s"\n' "ci_runner_revision" "${CI_RUNNER_REVISION}"
5868
script:
5969
- |
6070
start=$(date +%s%N)
@@ -73,11 +83,17 @@ test:
7383
GOCOVER_COBERTURA_VERSION: v1.3.0
7484
before_script:
7585
- echo -e "\e[0Ksection_start:$(date +%s):script_step_before\r\e[0KRunning script_step_before"
76-
- | # Download gotestsum binary
86+
- |
87+
# Print some job properties
88+
printf 'PROPERTY_%s="%s"\n' "gotestsum_version" "${GOTESTSUM_VERSION}"
89+
printf 'PROPERTY_%s="%s"\n' "gocover_cobertura_version" "${GOCOVER_COBERTURA_VERSION}"
90+
- |
91+
# Download gotestsum binary
7792
curl -sSfL https://github.com/gotestyourself/gotestsum/releases/download/${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION#v}_linux_amd64.tar.gz -o /tmp/gotestsum.tar.gz
7893
mkdir -p ${GOPATH}/bin
7994
tar -C ${GOPATH}/bin/ -zxof /tmp/gotestsum.tar.gz gotestsum
80-
- | # Install gocover-cobertura
95+
- |
96+
# Install gocover-cobertura
8197
go install github.com/boumenot/gocover-cobertura@${GOCOVER_COBERTURA_VERSION}
8298
- echo -e "\e[0Ksection_end:$(date +%s):script_step_before\r\e[0K"
8399
script:
@@ -114,7 +130,11 @@ release:
114130
variables:
115131
ARCHIVER_VERSION: v3.5.0
116132
before_script:
117-
- | # Download archiver binary (for windows .zip support)
133+
- |
134+
# Print some job properties
135+
printf 'PROPERTY_%s="%s"\n' "archiver_version" "${ARCHIVER_VERSION}"
136+
- |
137+
# Download archiver binary (for windows .zip support)
118138
curl -sSL --fail-with-body https://github.com/mholt/archiver/releases/download/${ARCHIVER_VERSION}/arc_${ARCHIVER_VERSION#v}_linux_amd64 -o /tmp/arc
119139
mkdir -p ${GOPATH}/bin
120140
install -t ${GOPATH}/bin /tmp/arc

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,41 @@ There are recorder implementations available for the following datastore backend
2121

2222
### Screenshots
2323

24+
These screenshots are taken from Grafana dashboards available
25+
[here](https://gitlab.com/gitlab-exporter/grafana/dashboards).
26+
27+
<details>
28+
<summary>Projects / Pipelines / Overview </summary>
29+
<img src="./assets/grafana/screenshots/projects-pipelines-overview-1.png" />
30+
<img src="./assets/grafana/screenshots/projects-pipelines-overview-2.png" />
31+
</details>
32+
33+
<details>
34+
<summary>Projects / Pipelines / Details</summary>
35+
<img src="./assets/grafana/screenshots/projects-pipelines-details-1.png" />
36+
<img src="./assets/grafana/screenshots/projects-pipelines-details-2.png" />
37+
</details>
38+
39+
<details>
40+
<summary>Projects / Jobs / Details</summary>
41+
<img src="./assets/grafana/screenshots/projects-jobs-details-1.png" />
42+
<img src="./assets/grafana/screenshots/projects-jobs-details-2.png" />
43+
</details>
44+
45+
<details>
46+
<summary>Projects / Test Reports / Overview</summary>
47+
<img src="./assets/grafana/screenshots/projects-test-reports-overview.png" />
48+
</details>
49+
2450
<details>
25-
<summary>Project Overviews</summary>
26-
<img src="./assets/project-overview.webp" />
51+
<summary>Projects / Merge Requests</summary>
52+
<img src="./assets/grafana/screenshots/projects-merge-requests-1.png" />
53+
<img src="./assets/grafana/screenshots/projects-merge-requests-2.png" />
2754
</details>
2855

2956
<details>
30-
<summary>Pipeline Traces</summary>
31-
<img src="./assets/pipeline-trace.webp" />
57+
<summary>Projects / DORA</summary>
58+
<img src="./assets/grafana/screenshots/projects-dora.png" />
3259
</details>
3360

3461
## Installation
148 KB
Loading
115 KB
Loading
84.2 KB
Loading
258 KB
Loading
112 KB
Loading
157 KB
Loading
110 KB
Loading
217 KB
Loading

0 commit comments

Comments
 (0)