Hey all,
I have a question with configuring Jenkins that I have been struggling
with for a while. We are using Jenkins 2.150.1.
My jenkinsfile looks like this:
pipeline {
agent {
node {
label 'some-node'
}
}
environment {
COMPOSE_PROJECT_NAME = "${env.JOB_NAME}-${env.BUILD_ID}"
}
options {
timeout(time: 40, unit: 'MINUTES')
}
stages {
stage('Build Site') {
when {
branch 'test-site'
}
steps {
...
}
}
stage('Build Javadoc') {
when {
buildingTag()
}
steps {
...
}
}
stage('Deploy Site') {
when {
branch 'test-site'
}
steps {
...
}
stage('Deploy Javadoc') {
when {
buildingTag()
}
steps {
...
}
}
}
post {
always {
sh 'docker system prune --force --all'
}
}
}
I want to run a pipeline when a commit is pushed to a branch. I am able
to do this by setting "Branches to build" to `refs/heads/test-site`.
However, I also need to build a pipeline when a tag that matches a regex
is pushed. I tried adding a refspec following
https://mohamicorp.atlassian.net/wiki/spaces/DOC/pages/136740885/Triggering+Jenkins+Based+on+New+Tags
, however it doesn't trigger the build.
Does anyone have any tips for how to get this to work?
Francis
--
You received this message because you are subscribed to the Google Groups "Jenkins
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/77c2a45c-6283-6eb6-2baa-6ff929e70d20%40apache.org.
For more options, visit https://groups.google.com/d/optout.