forked from timroemisch/mqtt-s7-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (39 loc) · 1.18 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
build:
stage: build
tags:
- docker
- amd64
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest
- docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD"
- docker tag $CI_REGISTRY_IMAGE:latest timroemisch/mqtt-s7-connector:latest
- docker push timroemisch/mqtt-s7-connector:latest
only:
- master
build-rpi:
stage: build
tags:
- docker
- rpi
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:rpi .
- docker push $CI_REGISTRY_IMAGE:rpi
- docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD"
- docker tag $CI_REGISTRY_IMAGE:rpi timroemisch/mqtt-s7-connector:rpi
- docker push timroemisch/mqtt-s7-connector:rpi
only:
- master
dev-build:
stage: build
tags:
- docker
- amd64
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:dev-$CI_COMMIT_REF_SLUG .
- docker push $CI_REGISTRY_IMAGE:dev-$CI_COMMIT_REF_SLUG
except:
- master