forked from btcpayserver/btcpayserver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
29 lines (27 loc) · 906 Bytes
/
Jenkinsfile
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
pipeline {
agent none
stages {
stage("build") {
agent {
docker { image 'mcr.microsoft.com/dotnet/sdk:6.0' }
}
environment {
DOTNET_CLI_HOME = "/tmp/DOTNET_CLI_HOME"
HOME = "/tmp"
}
steps {
sh 'dotnet publish -c Altcoins-Release -r linux-x64 ./BTCPayServer/BTCPayServer.csproj --output ./public'
stash includes: '**/public/', name: 'app'
}
}
stage("deploy") {
when { expression { return env.BRANCH_NAME ==~ /release\/.*/ } }
agent { label 'production' }
steps {
unstash 'app'
sh 'sudo cp -R public/* /var/blockchains/btcpayserver'
sh 'sudo chown -R blockchain:blockchain /var/blockchains/btcpayserver'
}
}
}
}