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

4
stages:
5
  - release
echel0n's avatar
echel0n committed
6
  - deploy
7

echel0n's avatar
echel0n committed
8 9 10 11 12 13 14
variables:
  DOCKER_DRIVER: overlay2
  DOCKER_HOST: tcp://localhost:2375

services:
  - docker:dind

echel0n's avatar
echel0n committed
15
sentry_release_master:
echel0n's avatar
echel0n committed
16 17 18 19 20 21 22 23 24 25 26 27
  stage: release
  image:
    name: getsentry/sentry-cli
    entrypoint: [""]
  script:
    - export SENTRY_URL=$SENTRY_URL
    - export SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
    - export SENTRY_ORG=$SENTRY_ORG
    - export SENTRY_PROJECT=$SENTRY_PROJECT
    - sentry-cli releases new --project $SENTRY_PROJECT $(cat sickrage/version.txt)
    - sentry-cli releases set-commits --auto $(cat sickrage/version.txt)
    - sentry-cli releases finalize $(cat sickrage/version.txt)
28
    - sentry-cli releases deploys $(cat sickrage/version.txt) new -e master
echel0n's avatar
echel0n committed
29
  only:
30
    - /^[0-9.]+$/
echel0n's avatar
echel0n committed
31
  except:
echel0n's avatar
echel0n committed
32 33
    - branches
    - triggers
echel0n's avatar
echel0n committed
34

echel0n's avatar
echel0n committed
35 36 37 38 39 40 41 42 43 44 45 46 47
sentry_release_develop:
  stage: release
  image:
    name: getsentry/sentry-cli
    entrypoint: [""]
  script:
    - export SENTRY_URL=$SENTRY_URL
    - export SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
    - export SENTRY_ORG=$SENTRY_ORG
    - export SENTRY_PROJECT=$SENTRY_PROJECT
    - sentry-cli releases new --project $SENTRY_PROJECT $(cat sickrage/version.txt)
    - sentry-cli releases set-commits --auto $(cat sickrage/version.txt)
    - sentry-cli releases finalize $(cat sickrage/version.txt)
48
    - sentry-cli releases deploys $(cat sickrage/version.txt) new -e develop
echel0n's avatar
echel0n committed
49 50 51 52 53 54 55 56 57
  only:
    - /^[0-9.]+dev[0-9]$/
  except:
    - branches
    - triggers

deploy_docker_master:
  stage: deploy
  variables:
58
    UPSTREAM_BRANCH: master
echel0n's avatar
echel0n committed
59 60 61 62 63
    UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
  trigger:
    project: sickrage/sickrage-docker
    branch: master
  only:
64
    - /^[0-9.]+$/
echel0n's avatar
echel0n committed
65 66 67 68 69
  except:
    - branches
    - triggers

deploy_docker_develop:
echel0n's avatar
echel0n committed
70
  stage: deploy
71
  variables:
72
    UPSTREAM_BRANCH: develop
echel0n's avatar
echel0n committed
73
    UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
74 75 76
  trigger:
    project: sickrage/sickrage-docker
    branch: master
echel0n's avatar
echel0n committed
77
  only:
echel0n's avatar
echel0n committed
78
    - /^[0-9.]+dev[0-9]$/
79
  except:
echel0n's avatar
echel0n committed
80 81
    - branches
    - triggers
82

83 84 85 86 87 88 89 90 91 92 93 94 95
deploy_synology:
  stage: deploy
  variables:
    UPSTREAM_BRANCH: master
    UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
  trigger:
    project: sickrage/sickrage-synology
    branch: master
  only:
    - /^[0-9.]+$/
  except:
    - branches
    - triggers