.gitlab-ci.yml 914 Bytes
Newer Older
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
1 2
# Copyright (C) 2017-2019 Jens Lechtenbörger
# SPDX-License-Identifier: CC0-1.0
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
3 4
# Inspired by: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
# See also: https://docs.gitlab.com/ee/ci/variables/
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
5 6
image: docker:stable

Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
7 8 9 10 11 12
services:
  - docker:dind

before_script:
  - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY

13 14 15 16 17 18 19 20 21 22 23
debian-emacs-tex:
  stage: build
  variables:
    IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_JOB_NAME
  script:
    - docker build -t $IMAGE_TAG -f $CI_JOB_NAME/Dockerfile .
    - docker push $IMAGE_TAG
  only:
    changes:
      - debian-emacs-tex/*

Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
24
emacs-reveal:
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
25
  stage: build
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
26
  variables:
27
    IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_JOB_NAME:$CI_COMMIT_TAG
28
    IMAGE_LATEST: $CI_REGISTRY_IMAGE/$CI_JOB_NAME:latest
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
29
  script:
30 31
    - docker build -t $IMAGE_LATEST -t $IMAGE_TAG -f $CI_JOB_NAME/Dockerfile .
    - docker push $IMAGE_LATEST
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
32
    - docker push $IMAGE_TAG
Jens Lechtenbörger's avatar
Jens Lechtenbörger committed
33
  only:
34
    - tags