.gitlab-ci.yml 796 Bytes
Newer Older
echel0n's avatar
echel0n committed
1 2 3 4 5 6 7 8
image: docker:latest

services:
  - name: docker:dind

before_script:
  - apk add --no-cache py-pip
  - pip install docker-compose
echel0n's avatar
echel0n committed
9
  - echo -n $CI_REGISTRY_PASSWORD | docker login -u "$CI_REGISTRY_USER" --password-stdin
echel0n's avatar
echel0n committed
10 11 12 13

build-master:
  stage: build
  script:
echel0n's avatar
echel0n committed
14
    - docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VERSION=`cat sickrage/version.txt` -t sickrage/sickrage:latest .
echel0n's avatar
echel0n committed
15
    - docker push "sickrage/sickrage:latest"
echel0n's avatar
echel0n committed
16 17
  only:
    - master
echel0n's avatar
echel0n committed
18 19
  except:
    - tags
echel0n's avatar
echel0n committed
20

21 22 23 24 25 26 27 28
#build-dev:
#  stage: build
#  script:
#    - docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VERSION=`cat sickrage/version.txt` -t sickrage/sickrage:$CI_COMMIT_REF_SLUG .
#    - docker push sickrage/sickrage:$CI_COMMIT_REF_SLUG
#  except:
#    - master
#    - tags