-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
42 lines (39 loc) · 913 Bytes
/
.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
image: docker:latest
stages:
- build-docker
- publish-git
# Build docker
build_docker:arm32v6:
image: docker:latest
stage: build-docker
tags:
- armv6
- shell
only:
- master
variables:
IMAGE_TAG: samibourouis/rpi-chronograf
before_script:
- docker info
- docker login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD}
script:
- docker build -t ${IMAGE_TAG} .
- docker tag $IMAGE_TAG $IMAGE_TAG
- docker push ${IMAGE_TAG}
# Publish to Github
github_mirror:
stage: publish-git
image:
name: alpine/git
entrypoint: [ "/bin/sh", "-c" ]
only:
- master
variables:
GIT_STRATEGY: clone
GIT_CHECKOUT: "false"
script: |
cd /tmp
git clone --mirror ${CI_REPOSITORY_URL} project
cd project
git remote add github https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/samibourouis/rpi-chronograf.git
git push --mirror github