indigo-dc / jenkins-pipeline-library

Jenkins pipeline library with common functionalities for CI/CD environments, mainly targeted for the implementation of the SQA baseline requirements from https://indigo-dc.github.io/sqa-baseline/
Apache License 2.0
11 stars 6 forks source link

github workflows: updatecli #158

Open samuelbernardolip opened 3 years ago

samuelbernardolip commented 3 years ago

Jenkins infra follows almost the same git flow strategy as we are adopting for JePL: https://github.com/jenkins-infra/jenkins-infra#branching-model

We use jenkins/* for the same purpose as they are using staging branch. In the workflow they use updatecli action to manage the staging branch: https://github.com/updatecli/updatecli

motto: Automatically open a PR on your GitOps repository when a third service publishes an updates

A job is triggered periodically with a predefined cron. The goal is to check for differences and then apply the required changes to run the required Jenkins pipelines.

This is an interesting approach, since updatecli templates allows to look to the external repository/branch, as an overview:

sources:
... dynamic association to release we want
conditions:
... what should happen to run the targets
targets:
... do PR if file changes happens

The cons of using updatecli:

So I think our approach continues to be the best, since is more simple, using the minimum work that needs to be done in git management platform, before calling the webhook for Jenkins job. We should try always to keep as much as possible the pipeline code in Jenkins side.