-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
46 lines (46 loc) · 1.53 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
// def secrets = [
// [path: 'cryptanalysis/oc-tokens', engineVersion: 2, secretValues: [
// [envVar: 'auto-cryptanalysis', vaultKey: 'auto-cryptanalysis']
// ]]
// ]
pipeline{
agent {
node {
label 'base-agent'
}
}
stages {
// stage('Build and push docker image') {
// steps {
// script {
// withVault(configuration: [timeout: 60, vaultCredentialId: 'cryptanalysis_approle_id'], vaultSecrets: secrets) {
// print(auto-cryptanalysis)
// }
// }
// }
// }
stage('Copy Files to GitHub on Release') {
// when {
// anyOf {
// buildingTag()
// triggeredBy cause: 'UserIdCause'
// }
// }
steps {
script {
def githubURL = 'https://github.com/sharathvutpala/hello_world'
sh 'mkdir temp_dir_for_copy'
sh 'cp -rf . temp_dir_for_copy'
sh 'cd temp_dir_for_copy'
sh 'git init'
sh "git config user.email '[email protected]'"
sh "git config user.name 'Auto'"
sh 'git add . -- :Jenkinsfile'
sh "git commit -m 'Copy files'"
sh "git remote add origin ${githubURL}"
sh "git push -u origin master"
}
}
}
}
}