Fix webhook
This commit is contained in:
parent
3eea28979e
commit
2967dc22a7
1 changed files with 9 additions and 2 deletions
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
|
|
@ -2,7 +2,14 @@ pipeline {
|
|||
agent any
|
||||
|
||||
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 {
|
||||
|
|
@ -31,7 +38,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
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')]) {
|
||||
sh """
|
||||
echo "$PASSWORD" | docker login $REGISTRY -u "$USERNAME" --password-stdin
|
||||
|
|
|
|||
Loading…
Reference in a new issue