-
Notifications
You must be signed in to change notification settings - Fork 30
feat: add declarative airgap RKE2 test pipeline (#591) #598
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
Open
floatingman
wants to merge
22
commits into
rancher:main
Choose a base branch
from
floatingman:feature/issue-591-airgap-rke2-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
5e5fcf3
feat: add unified airgap RKE2 infra pipeline (Jenkinsfile.airgap-rke2…
floatingman 83c2c75
fix: add repo URL parameters to standardCheckout
floatingman 3d703e3
fix: load all credentials once at stages level
floatingman fc4912f
fix: wrap all stages in single property.useWithProperties block
floatingman fe058f4
debug: add logging before S3 upload to diagnose empty params
floatingman 0b3d102
fix: use local variable for workspaceName instead of env
floatingman 3753779
fix: pass S3 bucket/region overrides to shared s3 functions
floatingman f96e2e8
feat: generate Ansible inventory from tofu airgap_inventory_json output
floatingman cf2f126
refactor: use generate_inventory.py instead of inline Groovy inventory
floatingman de2d73e
refactor: eliminate S3 tfvars round-trip, reconstruct from job config
floatingman e5befd9
fix: add SSH key copy stage before RKE2 deploy
floatingman dbc343b
fix: add debug logging to post-failure teardown
floatingman 4cd926b
fix: read workspace name from file in post-failure teardown
floatingman 2e227af
feat: split airgap RKE2 infra pipeline into setup/destroy jobs
floatingman 8d2c8fb
fix: call make.runTarget() directly instead of new make()
floatingman 832530e
fix: replace YAML pipe syntax with Groovy triple-quoted string in des…
floatingman 1df9764
chore: remove unified Jenkinsfile.airgap-rke2-infra (replaced by spli…
floatingman 883dddf
fix: address PR #595 review comments
floatingman 1ae5f96
docs: add PR review guidelines to copilot-instructions
floatingman 80a636e
feat: add declarative airgap RKE2 test pipeline (issue #591)
floatingman eb0e077
fix: add make to Dockerfile.airgap-go-tests
floatingman 6bdcb13
fix: strip ./ prefix from INFRA_DIR in archiveArtifacts
floatingman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -208,3 +208,43 @@ Always update relevant documentation when making changes: | |
| * return pointers to objects where possible in helper functions | ||
| * if the case of ignoring errors arises, always justify via comment as to why it is ignored | ||
| * strings should be a const wherever possible except for logs and error messages | ||
|
|
||
| ## Pull Request Review Guidelines | ||
|
|
||
| When reviewing PRs, Copilot should check for the following patterns specific to this repository. | ||
|
|
||
| ### Jenkinsfile reviews (`validation/pipeline/Jenkinsfile.*`) | ||
|
|
||
| **Security** | ||
| - No hardcoded secrets in `defaultValue` blocks — use `${VARIABLE}` substitution and `password` parameter types | ||
| - `password` type parameters for all credentials (registry passwords, Rancher passwords, API keys) | ||
| - `useWithProperties` blocks must include every credential referenced in their scope's substitution maps | ||
|
|
||
| **Jenkins pipeline correctness** | ||
| - Use `env.X` not `params.X` for the `library` directive at the top of Jenkinsfiles — `params` is not resolved at library load time | ||
| - `text` parameters use `defaultValue: '''...'''` (Groovy triple-quoted), never `default: |` (YAML pipe syntax) | ||
| - Paths should use `env.*_DIR` variables (set by `airgap.standardCheckout`), not hardcoded directory names like `'qa-infra-automation'` | ||
| - `archiveArtifacts` should not use `fingerprint: true` for transient build artifacts | ||
|
|
||
| **Parameterization** | ||
| - Ansible variable templates should reference pipeline parameters, not hardcode values (e.g., `${RANCHER_BOOTSTRAP_PASSWORD}` not `"rancherrocks"`) | ||
| - Boolean-like Ansible variables (`enable_private_registry`, `deploy_rancher`) should reflect pipeline parameters, not be hardcoded to `true` | ||
|
|
||
| ### Go test reviews | ||
|
|
||
| **Build tags** | ||
| - Every test file must have a `//go:build` line with appropriate tags | ||
| - Version tags must follow the existing patterns in the codebase (e.g., `2.13`, `!2.8`) | ||
| - Do not add `pit` tags unless the test explicitly uses external non-Rancher APIs | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we use the pit.daily flag for tests that aren't just from non-rancher api, i.e. the networking tests |
||
|
|
||
| **Code organization** | ||
| - Helper functions that return errors are preferred over helpers accepting `testing.T` | ||
| - Use `logrus` for logging, never `testing.T.Log` | ||
| - Shared helpers belong in `actions/`, not duplicated across test packages | ||
| - Functions matching the extension criteria should target the [shepherd](https://github.com/rancher/shepherd) repo instead | ||
|
|
||
| **Test quality** | ||
| - At least 2 tests per suite when possible: one dynamic (config-driven) and one static | ||
| - Feature name only in `SuiteName`, not in individual test names | ||
| - Validate in a separate function, not inline in the test | ||
| - Use `session.Cleanup()` in `TearDownSuite` for resource cleanup | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ RUN apk add --no-cache \ | |
| bash \ | ||
| curl \ | ||
| git \ | ||
| make \ | ||
| openssh-client \ | ||
| python3 \ | ||
| py3-pip \ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ RUN apk add --no-cache \ | |
| bash \ | ||
| curl \ | ||
| git \ | ||
| make \ | ||
| openssh-client \ | ||
| python3 \ | ||
| py3-pip \ | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is straightforward. how would GH copilot know when a feature is deprecated? That is when this flag is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we should just tell it to not care about those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this comment still needs addressing @floatingman