Skip to content

Commit 3591a98

Browse files
committed
sync github
1 parent 24bea1f commit 3591a98

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Jenkinsfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
pipeline {
22
agent any
33
stages {
4-
5-
64
stage('Checkout'){
75
steps {
86
checkout scm
97
}
108
}
11-
129
stage('Dockerhub login') {
1310
steps {
1411
withCredentials([usernamePassword(credentialsId: 'dockerhub', usernameVariable: 'DOCKERHUB_CREDENTIALS_USR', passwordVariable: 'DOCKERHUB_CREDENTIALS_PSW')]) {
@@ -35,11 +32,11 @@ pipeline {
3532
'''
3633
}
3734
}
38-
}
39-
40-
post {
41-
always {
42-
sh 'docker logout'
35+
stage('Sync github repo') {
36+
when { branch 'master' }
37+
steps {
38+
syncRemoteBranch('git@github.com:nbr23/youtube-dl-server.git', 'master')
39+
}
4340
}
4441
}
4542
}

0 commit comments

Comments
 (0)