Skip to content
Snippets Groups Projects
.gitlab-ci.yml 919 B
stages:
  - build
  - test

application-image:
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  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 --destination $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME}
  only:
    changes:
      - ./**/*
      - .gitlab-ci.yml

behave-login:
  stage: test
  variables:
    DATABASE_USER: postgres
    DATABASE_PASSWORD: secret
    DATABASE_NAME: postgres
    DATABASE_HOST: postgres
    POSTGRES_PASSWORD: secret
  services:
    - name: postgres:11
      alias: postgres
  image: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}
  script:
    - python3 -m unittest discover
  only:
    changes:
      - login_provider/**/*
      - .gitlab-ci.yml