Hi Ryan,
Probably the best approach to your use case is to store the desired job list in a JSON file as a remote option, in that way your user can select the job from a dropdown list.
Job 1 -> Creates a JSON file with the desired job list via inline script following this format, an awesome tool to create it could be JQ.
Job 2 -> Takes the JSON file and uses it as a remote (file) option, then the user can select the desired job to execute.
Here is a Job Definition Example of the second job:
- defaultTab: nodes
description: ''
executionEnabled: true
id: 6c6396f8-29a7-4911-b942-094aad1e15d9
loglevel: INFO
name: JobA
nodeFilterEditable: false
options:
- enforced: true
name: jobs
required: true
valuesUrl: file:/path/to/your/json/file.json
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- fileExtension: .sh
interpreterArgsQuoted: false
script: |-
# just a friendly message
echo "executing your job..."
# run a job using Rundeck API
curl -X POST \
'http://localhost:4440/api/41/job/@option.jobs@/run' \
--header 'Accept: application/json' \
--header 'X-Rundeck-Auth-Token: cPOpGjTogNcem40eCkkPnDOU9W9udHKQ'
scriptInterpreter: /bin/bash
keepgoing: false
strategy: node-first
uuid: 6c6396f8-29a7-4911-b942-094aad1e15d9
Consider that, Process Automation (formerly “Rundeck Enterprise”) includes the Ruleset Strategy that allows you to design complex workflows depending on your option value, this is the easiest way actually.
Regarding your k8s issue, you can use this plugin to interact with your k8s cluster.
Hope it helps!