Skip to content

Commit

Permalink
Fix regex in preview removal
Browse files Browse the repository at this point in the history
  • Loading branch information
archessmn committed Sep 14, 2024
1 parent 5739377 commit c9d070e
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 @@ -72,7 +72,7 @@ pipeline {
deployPreview action: 'cleanup'
sh "nomad alloc exec -task calendar-dev -job calendar-dev npx -y prisma migrate deploy --schema lib/db/schema.prisma"
script {
def mergedPullRequest = sh "git log --oneline -2 --pretty=%B | head -n 1 | grep -oP '#(\d+)(?!.*#[1-9][0-9]*)' | sed 's/#//'"
def mergedPullRequest = sh "git log --oneline -2 --pretty=%B | head -n 1 | grep -oP '#([1-9][0-9]*)(?!.*#[1-9][0-9]*)' | sed 's/#//'"
if (mergedPullRequest != "") {
oldJobID = sh script: "consul kv get 'pr-deployments/${currentBuild.projectName}/PR-${mergedPullRequest}' || true", returnStdout: true
if (oldJobID.length() > 0) {
Expand Down

0 comments on commit c9d070e

Please sign in to comment.