.gitlab-ci.yml 568 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
image:
  name: gcr.io/kaniko-project/executor:debug
  entrypoint: [""]

stages:
  - build
  - deploy

build:
  stage: build
  only:
    - master
  script:
    - mkdir -p /kaniko/.docker
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
    - echo CI_REGISTRY_IMAGE $CI_REGISTRY_IMAGE
    - /kaniko/executor --context $CI_PROJECT_DIR --cache --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_BUILD_REF --destination $CI_REGISTRY_IMAGE:latest