Re: Is it possible to schedule a build inside a JenkinsFile?

2018-12-25 Thread Baptiste Mathus
Hey Vincent, I'm still unsure if fully understood what you're trying to achieve. IIUC, for that stage that should happen only once a day, I guess it depends. If something gets created there, like an artifact, could you maybe simply check the timestamp of this artifact, and check it's at least 24

Re: Resurrecting a Backup to SCM structure - with Jenkinsfile and Agents

2018-12-25 Thread Mark Waite
I use a private docker image for rapid Jenkins test setup and teardown. In that private image, I place copies of relevant files in the "ref/" directory. That allows me to copy credentials, job definitions, folder definitions, etc. I plan to eventually move away from that technique since it

Resurrecting a Backup to SCM structure - with Jenkinsfile and Agents

2018-12-25 Thread Randall Becker
Hi All, Following best practices, we moved our entire build structure to a per-project Jenkinsfile and agents where the various parts of builds happen. The Jenkinsfiles are stored in the git repositories involved and we are using multi-branch projects. All that is working file. Our issue is

Re: Is it possible to schedule a build inside a JenkinsFile?

2018-12-25 Thread Vincent Massol
Thanks a lot Slide. That's an interesting strategy. The problem I see is that we have several crons (and the cron frequencies are configurable). So ideally we would need to pass some variable alongside the cron trigger so that we could check which cron was triggered and build accordingly.

Re: How to take a backup of specific project in jenkins workspaces after successfull / failed build ?

2018-12-25 Thread Adam von Nieda
If you want to back up the project XML file, (assuming Linux), you could do a script step like this. You should be able to extend this after you get the idea. config_file="$JENKINS_HOME/jobs/$JOB_NAME/config.xml" cp $config_file $config_file.`date +'%F_%H_%M_%S’` Or something like cp