-
Notifications
You must be signed in to change notification settings - Fork 138
/
openstack-ardana-update.Jenkinsfile
64 lines (57 loc) · 1.56 KB
/
openstack-ardana-update.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
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
61
62
63
64
/**
* The openstack-ardana-update Jenkins Pipeline
*
* This job updates a pre-deployed CLM cloud.
*/
def ardana_lib = null
pipeline {
options {
// skip the default checkout, because we want to use a custom path
skipDefaultCheckout()
timestamps()
}
agent {
node {
label "cloud-ci"
customWorkspace "${JOB_NAME}-${BUILD_NUMBER}"
}
}
stages {
stage('Setup workspace') {
steps {
script {
// Set this variable to be used by upstream builds
env.blue_ocean_buildurl = env.RUN_DISPLAY_URL
if (cloud_env == '') {
error("Empty 'cloud_env' parameter value.")
}
currentBuild.displayName = "#${BUILD_NUMBER}: ${cloud_env}"
sh('''
git clone $git_automation_repo --branch $git_automation_branch automation-git
''')
cloud_lib = load "$WORKSPACE/automation-git/jenkins/ci.suse.de/pipelines/openstack-cloud.groovy"
cloud_lib.load_os_params_from_resource(cloud_env)
cloud_lib.load_extra_params_as_vars(extra_params)
cloud_lib.ansible_playbook('load-job-params')
cloud_lib.ansible_playbook('setup-ssh-access')
cloud_lib.get_deployer_ip()
}
}
}
stage('Update ardana') {
steps {
script {
cloud_lib.ansible_playbook('ardana-update', "-e cloudsource=$update_to_cloudsource")
}
}
}
}
post {
always {
archiveArtifacts artifacts: ".artifacts/**/*", allowEmptyArchive: true
}
cleanup {
cleanWs()
}
}
}