-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathJenkinsfile
56 lines (54 loc) · 1.71 KB
/
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
pipeline {
agent any
stages {
stage('Generate Docs') {
steps {
sh 'chmod -R 755 .'
/**
sh 'sudo pip3.8 install jinja2 requests'
sh '/usr/local/bin/python3.8 ./create_docs.py'
**/
}
}
stage('Commit Docs') {
steps {
echo 'Commit Docs'
sh 'git branch'
/**
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'github-user', usernameVariable: 'GIT_AUTHOR_NAME', passwordVariable: 'GIT_PASSWORD']]) {
sh "git commit -a -m 'Documentation Update for Commit $GIT_COMMIT'"
sh('git push origin $BRANCH_NAME https://${GIT_AUTHOR_NAME}:${GIT_PASSWORD}@github.com/trinity-team/rubrik-sdk-for-python.git --tags -f --no-verify')
}
**/
}
}
stage('Function Tests') {
steps {
echo 'Run Tests'
withCredentials([
usernamePassword(credentialsId: 'polaris_beta', usernameVariable: 'POLARIS_BETA_USR', passwordVariable: 'POLARIS_BETA_PWD'),
usernamePassword(credentialsId: 'polaris_prod', usernameVariable: 'POLARIS_PROD_USR', passwordVariable: 'POLARIS_PROD_PWD')
]) {
sh 'printenv'
}
}
}
}
post {
always {
cleanWs()
}
success {
echo 'successful'
}
failure {
echo 'failed'
}
unstable {
echo 'unstable'
}
changed {
echo 'changed'
}
}
}