-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
40 lines (38 loc) · 1.56 KB
/
.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
38
39
40
image: debian:stretch
variables:
## Enable under shared runner
## In gitlab/variables : declare Variable File Variable named http_proxy_shared, and no_proxy_shared
http_proxy: $http_proxy_shared
https_proxy: $http_proxy_shared
no_proxy: $no_proxy_shared
HTTP_PROXY: $http_proxy_shared
HTTPS_PROXY: $http_proxy_shared
NO_PROXY: $no_proxy_shared
## In gitlab/variables :
## NPM_REGISTRY, SASS_REGISTRY, PYPI_URL, PYPI_HOST, RUBY_URL, MIRROR_DEBIAN
## MIRROR_DOCKER, MIRROR_DOCKER_KEY
default:
tags:
- shared
- region1
before_script:
- echo "# Before script"
- time ./.gitlab/before_build.sh
build:
only:
- master
script:
- |
echo "export export API_SSL=" >> artifacts
echo "export RCLONE_OPTS=--no-check-certificate" >> artifacts
echo "export USER=root" >> artifacts
mkdir -p /etc/systemd/system/docker.service.d
touch /etc/systemd/system/docker.service.d/http-proxy.conf
- |
echo "# start build"
echo "${DOCKER_PASSWORD_DOCKERIO}" | docker login --username ${DOCKER_USERNAME_DOCKERIO} --password-stdin
make config build DOCKER_USERNAME=${DOCKER_USERNAME} DOCKER_REGISTRY=${DOCKER_REGISTRY} NPM_REGISTRY=${NPM_REGISTRY} NPM_SSL=false SASS_REGISTRY=${SASS_REGISTRY} MIRROR_DEBIAN=${MIRROR_DEBIAN} THEME_DNUM=${THEME_DNUM} API_URL=${API_URL} API_EMAIL=${API_EMAIL} GIT_BRANCH=${CI_COMMIT_BRANCH}
docker logout
- make docker-push DOCKER_REGISTRY=${DOCKER_REGISTRY} DOCKER_PASSWORD=${DOCKER_PASSWORD} DOCKER_USERNAME=${DOCKER_USERNAME} GIT_BRANCH=${CI_COMMIT_BRANCH}
except:
- tags