forked from vuestorefront/vue-storefront-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
33 lines (30 loc) · 1002 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
variables:
REGISTRY_URL: "registry.storefrontcloud.io"
REGISTRY_IMAGE: "registry.storefrontcloud.io/demo-storefrontcloud-io/vue-storefront-api"
stages:
- build
- deploy
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cat config/local.json
- echo "{\"auths\":{\"$REGISTRY_URL\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/dev/docker/Dockerfile --destination $REGISTRY_IMAGE:${CI_COMMIT_SHA:0:8}
only:
- develop
- master
deploy-to-prod:
stage: deploy
image: alpine
script:
- apk add --no-cache curl
- >
curl -H "Content-Type: application/json" -X POST -d "{\"code\":\"test\", \"apiContainerVersion\":\"${CI_COMMIT_SHA:0:8}\"}" http://10.29.1.1:4000/instances
environment:
name: staging
url: https://test.storefrontcloud.io/
only:
- master