-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile-prod
51 lines (37 loc) · 1.37 KB
/
Jenkinsfile-prod
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
def agentLabel
def CREDENTIAL_ID
agentLabel = "windows-agent-prod"
CREDENTIAL_ID = "windows-agent-prod-creds"
pipeline {
agent { label agentLabel }
environment {
BRANCH_NAME = 'master'
}
stages {
stage ('Download Infra as a Code') {
steps {
echo "Building in ${env.BRANCH_NAME}"
dir('iac') {
checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/xenonstack/blue-prism-iac.git']]])
}
}
}
stage('Download Production Release Artifact'){
steps{
script {
checkout([$class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: '[email protected]:xenonstack/blue-prism-release.git']]])
}
}
}
stage('Import Release to Production BluePrism') {
steps {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: CREDENTIAL_ID,
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
powershell '''
C:/Jenkins/workspace/Emaar-Poc/iac/import.ps1 $env:BPRelease_Name $env:USERNAME $env:PASSWORD $env:Tag
'''
}
}
}
}
}