# Pipelines run for branches and tags
workflow:
  rules:
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH

# Default runner tags
default:
  tags:
    - kubernetes

# Stages
stages:
  - build

# Variables
variables:
  REGISTRY_IMAGE: gcr.io/uit-authnz/openldap

### Jobs
build:
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:debug
  script:
    - /kaniko/executor
        --cache=false
        --context $CI_PROJECT_DIR
        --dockerfile $CI_PROJECT_DIR/Dockerfile
        --destination $REGISTRY_IMAGE:2.4.50-buster
        --destination $REGISTRY_IMAGE:$CI_COMMIT_SHA
## End of Job
