-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
41 lines (39 loc) · 1.53 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
image: node:12.18.1
pipelines:
default:
- step:
name: 'Build and Test'
caches:
- node
script:
- npm install
#- npm run test -- --no-watch --no-progress
artifacts:
- node_modules/**
- step:
name: 'Lint'
script:
- npm run lint
# The following deployment steps will be executed for each pipeline run. To configure your steps and conditionally deploy
# see https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/
- step:
name: 'Deployment to Staging'
deployment: staging
trigger: 'manual'
script:
- './node_modules/@ionic/cli/bin/ionic build --configuration=staging'
- 'tar -cf www-dist_staging_$BITBUCKET_BUILD_NUMBER.tar www/'
- 'scp -P 2221 -r www-dist_staging_$BITBUCKET_BUILD_NUMBER.tar [email protected]:'
- 'ssh $COACHSTAGING tar -xf www-dist_staging_$BITBUCKET_BUILD_NUMBER.tar'
- 'ssh $COACHSTAGING rm www-dist_staging_$BITBUCKET_BUILD_NUMBER.tar'
- 'ssh $COACHSTAGING ls -la /var/www/app'
- 'ssh $COACHSTAGING rm -rf /var/www/app'
- 'ssh $COACHSTAGING mv ~/www /var/www/app'
- 'ssh $COACHSTAGING ls -la /var/www/app'
- step:
name: 'Deployment to Production'
deployment: production
trigger: 'manual'
script:
- echo 'not yet configured'
- ./node_modules/@ionic/cli/bin/ionic build --configuration=production