Message ID | 76f3cdddcba485e8124659566b2f992b3b14da17.1690881495.git.simone.ballarin@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | automation/eclair: improvements to the ECLAIR integration | expand |
On Tue, 1 Aug 2023, Simone Ballarin wrote: > This patch introduces six new ECLAIR jobs that run only > when triggered by a GitLab scheduled pipeline. > > Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> > --- > .../eclair_analysis/ECLAIR/action.settings | 2 +- > automation/gitlab-ci/analyze.yaml | 65 +++++++++++++++++-- > 2 files changed, 62 insertions(+), 5 deletions(-) > > diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation/eclair_analysis/ECLAIR/action.settings > index 71c10d5141..528bc24c72 100644 > --- a/automation/eclair_analysis/ECLAIR/action.settings > +++ b/automation/eclair_analysis/ECLAIR/action.settings > @@ -73,7 +73,7 @@ gitlab) > headCommitId="${CI_COMMIT_SHA}" > baseCommitId="${CI_MERGE_REQUEST_DIFF_BASE_SHA}" > ;; > - push | pipeline | web) > + push | pipeline | web | schedule) > event=push > if [ -n "${CI_COMMIT_BRANCH:-}" ]; then > ref_kind=branch > diff --git a/automation/gitlab-ci/analyze.yaml b/automation/gitlab-ci/analyze.yaml > index 3d8166572b..3325ef9d9a 100644 > --- a/automation/gitlab-ci/analyze.yaml > +++ b/automation/gitlab-ci/analyze.yaml > @@ -8,6 +8,8 @@ > ENABLE_ECLAIR_BOT: "n" > AUTO_PR_BRANCH: "staging" > AUTO_PR_REPOSITORY: "xen-project/xen" > + script: > + - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" > artifacts: > when: always > paths: > @@ -23,8 +25,6 @@ eclair-x86_64: > LOGFILE: "eclair-x86_64.log" > VARIANT: "X86_64" > RULESET: "Set1" > - script: > - - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" > allow_failure: true > > eclair-ARM64: > @@ -33,6 +33,63 @@ eclair-ARM64: > LOGFILE: "eclair-ARM64.log" > VARIANT: "ARM64" > RULESET: "Set1" > - script: > - - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" > + allow_failure: true > + > +.eclair-analysis:on-schedule: > + extends: .eclair-analysis > + rules: > + - if: $CI_PIPELINE_SOURCE == "schedule" If I understand this right, the idea is that someone would schedule a pipeline (Build -> "Pipeline Schedules") and as part of that, they would also define the variable "CI_PIPELINE_SOURCE" to schedule. Is that correct? If so, please add a good in-code comments here on top of .eclair-analysis:on-schedule to explain it. So that someone reading this might know how what to do with the Gitlab CI settings. > +eclair-x86_64-Set1:on-schedule: > + extends: .eclair-analysis:on-schedule > + variables: > + VARIANT: "X86_64" > + RULESET: "Set1" > + ANALYSIS_KIND: "${RULESET}-scheduled" > + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" > + allow_failure: true > + > +eclair-x86_64-Set2:on-schedule: > + extends: .eclair-analysis:on-schedule > + variables: > + VARIANT: "X86_64" > + RULESET: "Set2" > + ANALYSIS_KIND: "${RULESET}-scheduled" > + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" > + allow_failure: true > + > +eclair-x86_64-Set3:on-schedule: > + extends: .eclair-analysis:on-schedule > + variables: > + VARIANT: "X86_64" > + RULESET: "Set3" > + ANALYSIS_KIND: "${RULESET}-scheduled" > + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" > + allow_failure: true > + > +eclair-ARM64-Set1:on-schedule: > + extends: .eclair-analysis:on-schedule > + variables: > + VARIANT: "ARM64" > + RULESET: "Set1" > + ANALYSIS_KIND: "${RULESET}-scheduled" > + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" > + allow_failure: true > + > +eclair-ARM64-Set2:on-schedule: > + extends: .eclair-analysis:on-schedule > + variables: > + VARIANT: "ARM64" > + RULESET: "Set2" > + ANALYSIS_KIND: "${RULESET}-scheduled" > + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" > + allow_failure: true > + > +eclair-ARM64-Set3:on-schedule: > + extends: .eclair-analysis:on-schedule > + variables: > + VARIANT: "ARM64" > + RULESET: "Set3" > + ANALYSIS_KIND: "${RULESET}-scheduled" > + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" > allow_failure: true > -- > 2.34.1 >
On Tue, Aug 01, 2023 at 03:55:20PM -0700, Stefano Stabellini wrote: > On Tue, 1 Aug 2023, Simone Ballarin wrote: > > This patch introduces six new ECLAIR jobs that run only > > when triggered by a GitLab scheduled pipeline. > > > > Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> > > --- > > +.eclair-analysis:on-schedule: > > + extends: .eclair-analysis > > + rules: > > + - if: $CI_PIPELINE_SOURCE == "schedule" > > If I understand this right, the idea is that someone would schedule a > pipeline (Build -> "Pipeline Schedules") and as part of that, they would > also define the variable "CI_PIPELINE_SOURCE" to schedule. No, this is pre-defined variable in gitlab: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html > > Is that correct? > > If so, please add a good in-code comments here on top of > .eclair-analysis:on-schedule to explain it. So that someone reading this > might know how what to do with the Gitlab CI settings. >
On Wed, 2 Aug 2023, Marek Marczykowski-Górecki wrote: > On Tue, Aug 01, 2023 at 03:55:20PM -0700, Stefano Stabellini wrote: > > On Tue, 1 Aug 2023, Simone Ballarin wrote: > > > This patch introduces six new ECLAIR jobs that run only > > > when triggered by a GitLab scheduled pipeline. > > > > > > Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> > > > --- > > > +.eclair-analysis:on-schedule: > > > + extends: .eclair-analysis > > > + rules: > > > + - if: $CI_PIPELINE_SOURCE == "schedule" > > > > If I understand this right, the idea is that someone would schedule a > > pipeline (Build -> "Pipeline Schedules") and as part of that, they would > > also define the variable "CI_PIPELINE_SOURCE" to schedule. > > No, this is pre-defined variable in gitlab: > https://docs.gitlab.com/ee/ci/variables/predefined_variables.html Even better! Thanks! Then no need for a comment and the patch is OK as is. Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Il 02/08/2023 02:08 Stefano Stabellini ha scritto: > On Wed, 2 Aug 2023, Marek Marczykowski-Górecki wrote: >> On Tue, Aug 01, 2023 at 03:55:20PM -0700, Stefano Stabellini wrote: >> > On Tue, 1 Aug 2023, Simone Ballarin wrote: >> > > This patch introduces six new ECLAIR jobs that run only >> > > when triggered by a GitLab scheduled pipeline. >> > > >> > > Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> >> > > --- >> > > +.eclair-analysis:on-schedule: >> > > + extends: .eclair-analysis >> > > + rules: >> > > + - if: $CI_PIPELINE_SOURCE == "schedule" >> > >> > If I understand this right, the idea is that someone would schedule a >> > pipeline (Build -> "Pipeline Schedules") and as part of that, they would >> > also define the variable "CI_PIPELINE_SOURCE" to schedule. >> >> No, this is pre-defined variable in gitlab: >> https://docs.gitlab.com/ee/ci/variables/predefined_variables.html > > Even better! Thanks! Then no need for a comment and the patch is OK as > is. > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Here is a link with the instructions for creating scheduled pipelines: https://docs.gitlab.com/ee/ci/pipelines/schedules.html
diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation/eclair_analysis/ECLAIR/action.settings index 71c10d5141..528bc24c72 100644 --- a/automation/eclair_analysis/ECLAIR/action.settings +++ b/automation/eclair_analysis/ECLAIR/action.settings @@ -73,7 +73,7 @@ gitlab) headCommitId="${CI_COMMIT_SHA}" baseCommitId="${CI_MERGE_REQUEST_DIFF_BASE_SHA}" ;; - push | pipeline | web) + push | pipeline | web | schedule) event=push if [ -n "${CI_COMMIT_BRANCH:-}" ]; then ref_kind=branch diff --git a/automation/gitlab-ci/analyze.yaml b/automation/gitlab-ci/analyze.yaml index 3d8166572b..3325ef9d9a 100644 --- a/automation/gitlab-ci/analyze.yaml +++ b/automation/gitlab-ci/analyze.yaml @@ -8,6 +8,8 @@ ENABLE_ECLAIR_BOT: "n" AUTO_PR_BRANCH: "staging" AUTO_PR_REPOSITORY: "xen-project/xen" + script: + - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" artifacts: when: always paths: @@ -23,8 +25,6 @@ eclair-x86_64: LOGFILE: "eclair-x86_64.log" VARIANT: "X86_64" RULESET: "Set1" - script: - - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" allow_failure: true eclair-ARM64: @@ -33,6 +33,63 @@ eclair-ARM64: LOGFILE: "eclair-ARM64.log" VARIANT: "ARM64" RULESET: "Set1" - script: - - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" + allow_failure: true + +.eclair-analysis:on-schedule: + extends: .eclair-analysis + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + +eclair-x86_64-Set1:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "X86_64" + RULESET: "Set1" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-x86_64-Set2:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "X86_64" + RULESET: "Set2" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-x86_64-Set3:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "X86_64" + RULESET: "Set3" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-ARM64-Set1:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "ARM64" + RULESET: "Set1" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-ARM64-Set2:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "ARM64" + RULESET: "Set2" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-ARM64-Set3:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "ARM64" + RULESET: "Set3" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" allow_failure: true
This patch introduces six new ECLAIR jobs that run only when triggered by a GitLab scheduled pipeline. Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> --- .../eclair_analysis/ECLAIR/action.settings | 2 +- automation/gitlab-ci/analyze.yaml | 65 +++++++++++++++++-- 2 files changed, 62 insertions(+), 5 deletions(-)