This repository was archived by the owner on Feb 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +30
-14
lines changed Expand file tree Collapse file tree 2 files changed +30
-14
lines changed Original file line number Diff line number Diff line change 1
1
variables :
2
2
DOCKER_DRIVER : overlay2
3
- IMAGE_TAG : $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
4
3
PORT : 9308
5
4
6
5
stages :
7
6
- lint
8
7
- build
9
8
10
- services :
11
- - docker:dind
9
+ .tags-template : &tags-definition
10
+ tags :
11
+ - ix-ai
12
+
13
+ .build-template : &build-definition
14
+ image :
15
+ name : gcr.io/kaniko-project/executor:debug
16
+ entrypoint : [""]
17
+ stage : build
18
+ script :
19
+ - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
20
+ - /kaniko/executor --context ${CI_PROJECT_DIR} --dockerfile ${CI_PROJECT_DIR}/Dockerfile --build-arg PORT=${PORT} --destination ${IMAGE_TAG}
12
21
13
22
pylint :
14
23
image : python:latest
15
24
stage : lint
16
25
script :
17
26
- curl -o .pylintrc https://tool.ix.ai/.pylintrc
18
- - pip install prometheus_client pylint requests pygelf
27
+ - pip install prometheus_client pylint coinbase pygelf
19
28
- pylint --rcfile=.pylintrc src/*.py
29
+ << : *tags-definition
20
30
21
- build :
22
- image : docker:latest
23
- stage : build
31
+ build:test :
32
+ except :
33
+ - master
34
+ before_script :
35
+ - export IMAGE_TAG="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
36
+ << : *tags-definition
37
+ << : *build-definition
38
+
39
+ build:release :
24
40
only :
25
- - /^latest$/
26
- - tags
27
- - /(.*)-dev$/
28
- script :
29
- - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
30
- - docker build -f Dockerfile -t ${IMAGE_TAG} --build-arg PORT="${PORT}" .
31
- - docker push ${IMAGE_TAG}
41
+ - master
42
+ - latest
43
+ before_script :
44
+ - export IMAGE_TAG="${CI_REGISTRY_IMAGE}:latest"
45
+ << : *tags-definition
46
+ << : *build-definition
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ def configure_logging():
30
30
port = int (os .environ .get ('GELF_PORT' , 12201 )),
31
31
debug = True ,
32
32
include_extra_fields = True ,
33
+ _ix_id = os .path .splitext (sys .modules ['__main__' ].__file__ )[0 ],
33
34
)
34
35
LOG .addHandler (GELF )
35
36
gelf_enabled = True
You can’t perform that action at this time.
0 commit comments