Skip to content

Jenkins

alex [dot] kramer [at] g_m_a_i_l [dot] com edited this page Sep 5, 2020 · 4 revisions

Parameterized job example

Go to General > This project is parameterized > Add Parameter > Boolean Parameter and set a parameter name FLAG_SHOULD_BE_SET
Then go to Execute Shell > Command and add:

EXAMPLE_FLAG="" && [[ "$FLAG_SHOULD_BE_SET" == "true" ]] && EXAMPLE_FLAG="--example-flag"
echo "Flag should be set: $FLAG_SHOULD_BE_SET"
echo "Example flag is: $EXAMPLE_FLAG"

MY_COMMAND="example_command --some-other-flag $EXAMPLE_FLAG"
echo "$MY_COMMAND"

Plugins

  • AnsiColor
  • Build Blocker Plugin
  • Build Monitor View
  • Green Balls
  • Safe Restart Plugin
Clone this wiki locally