Gianluca, Perfect. I'll look into this.
Thanks, Chris On Tuesday, September 15, 2020 at 11:26:48 AM UTC-4 Gianluca wrote: > Yes, it explains. > > I would suggest to use intermediate artifacts / published files to use on > the "Deploy" job to know what to do instead of trigger that from "Build" > job. > (I'm calling "Build" the one that runs on mid-day and "Deploy" the one > that runs at "H 21 * * 1") > > So, in my suggestion the flow would be that "Deploy" job will be triggered > by Jenkins base on "cron" trigger and when it runs, it will checks if there > is a list of thing to deploy produced by "Build" job. > You can do the latter in many ways. One that's part of the Jenkins core is > archiveArtifacts: https://www.jenkins.io/doc/pipeline/steps/core/ > So, "Build" job will archive, let's say a JSON listing all microservices > that need to be deployed. Then "Deploy" job will look for that list and if > it's not empty, it will deploy all those listed microservices. > > I hope that helps. > > Cheers, > Gianluca. > > > Il giorno martedì 15 settembre 2020 alle 16:05:46 UTC+1 [email protected] > ha scritto: > >> Thanks for responding Gianluca. >> >> So I have a Jenkins job that builds production code mid-day, but does NOT >> deploy it. We have a a separate deployment job that's cron'ed at "H 21 * * >> 1" to deploy the code built by the mid-day build job >> >> Part of the mid-day build is to check if certain microservices' versions >> need to be deployed to production as well, and I'd like for it to trigger a >> job for each microservice it needs to deploy at "H/30 20 * * 1". IOW the >> needed microservices can not be deployed mid-day either. >> >> Hope that explains it. >> On Tuesday, September 15, 2020 at 10:47:34 AM UTC-4 Gianluca wrote: >> >>> From what I know that's specific thing is not possible. >>> And to be honest, it's quite strange as well. >>> >>> Maybe if you explain us why are you trying to do that, we could suggest >>> alternatives that are possible in Jenkins. >>> >>> Cheers, >>> Gianluca. >>> >>> >>> Il giorno martedì 15 settembre 2020 alle 15:40:20 UTC+1 [email protected] >>> ha scritto: >>> >>>> I see this, but I don't understand how to implement it for my use case. >>>> >>>> https://www.codependentcodr.com/scheduled-builds-in-jenkins-scripted-pipelines.html >>>> >>>> I want JobA to trigger JobB, but at a certain time. I do this now >>>> >>>> *Step in JobA to trigger JobB* >>>> build job: JobB, >>>> wait: true >>>> >>>> ...but I wish I can do this (for illustration only, the cron option >>>> does not exist of course) >>>> >>>> *Step in JobA to trigger JobB to run around 9:00pm ET* >>>> build job: JobB, >>>> cron: "H 21 * * 1", >>>> wait: true >>>> >>>> Any ideas? Thanks! >>>> >>> -- 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/d0720834-d0ea-4dcc-a808-75448feb7e2an%40googlegroups.com.
