-
Notifications
You must be signed in to change notification settings - Fork 47
/
Jenkinsfile-deploy-c110p
60 lines (53 loc) · 1.18 KB
/
Jenkinsfile-deploy-c110p
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
@Library("tada-jenkins-library") _
properties([
parameters([
[
$class: "GitParameterDefinition",
name: "PARAM_BRANCH",
type: "PT_BRANCH",
defaultValue: "origin/develop",
sortMode: "ASCENDING_SMART",
selectedValue: "DEFAULT",
quickFilterEnabled: true,
description: "Which branch do you want to deploy?"
],
])
])
pipeline {
agent {
docker {
image "ruby:2.7.2-buster"
}
}
options {
disableConcurrentBuilds()
}
environment {
C110P_URL = credentials("reopt-api-c110p-url")
XPRESSDIR = "/opt/xpressmp"
PARAM_STAGE = "internal_c110p"
}
stages {
stage("checkout-deploy-branch") {
steps {
tadaCheckoutDeployBranch("https://github.com/NREL/REopt_API.git")
}
}
stage("deploy") {
steps {
script {
currentBuild.description = "Stage: $PARAM_STAGE Branch: $PARAM_BRANCH"
sh "bundle install"
sshagent(credentials: ["jenkins-ssh"]) {
sh "bundle exec cap ${PARAM_STAGE} deploy --trace BRANCH=${PARAM_BRANCH} DEBUG_DEPLOY=true"
}
}
}
}
}
post {
always {
tadaSendNotifications()
}
}
}