Skip to content

Fixes several CI workflow issues in ci.yml - #48

Open
netops2devops wants to merge 9 commits into
mainfrom
fix/ci-workflows
Open

Fixes several CI workflow issues in ci.yml#48
netops2devops wants to merge 9 commits into
mainfrom
fix/ci-workflows

Conversation

@netops2devops

Copy link
Copy Markdown
Contributor
  • Scope test job to ./externalcas; the top-level package is a step-ca
    plugin entry point with no independently testable logic
  • Fix govulncheck invocation: remove -C ./externalcas flag which caused
    it to scan only the externalcas subdirectory, missing the root package
  • Add go mod tidy diff check to lint job to catch un-tidied go.mod/go.sum
    before merge
  • Remove make dev calls from lint and security-scan jobs; setup-go@v5
    handles module caching and the embedded clean target discards it
  • Include cosign .bundle files in release assets so users can verify
    binary signatures
  • Add comment on arm64 CGO_ENABLED=0 explaining the cross-compilation
    constraint and the implication if a CGO dependency is introduced

also documents steps for users to verify signed binary via cosign.

  Introduce DNS01 challenge as an alternative to EAB for ACME account
  registration, supporting CAs that require EAB even with DNS01. Extract
  AcmeProxyConfig and certificate bundle splitting into dedicated files.
  Replace package-level cfgModeFlag map with useEAB/useDNS01 struct fields
  to eliminate cross-test state pollution. Separate challenge solver setup
  from account registration in createLegoClient so the two concerns are
  independently conditioned. Expand unit tests to cover DNS01-only, EAB-only,
  and both-mode validation paths, User interface methods, mixed-PEM bundle
  parsing, and RevokeCertificate success and error paths.
  Code changes:
  - Rename config field `dns01` → `dns01_txt` in config.go and ca.json
  - Remove `metrics.enabled` field (always-on now)
  - Add config_test.go with unit tests for ExternalCAS config parsing
  - Slim down external_test.go (tests moved to config_test.go)
  - Add `make test` target for running externalcas tests with -race

  Docs changes:
  - Add new configuration.md page with full field reference and upstream CA URL table
  - Remove configuration section from install.md (now its own page)
  - Remove pre-built binary install method from install.md
  - Rewrite README and docs landing page to lead with DNS01-TXT as a supported mode alongside EAB, and add LetsEncrypt as a viable upstream CA
  - Update quickstart.md to cover both EAB and DNS01-TXT configuration paths
  - Add dns01-txt.png sequence diagram asset
  - Regenerate Hugo public/ output

Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
…ion tests from external_test.go to config_test.go

Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
  config_test.go:
  - Assert metricsEnabled derived field is set/unset correctly by Validate(),
    including the invariant that it stays false when Validate() returns an error
  - Add parseConfig round-trip test for dns01_txt JSON fields (provider,
    dns_servers, env_vars) to guard against tag-name regressions after the
    dns01 → dns01_txt rename
  - Add parseConfig round-trip test for the metrics block, verifying the
    dataSource camelCase JSON key matches the struct tag

  external_test.go:
  - Add TestNew_DNS01OnlyConfig: verifies New() sets dnsProvider on the
    returned struct when only dns01_txt is configured (no EAB)
  - Restore TestNew_ValidatesConfig: exercises New()'s error path for invalid
    configs (empty bytes, missing ca_url, no mode, partial metrics)

Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
  - Scope test job to ./externalcas; the top-level package is a step-ca
    plugin entry point with no independently testable logic
  - Fix govulncheck invocation: remove -C ./externalcas flag which caused
    it to scan only the externalcas subdirectory, missing the root package
  - Add go mod tidy diff check to lint job to catch un-tidied go.mod/go.sum
    before merge
  - Remove make dev calls from lint and security-scan jobs; setup-go@v5
    handles module caching and the embedded clean target discards it
  - Include cosign .bundle files in release assets so users can verify
    binary signatures
  - Add comment on arm64 CGO_ENABLED=0 explaining the cross-compilation
    constraint and the implication if a CGO dependency is introduced

Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.94393% with 45 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@9dc3250). Learn more about missing BASE report.

Files with missing lines Patch % Lines
externalcas/external.go 18.86% 42 Missing and 1 partial ⚠️
externalcas/certbundle.go 90.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage        ?   47.08%           
=======================================
  Files           ?        6           
  Lines           ?      446           
  Branches        ?        0           
=======================================
  Hits            ?      210           
  Misses          ?      225           
  Partials        ?       11           

☔ View full report in Codecov by Harness.
📢 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.

@netops2devops netops2devops added documentation Improvements or additions to documentation cicd github workflow related changes. labels Aug 9, 2026
…s like Features, Bug Fixes, Security etc. This will help generate more clear and well formatted release notes as long as PR have labels associated with them.

Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd github workflow related changes. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants