Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: OutputTemplates #813

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

avitova
Copy link

@avitova avitova commented May 29, 2023

This patch adds the possibility to process the output of the jobs.
There are two ways to do that:

  1. Define a reusable Output Template = an ERB template that with the help of variable @output can process the job output.
  2. Define a Runtime Template = as indicated in the name, users can define the template on the runtime by filling in a text field in the wizard.

On top of that, it is possible to set default Output Templates for a Job Template, meaning it would be selected directly when selecting a new Output Template.

Let me add 'How to use' screenshots.
image
image
Now, when executing the job, there are new fields in the wizard:
image
image
^ There is a slight change now - users can define only one Runtime template. Therefore users do not have to submit:)
When you want to see the output of the job, navigate to the "Processed tab":
image

This patch will show Runtime templates in the "default Output Templates" multi-select field. A solution for not showing these would be a part of a patch to the Foreman repo.

unless processed_output
return renderer.error_message.html_safe, false
end
return processed_output, true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a Go thingy here? 👿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants