Skip to content
Snippets Groups Projects
.gitlab-ci.yml 799 B
Newer Older
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
stages:
- build_image
#- test

variables:
  DEPENDENCIES_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/image:latest"
  MYDOCKER_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/mydocker-image:latest"
  STORAGE_DRIVER: vfs # for buildah
  REGISTRY_AUTH_FILE: /root/auth.json

build_image:
  stage: build_image
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
  image: tomkukral/buildah:0.31
Nicolas M. Thiéry's avatar
Nicolas M. Thiéry committed
  before_script:
    - podman login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
  script:
    - buildah build-using-dockerfile --format docker -t ${DEPENDENCIES_IMAGE_NAME} --file Dockerfile-CI .
    - buildah push --authfile ${REGISTRY_AUTH_FILE} ${DEPENDENCIES_IMAGE_NAME}
  after_script:
    - podman logout "${CI_REGISTRY}"
#  only:
#    changes:

image: ${DEPENDENCIES_IMAGE_NAME}

# test:
#     stage: test
#     script:
#       - mypy