Skip to content

Conversation

@twoGiants
Copy link
Contributor

@twoGiants twoGiants commented Dec 13, 2025

Changes

  • 🎁 Implement GitHub Actions workflow generation in func config ci command (previously skeleton-only)
  • 🎁 Add workflow structure with checkout, Kubernetes context setup, func CLI installation, and deployment steps
  • 🎁 Support customizable workflow parameters (branch trigger, kubeconfig secret name, registry URL variable, workflow name)
  • 🎁 Add comprehensive test coverage with unit tests (mocked components) and integration tests (real filesystem)
  • 🧹 Extract MockLoaderSaver to cmd/common for test code reusability

/kind enhancement

Part of #3256

Release Note

Implement GitHub Actions workflow generation in `func config ci` command. The command now creates a complete deployment workflow with Kubernetes context setup, func CLI installation, and automated deployment. Supports customizable parameters for branch trigger, kubeconfig secret name, registry URL variable, and workflow name.

Docs


@knative-prow knative-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 13, 2025
@codecov
Copy link

codecov bot commented Dec 13, 2025

Codecov Report

❌ Patch coverage is 82.20859% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.91%. Comparing base (be256cd) to head (79d4bae).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
cmd/common/common.go 0.00% 12 Missing ⚠️
cmd/ci/writer.go 38.46% 8 Missing ⚠️
cmd/ci/workflow.go 92.30% 4 Missing and 2 partials ⚠️
cmd/ci/config.go 84.21% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3295      +/-   ##
==========================================
+ Coverage   54.74%   54.91%   +0.17%     
==========================================
  Files         168      170       +2     
  Lines       19605    19742     +137     
==========================================
+ Hits        10732    10842     +110     
- Misses       7807     7831      +24     
- Partials     1066     1069       +3     
Flag Coverage Δ
e2e 39.87% <2.85%> (-0.45%) ⬇️
e2e go 35.87% <2.85%> (-0.42%) ⬇️
e2e node 31.35% <2.85%> (-0.38%) ⬇️
e2e python 35.52% <2.85%> (-0.50%) ⬇️
e2e quarkus 31.50% <2.85%> (-0.38%) ⬇️
e2e rust 30.96% <2.85%> (-0.38%) ⬇️
e2e springboot 30.97% <2.85%> (-0.38%) ⬇️
e2e typescript 31.47% <2.85%> (-0.38%) ⬇️
integration 17.59% <0.00%> (-0.12%) ⬇️
unit macos-14 44.73% <82.14%> (+0.32%) ⬆️
unit macos-latest 44.73% <82.14%> (+0.31%) ⬆️
unit ubuntu-24.04-arm 44.89% <82.20%> (+0.28%) ⬆️
unit ubuntu-latest 45.64% <82.14%> (+0.31%) ⬆️
unit windows-latest 44.75% <82.14%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@twoGiants twoGiants force-pushed the issue-744-basic-workflow branch 2 times, most recently from 595194c to 0ef564a Compare December 13, 2025 16:18
This change adds GitHub Actions workflow generation for deploying
functions. The workflow includes checkout, Kubernetes context setup
via kubeconfig, func CLI installation, and deployment with registry
configuration.

The command is feature-flagged (FUNC_ENABLE_CI_CONFIG) to allow
gradual rollout. Users can customize workflow parameters:
- Branch trigger (default: main)
- Kubeconfig secret name (default: KUBECONFIG)
- Registry URL variable (default: REGISTRY_URL)
- Workflow name (default: Func Deploy)

Implementation includes comprehensive test coverage with both
unit tests (mocked components) and integration tests (real
filesystem operations). Also extracts MockLoaderSaver to
cmd/common for reusability across test suites.

Issue knative#3256

Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
@twoGiants twoGiants force-pushed the issue-744-basic-workflow branch from 0ef564a to 79d4bae Compare December 13, 2025 16:20
@twoGiants
Copy link
Contributor Author

Copy link
Member

@lkingland lkingland left a comment

Choose a reason for hiding this comment

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

Definitely going in a nice direction!

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 15, 2025
@knative-prow
Copy link

knative-prow bot commented Dec 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lkingland, twoGiants

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2025
@lkingland
Copy link
Member

/retest

@knative-prow knative-prow bot merged commit 4ef5654 into knative:main Dec 15, 2025
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants