forked from AndreySenov/firebase-tools-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (56 loc) · 2.05 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
image: docker:stable
services:
- docker:stable-dind
variables:
VERSION: "9.10.1"
REPOSITORY: "firebase-tools"
firebase-tools:
script:
- docker build . --no-cache --pull
-t $DOCKER_USER/$REPOSITORY:$VERSION
-t $DOCKER_USER/$REPOSITORY:$VERSION-alpine
-t $DOCKER_USER/$REPOSITORY:latest
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
--build-arg CI_JOB_ID=$CI_JOB_ID
--build-arg CI_PIPELINE_ID=$CI_PIPELINE_ID
--build-arg VCS_REF=$CI_COMMIT_SHA
--build-arg VERSION=$VERSION
after_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker push $DOCKER_USER/$REPOSITORY:$VERSION-alpine
- docker push $DOCKER_USER/$REPOSITORY:$VERSION
- docker push $DOCKER_USER/$REPOSITORY:latest
only:
- master
firebase-tools_node10:
script:
- docker build . -f Dockerfile.node10 --no-cache --pull
-t $DOCKER_USER/$REPOSITORY:$VERSION-node10
-t $DOCKER_USER/$REPOSITORY:$VERSION-node10-alpine
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
--build-arg CI_JOB_ID=$CI_JOB_ID
--build-arg CI_PIPELINE_ID=$CI_PIPELINE_ID
--build-arg VCS_REF=$CI_COMMIT_SHA
--build-arg VERSION=$VERSION
after_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker push $DOCKER_USER/$REPOSITORY:$VERSION-node10-alpine
- docker push $DOCKER_USER/$REPOSITORY:$VERSION-node10
only:
- master
firebase-tools_node12:
script:
- docker build . -f Dockerfile.node12 --no-cache --pull
-t $DOCKER_USER/$REPOSITORY:$VERSION-node12
-t $DOCKER_USER/$REPOSITORY:$VERSION-node12-alpine
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
--build-arg CI_JOB_ID=$CI_JOB_ID
--build-arg CI_PIPELINE_ID=$CI_PIPELINE_ID
--build-arg VCS_REF=$CI_COMMIT_SHA
--build-arg VERSION=$VERSION
after_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker push $DOCKER_USER/$REPOSITORY:$VERSION-node12-alpine
- docker push $DOCKER_USER/$REPOSITORY:$VERSION-node12
only:
- master