[BUILD-1023] In-house cron job (magnolia-mgmt task) as replacement for cross-Jenkins triggers Created: 24/Feb/23  Updated: 15/Mar/23  Resolved: 15/Mar/23

Status: Closed
Project: Build
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Maxime Michel Assignee: Maxime Michel
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

As discussed here: https://www.notion.so/magnoliacms/Testing-QA-Group-of-Interest-caa8f2151c8547d5a250dd4c42f4f345?pvs=4

The current solution with cross-Jenkins triggers isn't great for many reasons:

  • in some cases it's triggering useless builds
    • if there was any type of change in CE, regardless of whether it will change anything in SaaS webapp (which overlays the empty webapp only)
    • because we have many builds on Core Jenkins, but there we don't care so much & we also can't manage it differently, as the Jenkins Maven plugin orchestrates it all for us
  • in other cases it's not triggering useful builds (e.g. any change in SSO won't rebuild the SaaS webapp)
  • sometimes, we trigger too many builds in a row

To solve these problems for good it should be possible to implement the following cron job:

  • it would look at the cloud webapp's dependency tree
    • problem: the Jenkins helper job dependency-tree-service can't help because the cloud-webapp isn't deployed to Nexus, hence it won't work
    • instead, we have to manually fetch and dissect the webapp's pom using Java Maven models
  • for any SNAPSHOT in the dependency tree, it would look up its timestamp on Nexus (we do the same for releases in PostReleaseService)
  • the job would then run every X hours. If upstream changes are detected, it would trigger a new build.
    • reuse token used by plugin? yes
    • we arrived to 2 hours as a first number because the target job takes 1.5hr to complete

Generated at Sun Feb 11 23:47:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.