-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
44 lines (43 loc) · 1.46 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
pipelines:
custom:
build:
- parallel:
- step:
name: Build and Test .NET
image: mcr.microsoft.com/dotnet/sdk:5.0
caches:
- dotnetcore
script:
- export PROJECT_MD=dddnetcore
- dotnet restore ./dddnetcore
- dotnet build $PROJECT_MD
- step:
name: Build and Test SPA
image: node:18.0.0
caches:
- node
script:
- npm --prefix ./spa install
- npm --prefix ./spa install @angular/cli -g
- npm --prefix ./spa run build
artifacts:
- node_modules/ # Save modules for next steps
deploy:
- step:
name: Deploy
image: mcr.microsoft.com/dotnet/sdk:6.0
deployment: production
caches:
- dotnetcore
script:
- cd dddnetcore
- dotnet publish -o ./publish
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: lapr
SERVER: vsgate-ssh.dei.isep.ipp.pt
REMOTE_PATH: '/var/www/dddnetcore'
LOCAL_PATH: './publish/*'
EXTRA_ARGS: '-P 10812'
- apt-get update && apt-get -qq install ssh openssh-client
- ssh -i ~/.ssh/config lapr@vsgate-ssh.dei.isep.ipp.pt -p 10812 sh /home/lapr/restart_service.sh