.gitlab-ci.yml 689 Bytes
Newer Older
echel0n's avatar
echel0n committed
1 2 3
before_script:
  - apk add --no-cache py-pip

echel0n's avatar
echel0n committed
4
variables:
echel0n's avatar
echel0n committed
5
  CONTAINER_IMAGE: sickrage/sickrage
echel0n's avatar
echel0n committed
6 7 8 9 10 11 12 13

  DOCKER_DRIVER: overlay2
  DOCKER_HOST: tcp://localhost:2375

services:
  - docker:dind

build:
echel0n's avatar
echel0n committed
14
  stage: build
echel0n's avatar
echel0n committed
15
  image: docker:latest
echel0n's avatar
echel0n committed
16
  script:
echel0n's avatar
echel0n committed
17
    - echo $CONTAINER_IMAGE
echel0n's avatar
echel0n committed
18
    - echo -n $CI_REGISTRY_PASSWORD | docker login -u "$CI_REGISTRY_USER" --password-stdin
echel0n's avatar
echel0n committed
19 20 21 22
    - docker build --network host -t $CONTAINER_IMAGE:$(cat sickrage/version.txt) .
    - docker tag $CONTAINER_IMAGE:$(cat sickrage/version.txt) $CONTAINER_IMAGE:latest
    - docker push $CONTAINER_IMAGE:$(cat sickrage/version.txt)
    - docker push $CONTAINER_IMAGE:latest
echel0n's avatar
echel0n committed
23 24
  only:
    - master
25
    - develop
echel0n's avatar
echel0n committed
26
  except:
echel0n's avatar
echel0n committed
27
    - tags