master
SLW\ARNAUA 2023-03-09 12:34:36 +01:00
parent aa88b3daf3
commit 1010765b54
1 changed files with 8 additions and 9 deletions

17
Jenkinsfile vendored
View File

@ -75,10 +75,12 @@
stage('Checkout Branch') {
steps{
sh '''
cd /opt/workspace/coco_terraform_config/
git checkout -b automatedSLOGeneration
'''
def now = new Date()
def timestamp = now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC'))
def branch = timestamp+"-automatedSLOGeneration"
dir("/opt/workspace/coco_terraform_config/") {
sh 'git checkout -b "${branch}"'
}
}
}
@ -117,13 +119,10 @@
stage('Create Pull Request') {
steps {
script {
def now = new Date()
timestamp = now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC'))
dir("/opt/workspace/coco_terraform_config/") {
sh 'git add .'
sh ('git commit -m "123"')
sh 'git push origin automatedSLOGeneration'
sh 'git commit -m "${timestamp}"'
sh 'git push origin ${branch}'
}
}
}