Skip to content

Commit

Permalink
Update test-central-plugin-repository with operations target plugin…
Browse files Browse the repository at this point in the history
… and update E2E (vmware-tanzu#682)

* Regenerated the test central repos

* Update E2E tests to include newly added plugin
  • Loading branch information
anujc25 authored Feb 23, 2024
1 parent d1b59e6 commit ed7c04f
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
Binary file modified hack/central-repo/registry-content.bz2
Binary file not shown.
30 changes: 29 additions & 1 deletion hack/central-repo/upload-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ k8sPlugins=(cluster feature management-cluster package secret kubernetes-release
tmcPlugins=(account apply audit cluster clustergroup data-protection ekscluster events iam
inspection integration management-cluster policy workspace helm secret
continuousdelivery tanzupackage)
opsPlugins=(clustergroup)
globalPlugins=(isolated-cluster pinniped-auth)
essentialPlugins=(telemetry)
pluginUsingSha=(plugin-with-sha)
Expand Down Expand Up @@ -255,6 +256,10 @@ for db in small extra; do
addGroup vmware tmc tmc-user v9.9.9 $name mission-control v9.9.9
done

for name in ${opsPlugins[*]}; do
addPlugin $name operations true
done

for name in ${pluginUsingSha[*]}; do
addPlugin $name global true v0.0.1 useSha
addPlugin $name global true v9.9.9 useSha
Expand Down Expand Up @@ -289,7 +294,7 @@ echo "======================================"

# Push generic plugins to get to 100 total plugins in the DB.
# Those plugins will not be installable as we won't push their binaries.
pluginCount=$((${#k8sPlugins[@]} + ${#tmcPlugins[@]} + ${#globalPlugins[@]}))
pluginCount=$((${#k8sPlugins[@]} + ${#tmcPlugins[@]} + ${#opsPlugins[@]} + ${#globalPlugins[@]}))
numPluginsToCreate=$((100-$pluginCount))

for (( idx=1; idx<=$numPluginsToCreate; idx++ )); do
Expand Down Expand Up @@ -330,6 +335,10 @@ for name in ${tmcPlugins[*]}; do
addGroup vmware tmc tmc-user v11.11.11 $name mission-control v11.11.11
done

for name in ${opsPlugins[*]}; do
addPlugin $name operations true v11.11.11
done

# Push sanbox inventory file
${dry_run} imgpkg push -i $repoBasePath/$sanboxImage1 -f $database --registry-verify-certs=false
${dry_run} cosign sign --key $ROOT_DIR/cosign-key-pair/cosign.key --allow-insecure-registry -y $repoBasePath/$sanboxImage1
Expand Down Expand Up @@ -357,6 +366,10 @@ for name in ${tmcPlugins[*]}; do
addGroup vmware tmc tmc-user v22.22.22 $name mission-control v22.22.22
done

for name in ${opsPlugins[*]}; do
addPlugin $name operations true v22.22.22
done

# Push sandbox inventory file
${dry_run} imgpkg push -i $repoBasePath/$sanboxImage2 -f $database --registry-verify-certs=false
${dry_run} cosign sign --key $ROOT_DIR/cosign-key-pair/cosign.key --allow-insecure-registry -y $repoBasePath/$sanboxImage2
Expand Down Expand Up @@ -396,6 +409,11 @@ for name in ${tmcPlugins[0]}; do
addGroup vmware tmc tmc-user v9.9.9 $name mission-control v9.9.9
done

for name in ${opsPlugins[0]}; do
addPlugin $name operations true v0.0.1
addPlugin $name operations true v9.9.9
done

for name in ${pluginUsingSha[0]}; do
addPlugin $name global true v0.0.1 useSha
addPlugin $name global true v9.9.9 useSha
Expand Down Expand Up @@ -440,6 +458,11 @@ for name in ${tmcPlugins[*]}; do
addGroup vmware tmc tmc-user v9.9.9 $name mission-control v9.9.9
done

for name in ${opsPlugins[*]}; do
addPlugin $name operations true v0.0.1
addPlugin $name operations true v9.9.9
done

for name in ${pluginUsingSha[*]}; do
addPlugin $name global true v0.0.1 useSha
addPlugin $name global true v9.9.9 useSha
Expand Down Expand Up @@ -477,6 +500,11 @@ for name in ${tmcPlugins[0]}; do
addGroup vmware tmc tmc-user v9.9.9 $name mission-control v9.9.9
done

for name in ${opsPlugins[0]}; do
addPlugin $name operations true v0.0.1
addPlugin $name operations true v9.9.9 useSha
done

# Push airgapped inventory file
${dry_run} imgpkg push -i $repoBasePath/$smallImageUsingSHAs -f $database --registry-verify-certs=false
${dry_run} cosign sign --key $ROOT_DIR/cosign-key-pair/cosign.key --allow-insecure-registry -y $repoBasePath/$smallImageUsingSHAs
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/airgapped/airgapped_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ var _ = framework.CLICoreDescribe("[Tests:E2E][Feature:Airgapped-Plugin-Download
Expect(err).To(BeNil())
_, _, err = tf.PluginCmd.InstallPlugin("pinniped-auth", "", "")
Expect(err).To(BeNil())
_, _, err = tf.PluginCmd.InstallPlugin("clustergroup", "operations", "")
Expect(err).To(BeNil())

// Verify above plugins got installed with `tanzu plugin list`
installedPlugins, err := tf.PluginCmd.ListInstalledPlugins()
Expand Down
1 change: 1 addition & 0 deletions test/e2e/airgapped/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ var pluginsForPGTMC999 = []*framework.PluginInfo{
var pluginsNotInAnyPG999 = []*framework.PluginInfo{
{Name: "isolated-cluster", Target: "global", Version: "v9.9.9", Description: "isolated-cluster " + functionality},
{Name: "pinniped-auth", Target: "global", Version: "v9.9.9", Description: "pinniped-auth " + functionality},
{Name: "clustergroup", Target: "operations", Version: "v9.9.9", Description: "clustergroup " + functionality},
}

var essentialPlugins = []*framework.PluginInfo{
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/config_data/input_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
"Target":"global",
"Version":"v9.9.9",
"Description":"plugin-with-sha functionality"
},
{
"Name":"clustergroup",
"Target":"operations",
"Version":"v9.9.9",
"Description":"clustergroup functionality"
}
],
"PluginGroupsForLifeCycleTests":[
Expand Down

0 comments on commit ed7c04f

Please sign in to comment.