-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
30 lines (30 loc) · 1.01 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
pipeline {
agent {
label 'master'
}
stages {
stage('Clone'){
steps {
git url: '[email protected]:O5ten/kickass-recipes.git', credentialsId: 'SSH_GITHUB', branch: 'master'
}
}
stage(''){
steps {
sshagent(['SSH_GITHUB']) {
sh 'echo $(date) > date.txt'
sh """
export GIT_SSH_COMMAND="ssh -oStrictHostKeyChecking=no"
git remote set-url origin [email protected]:O5ten/kickass-recipes.git
git config --global user.email "[email protected]"
git config --global user.name "Mikael Östberg"
git fetch origin master
git checkout master
git add date.txt
git commit -m "Update date"
git push origin master
"""
}
}
}
}
}