Skip to content

Commit

Permalink
Merge "Fix: Add comment as parameter to deploy job"
Browse files Browse the repository at this point in the history
  • Loading branch information
askb authored and Gerrit Code Review committed Apr 2, 2024
2 parents 15d63bd + c4ca299 commit b2507b9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/jjb/lf-macros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,14 @@ lf-cmake-parameters
Provides parameters required by CMake. Use in any jobs that need to call the
``cmake && make && make install`` pattern.

lf-gerrit-event-comment-text-parameter
--------------------------------------

Provides the value for GERRIT_EVENT_COMMENT_TEXT,
needed for jobs triggerable via a gerrit comment
when starting them via "Build with parameters" instead.
For example when testing jobs on Sandbox.

lf-infra-maven-parameters
-------------------------

Expand Down
2 changes: 2 additions & 0 deletions jjb/lf-ci-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@
- lf-infra-jjb-parameters:
jjb-cache: "{jjb-cache}"
jjb-version: "{jjb-version}"
- lf-gerrit-event-comment-text-parameter:
comment-text: "$GERRIT_EVENT_COMMENT_TEXT"

wrappers:
- lf-infra-wrappers:
Expand Down
13 changes: 13 additions & 0 deletions jjb/lf-macros.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,19 @@
default: "{make-opts}"
description: "Options to pass to make. Example: -j8"

- parameter:
name: lf-gerrit-event-comment-text-parameter
# GERRIT_EVENT_COMMENT_TEXT parameter is usually provided
# by the triggering gerrit comment.
# Having it as parameter is useful for "Build with parameters",
# for example when testing (otherwise gerrit comment triggered)
# jobs on Sandbox.
parameters:
- string:
name: GERRIT_EVENT_COMMENT_TEXT
default: "{comment-text}"
description: "Simulated gerrit comment when triggering manually."

- parameter:
name: lf-infra-maven-parameters
parameters:
Expand Down

0 comments on commit b2507b9

Please sign in to comment.