forked from mjeyarax/platform-info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
37 lines (32 loc) · 941 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
image: golang:1.11
before_script:
- echo "Acquire::http::Proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf
- echo "Acquire::https::Proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf
- git config --global http.proxy "${HTTP_PROXY}"
- git config --global http."https://${GITLAB_SERVER}".proxy ""
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@${GITLAB_SERVER}".insteadOf "https://${GITLAB_SERVER}"
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- cd $CI_PROJECT_DIR
variables:
HTTPS_PROXY: "${HTTP_PROXY}"
no_proxy: "${NO_PROXY}"
stages:
- build
- test
test:
stage: test
tags:
- go
- privileged
script:
- echo "Acquire::http::Proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf
- echo "Acquire::https::Proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf
- apt-get update && apt-get install dmidecode
- go test -cover
compile:
stage: build
tags:
- go
script:
- go build ./...