Fix webhook

This commit is contained in:
myrmidex 2025-07-14 20:38:53 +02:00
parent 3eea28979e
commit 2967dc22a7

11
Jenkinsfile vendored
View file

@ -2,7 +2,14 @@ pipeline {
agent any agent any
triggers { triggers {
githubPush() // Enables webhook support via GitHub-style POST genericTrigger(
causeString: 'Triggered on tag push',
token: 'tag-trigger-secret',
printContributedVariables: true,
printPostContent: true,
regexpFilterExpression: 'ref=refs/tags/.*',
regexpFilterText: '$ref'
)
} }
environment { environment {
@ -31,7 +38,7 @@ pipeline {
} }
} }
steps { steps {
sh 'docker build -t $IMAGE_NAME:$GIT_COMMIT .' sh 'docker build -t $IMAGE_NAME:$GIT_COMMIT -f docker/Dockerfile .'
withCredentials([usernamePassword(credentialsId: "$DOCKER_CREDENTIALS_ID", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: "$DOCKER_CREDENTIALS_ID", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh """ sh """
echo "$PASSWORD" | docker login $REGISTRY -u "$USERNAME" --password-stdin echo "$PASSWORD" | docker login $REGISTRY -u "$USERNAME" --password-stdin