forked from danobot/entity-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
57 lines (53 loc) · 1.7 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# build:
# stage: build
# script:
# - docker build -t test_container .
# - docker run -v .:/app test_container
# before_script:
# - docker info
variables:
CI_NAME: "gitlab"
CI_EMAIL: "[email protected]"
stages:
- test
- release
test-component-hass-image:
stage: test
except:
variables:
- $GITLAB_USER_LOGIN == $CI_NAME
script:
- docker build -t component_test -f Dockerfile.component .
- docker run --rm component_test pytest #/usr/src/app/tests/components/test_lightingsm.py
# -v $(pwd)/custom_components/lightingsm.py:/usr/src/app/homeassistant/components/lightingsm.py:ro
# -v $(pwd)/tests/test_lightingsm.py:/usr/src/app/tests/components/test_lightingsm.py:ro
# test-component:
# script:
# - docker build -t ci_test -f Dockerfile.ci-test .
# - docker run --rm ci_test # -v $(pwd):/app:ro
release:
stage: release
when: on_success
except:
variables:
- $GITLAB_USER_LOGIN == $CI_NAME
tags:
- npm
only:
- master
image: tarampampam/node:alpine
script:
- npm install
- git config --global user.email $CI_EMAIL
- git config --global user.name $CI_NAME
- git config receive.advertisePushOptions true
- git checkout -B "$CI_COMMIT_REF_NAME" "$CI_COMMIT_SHA"
- npm run release
- git push http://${CI_USER}:${CI_ACCESS_TOKEN}@gitlab.danielha.tk:80/HA/appdaemon-motion-lights.git --follow-tags master:master
- git checkout develop
- git merge master
- git push http://${CI_USER}:${CI_ACCESS_TOKEN}@gitlab.danielha.tk:80/HA/appdaemon-motion-lights.git --follow-tags develop:develop
# test:
# script:
# - docker build -t ci_test -f Dockerfile.ci-test .
# - docker run --rm ci_test