Skip to content

Commit

Permalink
fix: correct sed command syntax for updating tag in values.yaml in De…
Browse files Browse the repository at this point in the history
…ployment stage of Jenkinsfile
  • Loading branch information
Ganthepro committed Dec 24, 2024
1 parent 9a4edfa commit 18f8c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pipeline {
script {
withCredentials([string(credentialsId: 'edusaig-manifest-repo', variable: 'MANIFEST_REPO')]) {
sh "git clone $MANIFEST_REPO"
sh 'sed -i 's/^\([[:space:]]*tag:[[:space:]]*\).*/\1"${BUILD_NUMBER}"/' $MANIFEST_REPO/values.yaml'
sh 'sed -i "s/^\\([[:space:]]*tag:[[:space:]]*\\).*/\\1\\"$BUILD_NUMBER\\"/" $MANIFEST_REPO/values.yaml'
sh "cd edusaig-manifest && git add . && git commit -m 'Update tag to $BUILD_NUMBER' && git push"
// ใช้คำสั่ง git clone เพื่อทำการ clone โปรเจคของเรา และใช้คำสั่ง sed เพื่อทำการแก้ไขไฟล์ values.yaml ในโปรเจคของเรา
}
Expand Down

0 comments on commit 18f8c21

Please sign in to comment.