forked from airgap-it/cordova-plugin-airgap-secure-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
executable file
·46 lines (41 loc) · 1.02 KB
/
.gitlab-ci.yml
File metadata and controls
executable file
·46 lines (41 loc) · 1.02 KB
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
image: docker:latest
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE
IMAGE_TAG_CURRENT: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
stages:
- build
# - test
- publish
build:
stage: build
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- docker build -t $IMAGE_TAG .
- docker tag $IMAGE_TAG $IMAGE_TAG_CURRENT
- docker push $IMAGE_TAG_CURRENT
tags:
- docker
#unit:
# stage: test
# before_script:
# - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# script:
# - docker run --name unit-$CI_COMMIT_SHA $IMAGE_TAG_CURRENT npm run test
# after_script:
# - docker rm unit-$CI_COMMIT_SHA
# tags:
# - docker
publish:
stage: publish
only:
- master
when: manual
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- docker run --env NPM_AUTH_TOKEN --env VERSION --name unit-$CI_COMMIT_SHA $IMAGE_TAG_CURRENT ./npm-ci-publish.sh
after_script:
- docker rm unit-$CI_COMMIT_SHA
tags:
- docker