-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
25 lines (23 loc) · 1.07 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
pipeline {
agent any
stages {
stage('pull code') {
steps {
withCredentials([string(credentialsId: 'github-Token-for-gin-test', variable: 'TOKEN')]) {
git branch: 'main', credentialsId: 'github-email-pwd', url: 'https://${TOKEN}@github.com/lilhammer111/to-persist.git'
}
}
}
stage('build project') {
steps {
sh '''echo "start building..."
echo "finish building!"'''
}
}
stage('deploy project') {
steps {
sshPublisher(publishers: [sshPublisherDesc(configName: 'qiniuyun', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: 'echo "success!"', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/to-persist', remoteDirectorySDF: false, removePrefix: '', sourceFiles: '**')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
}
}
}
}