#172 ✓resolved
Alex-SF

Job definitions in YAML

Reported by Alex-SF | January 14th, 2011 @ 12:03 PM | in Rundeck 1.2

Job definitions should be defined in YAML (rather than XML). It is better for human readability.

Here is a hypothetical job definition that shows a strawman example:

#
# Job: simpleapp/Deploy
name: Deploy
group: simpleapp
description: deploy the simple app
loglevel: INFO
project: examples
options: 
       catalinahome:
         {description: the tomcat install directory,
         enforcedvalues: false,  required: true, 
         value: /var/rundeck/simpleapp/apache-tomcat}
sequence:
 - exec: step1.sh
 - script: !!str |
       #!/bin/bash
       USAGE="$0 <catalinahome>"
       die() { echo "ERROR: $@" ; exit 1 ; }
       [ $# = 1 ] || { die "Usage: $0 <catalinahome>" ; }
       export CATALINA_HOME=$1
       [ -d "$CATALINA_HOME" ] || { die "CATALINA_HOME not found: $CATALINA_HOME" ; }
       export CATALINA_BASE=$CATALINA_HOME;
       echo "Invoking $CATALINA_HOME/bin/startup.sh"
       $CATALINA_HOME/bin/startup.sh;
       exit $? 
   scriptargs: ${option.catalinahome}
 - jobref: {group: simpleapp,  name: step3,  arg: {line: "-paramA valA -paramB ${option.catalinahome"}}
schedule:
  time: {hour: "06,07,08", minute: 00}
  weekday: {day: "*"}
  month: {month: "*"}
nodefilters:
  include: {tags: simpleapp}
  dispatch: {threadcount: 1,  keepgoing: false}
notification:
  onfailure: {recipients: test@foo.com}
  onsuccess: {recipients: test@foo.com}

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues

Shared Ticket Bins

People watching this ticket

Referenced by

Pages