Builds: force rebuild #2973
Sebastian opened 1 day ago

Follow-up for OD-2735 which got reverted by OD-2949: an option the CI/CD pipeline to force a full rebuild.

Use case: A project depends on certain external libraries which are updated independently of the project's repository. At the same time, users should be able to get a compatible project artifact/binary at all times. As such, a cronjob-triggered build runs every night to compile the latest version of the software.

Current state: Since external dependencies are only added during the build step, OneDev does not know if the external library was updated or not. It only knows if our code was updated; and if not, it will not recompile (even if the library was updated).

What would be great to have: Either

  1. an option (even within the triggers themselves would be fine) to forcefully build a new state or
  2. a build step that invalidates all existing builds (which I could run right before the other cronjob) or
  3. any other option that helps us with our specific use case. 😄

Hope this makes sense and is not too much of an effort!

Thanks, Sebastian

  • Robin Shen commented 19 hours ago

    @cwh In advanced settings of the job, add option:

    includeUpstreamWhenRebuild: also rebuild jobs current job dependends on, this is same behavior as before reverting OD-2949

    includeDownstreanWhenRebuild: also rebuild jobs depending on current job.

    Make sure to add migration methods in BuildSpec, with these settings default to false.

  • Chief Work Horse referenced from pull request 19 hours ago
  • Chief Work Horse commented 19 hours ago

    Implemented the requested per-job rebuild controls: upstream and downstream rebuilds can now be enabled independently, recursive traversal is scoped to the originally rebuilt job, and existing build specs migrate with both options disabled by default. The current rebuild behavior remains unchanged when the new options are off. Submitted in pr OD-109.

1/1
Type
Improvement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2973
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover