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

Add cliplugins package build scripts, e2e tests #672

Merged
merged 4 commits into from
Feb 14, 2024
Merged

Conversation

vuil
Copy link
Contributor

@vuil vuil commented Feb 7, 2024

What this PR does / why we need it

Add e2e tests to perform plugins syncing operations using the cliplugins crd package.

Note:
CRD_PACKAGE_IMAGE envvar has to be set to a pushable image location for the added test to be exercised.
CI pipeline has been updated with the values needed.

Added new tools dependencies (yq, ytt, kctl, kbld, vendir)

PR created from branch in main repo instead of fork so as to pick up secrets required in the added e2e tests (they are skipped otherwise)

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

make e2e-cli-core

verify that the new test is skipped

export CRD_PACKAGE_IMAGE=gcr.io/....../crd/plugins
make e2e-cli-core

verify that the new test is exercised and passes

Release note

Add crd package build script, and e2e tests for deploying built package

Additional information

Special notes for your reviewer

@vuil vuil requested a review from a team as a code owner February 7, 2024 17:46
@vuil vuil closed this Feb 12, 2024
vuil and others added 3 commits February 12, 2024 09:35
Signed-off-by: Vui Lam <vui.lam@broadcom.com>
Signed-off-by: Vui Lam <vui.lam@broadcom.com>
- configure crd image used
- add gcloud account setup for accessing gcr.io
- but make workflow to ignore test if missing service account secret
    When the workflow is run from fork, which does not have access to
    secrets in the main repo, noop the set up of the gcloud CLI, which
    is fine since the tests that requires it will be skipped for the
    same reasons anyway.

Signed-off-by: Vui Lam <vui.lam@broadcom.com>
Copy link
Contributor

@anujc25 anujc25 left a comment

Choose a reason for hiding this comment

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

Changes LGTM. One minor comment and one question on directory structure.

package/test/package-pi.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we are using the root level package directory to store the CLIPlugin package.
If we have a new package in the future, should we consider having a directory structure like packages/cliplugin.cli.tanzu.vmware.com/ to host all the cliplugin package-related yaml files?

Adds an e2e test that performs plugin sync using crd package built from
the package/cliplugin.cli.tanzu.vmware.com directory.
The specific test requires an envvar CRD_PACKAGE_IMAGE to be set
and pointing to a registry location that the test has push permissions
on.

Also adds build-crd-package.sh that will conditionally build and publish
the CRD package if CRD_PACKAGE_IMAGE is set.

Signed-off-by: Vui Lam <vui.lam@broadcom.com>
Copy link
Contributor

@anujc25 anujc25 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@vuil vuil merged commit 96e0ba0 into main Feb 14, 2024
9 checks passed
@marckhouzam marckhouzam added this to the v1.3.0 milestone Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants