-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitlab-ci-multiple-branches.yml
62 lines (55 loc) · 1.23 KB
/
gitlab-ci-multiple-branches.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
image: docker.moviesanywhere.io/alexa/docker-alexa-skill-kit:2.22.2
cache:
paths:
- $CI_PROJECT_DIR/app/lambda/node_modules/
before_script:
- mkdir -p /home/node/.ask
- mkdir -p /home/node/.aws
- cp -f $ASK_CONFIG /home/node/.ask/cli_config
- cp -f $AWS_CREDS /home/node/.aws/credentials
- cp -f $AWS_CONFIG /home/node/.aws/config
- ask --version
- node --version
- cd app
- aws s3 cp s3://ask-state-json/$CI_PROJECT_NAME/ask-states.json app/.ask/ask-states.json --profile ask_cli_default
after_script:
- aws s3 cp app/.ask/ask-states.json s3://ask-state-json/$CI_PROJECT_NAME/ask-states.json --profile ask_cli_default
stages:
- dev
- stage
- prod
DEV:
stage: dev
script:
- ask deploy -p ${CI_COMMIT_REF_NAME}
environment:
name: ${CI_COMMIT_REF_NAME}
artifacts:
paths:
- .ask/ask-states.json
only:
- /^dev.*$/
STAGE:
stage: stage
script:
- ask deploy -p ${CI_COMMIT_REF_NAME}
environment:
name: ${CI_COMMIT_REF_NAME}
artifacts:
paths:
- .ask/ask-states.json
only:
- /^stage.*$/
when: manual
PROD:
stage: prod
script:
- ask deploy
environment:
name: production
artifacts:
paths:
- .ask/ask-states.json
only:
- master
when: manual