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

CI: Make runners configurable #840

Merged
merged 2 commits into from
Jun 30, 2023
Merged

Conversation

bastelfreak
Copy link
Member

moduleroot/.github/workflows/ci.yml.erb Outdated Show resolved Hide resolved
<%- else -%>
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1
<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? -%>
<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? || @configs.key?('unit_runs_on') -%>
Copy link
Member

Choose a reason for hiding this comment

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

I wonder at which point we're just going to write it in Ruby and use to_yaml on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah :(

Copy link
Member

@jhoblitt jhoblitt Jun 30, 2023

Choose a reason for hiding this comment

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

I've had the same thought. One of the issues with using psych to format is you can't control the indenting of lists and it always uses the non-indented form (which I find harder read). There's also no support for emitting comments.

Copy link
Member

Choose a reason for hiding this comment

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

Is there a better featured yaml parser/generator we could use?

Copy link
Member

Choose a reason for hiding this comment

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

Oh yes, ruby/psych#594 is still unresolved :(

unit_runs_on: '<%= @configs['unit_runs_on'] %>'
<%- end -%>
<%- if @configs['acceptance_runs_on'] -%>
acceptance_runs_on: '<%= @configs['acceptance_runs_on'] %>'
Copy link
Member

Choose a reason for hiding this comment

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

I have been using larger runners in my control repo but I use a nested hash for the config. E.g.:

  rake_checks:
    runs-on:
      group: Default Larger Runners
      labels: ubuntu-latest-16-cores

I guess that could be done as a heredoc but the indenting would be fiddly.

bastelfreak and others added 2 commits June 30, 2023 17:59
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
@bastelfreak
Copy link
Member Author

I'm going to merge this since it works. If someone has concrete ideas on how to improve it or want to rewrite it, let me know :)

@bastelfreak bastelfreak merged commit b1e668c into voxpupuli:master Jun 30, 2023
3 checks passed
@bastelfreak bastelfreak deleted the runners branch June 30, 2023 16:05
@kenyon kenyon changed the title CI: Make runners configureable CI: Make runners configurable Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants