Skip to content

Consolidate into a single deploy step in CI#493

Merged
ehelms merged 2 commits intotheforeman:masterfrom
ehelms:consolidate-ci-deploys
May 6, 2026
Merged

Consolidate into a single deploy step in CI#493
ehelms merged 2 commits intotheforeman:masterfrom
ehelms:consolidate-ci-deploys

Conversation

@ehelms
Copy link
Copy Markdown
Member

@ehelms ehelms commented May 5, 2026

Why are you introducing these changes? (Problem description, related links)

To reduce the runtime of CI on PRs.

What are the changes introduced in this pull request?

  • Consolidates into a single deploy command
  • Modifies the formatting to make the deploy command more readable

How to test this pull request

Steps to reproduce:

  • Let CI do it's job

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

Combine the separate --add-feature deploy invocations into the initial
deploy call for both the tests and upgrade jobs. This eliminates
redundant Ansible runs (fact gathering, role evaluation, handler
execution) that were repeated with each deploy invocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ehelms ehelms changed the title Consolidate ci deploys Consolidate into a single deploy step in CI May 5, 2026
@ehelms
Copy link
Copy Markdown
Member Author

ehelms commented May 5, 2026

@evgeni I owed you this from when I added iop.

@ehelms
Copy link
Copy Markdown
Member Author

ehelms commented May 5, 2026

I compared another PR that had run without this change and the results in this PR.

  ┌────────────────────────────┬────────┬───────┬─────────┐                                                                                                                                   
  │            Job             │ Before │ After │ Savings │                                                                                                                                   
  ├────────────────────────────┼────────┼───────┼─────────┤                                                                                                                                   
  │ default/internal/cs9/iop   │ 64.4m  │ 51.5m │ 12.9m   │                                                                                                                                   
  ├────────────────────────────┼────────┼───────┼─────────┤                                                                                                                                   
  │ installer/internal/cs9/iop │ 67.6m  │ 43.8m │ 23.8m   │                                                                                                                                   
  ├────────────────────────────┼────────┼───────┼─────────┤                                                                                                                                   
  │ default/fapolicyd/cs9      │ 51.2m  │ 40.1m │ 11.1m   │                                                                                                                                   
  ├────────────────────────────┼────────┼───────┼─────────┤                                                                                                                                   
  │ default/external/cs9       │ 50.8m  │ 37.0m │ 13.8m   │ 
  ├────────────────────────────┼────────┼───────┼─────────┤                                                                                                                                   
  │ custom_server/internal/cs9 │ 44.3m  │ 58.6m │ +14.3m* │ 
  ├────────────────────────────┼────────┼───────┼─────────┤                                                                                                                                   
  │ upgrade                    │ 53.2m  │ 44.1m │ 9.1m    │ 
  └────────────────────────────┴────────┴───────┴─────────┘                                                                                                                                   
                                                            
  *custom_server had a 22.7m Setup libvirt anomaly (normally ~0.5-1m) — a runner issue, not related to the change.       

This combined approach saves a good chunk of time on each run.

@evgeni
Copy link
Copy Markdown
Member

evgeni commented May 6, 2026

One of the reasons we had the "multi deploy" approach was to ensure that a deploy with no additional features can succeed. Can we still have that?

@ehelms
Copy link
Copy Markdown
Member Author

ehelms commented May 6, 2026

One of the reasons we had the "multi deploy" approach was to ensure that a deploy with no additional features can succeed. Can we still have that?

Every step that included a deploy, deployed a new feature. What am i missing about "with no additional features" ?

@evgeni
Copy link
Copy Markdown
Member

evgeni commented May 6, 2026

No, the original "run deployment" step has no --add-feature parameters:

./foremanctl deploy --certificate-source=${{ matrix.certificate_source }} ${{ matrix.database == 'external' && '--database-mode=external --database-host=database.example.com --database-ssl-ca $(pwd)/.var/lib/foremanctl/db-ca.crt --database-ssl-mode verify-full' || '' }} ${{ matrix.certificate_source == 'custom_server' && '--certificate-server-certificate /root/custom-certificates/certs/quadlet.example.com.crt --certificate-server-key /root/custom-certificates/private/quadlet.example.com.key --certificate-server-ca-certificate /root/custom-certificates/certs/server-ca.crt' || '' }} --foreman-initial-admin-password=changeme --initial-organization "Foreman CI" --initial-location "Internet" --tuning development

So my ask is: run that, then run

foremanctl deploy --add-feature hammer \
            --add-feature foreman-proxy \
            --add-feature azure-rm \
            --add-feature google \
            --add-feature remote-execution \
            ${{ matrix.iop == 'enabled' && '--add-feature iop' || '' }}

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ehelms ehelms force-pushed the consolidate-ci-deploys branch from a245f33 to 64b4c1d Compare May 6, 2026 12:30
@ehelms ehelms merged commit 829cfaf into theforeman:master May 6, 2026
20 of 22 checks passed
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.

2 participants