Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger in Jenkinsfile not working properly in single branch pipeline job #29

Open
tlvu opened this issue Jan 7, 2020 · 1 comment
Open

Comments

@tlvu
Copy link
Contributor

tlvu commented Jan 7, 2020

The line below should have added the midnight cron trigger to all pipeline jobs as long as it's on the master branch

cron_only_on_master = env.BRANCH_NAME == "master" || env.GIT_BRANCH == 'origin/master' ? "@midnight" : ""

It's working fine for the multibranch pipepline job

https://github.com/Ouranosinc/jenkins-config/blob/356154251ad9e535e0799a136f812eb9a57c505e/jcasc/jobs.yaml#L3-L9

but not the single branch pipeline job

https://github.com/Ouranosinc/jenkins-config/blob/356154251ad9e535e0799a136f812eb9a57c505e/jcasc_ouranos/staging_jobs.yaml#L5

After the 2nd scheduled run on the single branch pipeline job, the cron trigger disappear ! So it does work for 2 times, which makes matter even more interesting/puzzling.

@tlvu
Copy link
Contributor Author

tlvu commented Jan 7, 2020

Asked on https://gitter.im/jenkinsci/jenkins, this bug is way too weird.

@Ouranosinc Ouranosinc deleted a comment from tlvu Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant