-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
54 lines (48 loc) · 1.09 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
image: alpine:latest
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
stages:
- build
- test
- staging
- production
before_script:
- apk add -U curl tar gzip bash git python py-pip nodejs nodejs-npm
- curl -sf https://up.apex.sh/install | sh
- pip install awscli --upgrade --user
- export PATH=~/.local/bin:$PATH # Required for awscli.
- aws --version # Print out aws cli version for debugging.
- npm install
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
test:
stage: test
image: gliderlabs/herokuish:latest
before_script:
- echo "Run test!"
script:
- cp -R . /tmp/app
- /bin/herokuish buildpack test
only:
- branches
staging:
stage: staging
script:
- up deploy staging
environment:
name: staging
url: https://staging.mydomain.co
only:
refs:
- develop
production:
stage: production
script:
- up deploy production
environment:
name: production
url: https://www.mydomain.co
only:
refs:
- master