Commit edce5a5a authored by Alex Thomae's avatar Alex Thomae

Merge branch 'kaniko-build' into 'master'

Kaniko build

See merge request !2
parents 40fbaffd 06a6b0a4
Pipeline #73374560 passed with stages
in 4 minutes and 10 seconds
variables:
DOCKER_DRIVER: overlay2
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
PORT: 9308
stages:
- lint
- build
services:
- docker:dind
.tags-template: &tags-definition
tags:
- ix-ai
.build-template: &build-definition
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
stage: build
script:
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR} --dockerfile ${CI_PROJECT_DIR}/Dockerfile --build-arg PORT=${PORT} --destination ${IMAGE_TAG}
pylint:
<<: *tags-definition
image: python:latest
stage: lint
script:
- curl -o .pylintrc https://tool.ix.ai/.pylintrc
- pip install prometheus_client pylint stellar-base mnemonic toml pygelf
- pip install pylint pygelf prometheus_client stellar-base mnemonic toml
- pylint --rcfile=.pylintrc src/*.py
<<: *tags-definition
build:
build:test:
except:
- master
- latest
before_script:
- export IMAGE_TAG="${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}"
<<: *tags-definition
image: docker:latest
stage: build
<<: *build-definition
build:release:
only:
- /^latest$/
- tags
- /(.*)-dev$/
script:
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker build -f Dockerfile -t ${IMAGE_TAG} --build-arg PORT="${PORT}" .
- docker push ${IMAGE_TAG}
- master
except:
- latest
before_script:
- export IMAGE_TAG="${CI_REGISTRY_IMAGE}:latest"
<<: *tags-definition
<<: *build-definition
......@@ -27,7 +27,8 @@ def configure_logging():
host=os.environ.get('GELF_HOST'),
port=int(os.environ.get('GELF_PORT', 12201)),
debug=True,
include_extra_fields=True
include_extra_fields=True,
_ix_id=os.path.splitext(sys.modules['__main__'].__file__)[0],
)
LOG.addHandler(GELF)
gelf_enabled = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment