-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Draft kyma CLI integration test
Showing
4 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: operator.kyma-project.io/v1alpha1 | ||
kind: DockerRegistry | ||
metadata: | ||
name: default | ||
spec: | ||
externalAccess: | ||
enabled: true |
This file contains 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
echo "Running kyma@v3 integration tests uing connected managed kyma runtime" | ||
echo "KUBECONFIG=${KUBECONFIG}" | ||
|
||
# ------------------------------------------------------------------------------------- | ||
echo "Step1: Generating temporary access for new service account" | ||
|
||
bin/kyma@v3 alpha access --clusterrole cluster-admin --name test-sa --output /tmp/kubeconfig.yaml --time 2h | ||
|
||
export KUBECONFIG="/tmp/kubeconfig.yaml" | ||
if [[ $(kubectl config view --minify --raw | yq '.users[0].name') != 'test-sa' ]]; then | ||
exit 1 | ||
fi | ||
echo "Running test in user context of: $(kubectl config view --minify --raw | yq '.users[0].name')" | ||
# ------------------------------------------------------------------------------------- | ||
echo "Step2: List modules" | ||
bin/kyma@v3 alpha module list | ||
|
||
# ------------------------------------------------------------------------------------- | ||
echo "Step3: Connecting to remote BTP subaccount" | ||
# ------------------------------------------------------------------------------------- | ||
echo "Step4: Create Shared Service Instance Reference" | ||
# ------------------------------------------------------------------------------------- | ||
# Enable Docker Registry | ||
echo "Step5: Enable Docker Registry from experimental channel (with persistent BTP based storage)" | ||
bin/kyma@v3 alpha module add docker-registry --channel experimental --cr-path hack/exposed-docker-registry.yaml | ||
|
||
echo "..waiting for docker registry" | ||
kubectl wait --for condition=Installed dockerregistries.operator.kyma-project.io/default -n kyma-system --timeout=360s | ||
# ------------------------------------------------------------------------------------- | ||
echo "Step6: Map bookstore DB" | ||
# ------------------------------------------------------------------------------------- | ||
echo "Step7: Push bookstore application (w/o Dockerfile)" | ||
# ------------------------------------------------------------------------------------- | ||
|
||
|
||
exit 0 |
This file contains 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
echo "Running kyma@v3 integration tests uing connected k3d kyma runtime" | ||
echo "KUBECONFIG=${KUBECONFIG}" | ||
|
||
# ------------------------------------------------------------------------------------- | ||
echo "Step1: Generating temporary access for new service account" | ||
|
||
bin/kyma@v3 alpha access --clusterrole cluster-admin --name test-sa --output /tmp/kubeconfig.yaml --time 2h | ||
|
||
export KUBECONFIG="/tmp/kubeconfig.yaml" | ||
if [[ $(kubectl config view --minify --raw | yq '.users[0].name') != 'test-sa' ]]; then | ||
exit 1 | ||
fi | ||
echo "Running test in user context of: $(kubectl config view --minify --raw | yq '.users[0].name')" | ||
# ------------------------------------------------------------------------------------- | ||
# Enable Docker Registry | ||
|
||
echo "Step2: Enable latest Docker Registry release" | ||
kubectl create namespace kyma-system || true | ||
kubectl apply -f https://github.com/kyma-project/docker-registry/releases/latest/download/dockerregistry-operator.yaml | ||
kubectl apply -f https://github.com/kyma-project/docker-registry/releases/latest/download/default-dockerregistry-cr.yaml -n kyma-system | ||
echo "..waiting for docker registry" | ||
kubectl wait --for condition=Installed dockerregistries.operator.kyma-project.io/default -n kyma-system --timeout=360s | ||
# ------------------------------------------------------------------------------------- | ||
echo "Step3: Push sample Java application (w/o Dockerfile)" | ||
|
||
|
||
# ------------------------------------------------------------------------------------- | ||
|
||
|
||
exit 0 |