-
Notifications
You must be signed in to change notification settings - Fork 3
/
bitbucket-pipelines.yml
77 lines (77 loc) · 2.07 KB
/
bitbucket-pipelines.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
72
73
74
75
76
77
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:14.7.0
pipelines:
default:
- step:
name: Install Dependencies
caches:
- node
script:
- yarn install
- step:
name: Clean Code
caches:
- node
script:
- yarn build:all
branches:
development:
- step:
name: Install Dependencies
caches:
- node
script:
- yarn install
- step:
name: Clean Code
caches:
- node
script:
- yarn clean
- step:
name: Clean Build
caches:
- node
script:
- yarn build:all
production:
- step:
name: Install Dependencies
caches:
- node
script:
- yarn install
- step:
name: Clean Code
caches:
- node
script:
- yarn clean
- step:
name: Build
deployment: production
caches:
- node
script:
- chmod 777 ./base.sh
- sed -i "s/PROJECT/${PROJECT}/g" ./base.sh
- chmod 777 ./base.sh
- sed -i "s/PROJECT/${PROJECT}/g" ./package.json
- yarn super:build
- pipe: atlassian/sftp-deploy:0.5.5
variables:
USER: $USER
SERVER: "$SERVER"
REMOTE_PATH: /home/$PROJECT/
LOCAL_PATH: "dist/*"
DEBUG: "true"
EXTRA_ARGS: "-i cert/$USER.pem"
after-script:
- ls -alhr
- cd cert/
- chmod 400 $USER.pem
- ssh -i $USER.pem $USER@$SERVER /home/$PROJECT/base.sh