@@ -41,20 +41,30 @@ lint:
41
41
GOLANGCI_LINT_VERSION : v1.64.6
42
42
GOLANGCI_LINT_CACHE : ${CACHE_DIR}/golangci-lint
43
43
before_script :
44
- - | # Download golangci-lint binary
44
+ - |
45
+ # Download golangci-lint binary
45
46
echo -e "\e[0Ksection_start:$(date +%s):script_step_before\r\e[0KRunning script_step_before"
46
47
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
47
48
mkdir -p ${GOPATH}/bin
48
49
tar -C ${GOPATH}/bin/ -zxof /tmp/golangci-lint.tar.gz --strip-components=1 golangci-lint-${GOLANGCI_LINT_VERSION#v}-linux-amd64/golangci-lint
49
50
echo -e "\e[0Ksection_end:$(date +%s):script_step_before\r\e[0K"
50
51
script :
52
+ - |
53
+ # Print some job properties
54
+ printf 'PROPERTY_%s="%s"\n' "golangci_lint_version" "${GOLANGCI_LINT_VERSION}"
51
55
- ${GOPATH}/bin/golangci-lint run --verbose ./...
52
56
allow_failure : true
53
57
54
58
build :
55
59
stage : build
56
60
cache :
57
61
- << : *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}"
58
68
script :
59
69
- |
60
70
start=$(date +%s%N)
@@ -73,11 +83,17 @@ test:
73
83
GOCOVER_COBERTURA_VERSION : v1.3.0
74
84
before_script :
75
85
- 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
77
92
curl -sSfL https://github.com/gotestyourself/gotestsum/releases/download/${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION#v}_linux_amd64.tar.gz -o /tmp/gotestsum.tar.gz
78
93
mkdir -p ${GOPATH}/bin
79
94
tar -C ${GOPATH}/bin/ -zxof /tmp/gotestsum.tar.gz gotestsum
80
- - | # Install gocover-cobertura
95
+ - |
96
+ # Install gocover-cobertura
81
97
go install github.com/boumenot/gocover-cobertura@${GOCOVER_COBERTURA_VERSION}
82
98
- echo -e "\e[0Ksection_end:$(date +%s):script_step_before\r\e[0K"
83
99
script :
@@ -114,7 +130,11 @@ release:
114
130
variables :
115
131
ARCHIVER_VERSION : v3.5.0
116
132
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)
118
138
curl -sSL --fail-with-body https://github.com/mholt/archiver/releases/download/${ARCHIVER_VERSION}/arc_${ARCHIVER_VERSION#v}_linux_amd64 -o /tmp/arc
119
139
mkdir -p ${GOPATH}/bin
120
140
install -t ${GOPATH}/bin /tmp/arc
0 commit comments