Skip to content

Commit

Permalink
chore: Replace Kyma CLI with modulectl in e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
lindnerby committed Oct 16, 2024
1 parent 5eddd74 commit 2e7e9a9
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
shell: bash
run: |
make build-manifests
kyma alpha create module --module-config-file ./module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
sed -i 's/template-operator-regular/template-operator-1.0.1/g' ./template.yaml
kubectl get crds
Expand Down Expand Up @@ -111,7 +111,7 @@ runs:
kustomize edit add patch --path warning_patch.yaml --kind Deployment
popd
make build-manifests
kyma alpha create module --module-config-file ./module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
sed -i 's/template-operator-regular/template-operator-1.0.1/g' ./template.yaml
kubectl get crds
Expand All @@ -134,7 +134,7 @@ runs:
kustomize edit add patch --path warning_patch.yaml --kind StatefulSet
popd
make build-statefulset-manifests
kyma alpha create module --module-config-file ./module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
sed -i 's/template-operator-regular/template-operator-1.0.1/g' ./template.yaml
kubectl get crds
Expand Down Expand Up @@ -183,7 +183,7 @@ runs:
kustomize edit add patch --path image_patch.yaml --kind Deployment
popd
make build-manifests
kyma alpha create module --module-config-file ./misconfigured-module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./misconfigured-module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
sed -i 's/template-operator-misconfigured-regular/template-operator-misconfigured-1.1.1/g' ./template.yaml
kubectl get crds
Expand All @@ -202,7 +202,7 @@ runs:
kustomize edit add patch --path image_patch.yaml --kind StatefulSet
popd
make build-statefulset-manifests
kyma alpha create module --module-config-file ./misconfigured-module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./misconfigured-module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
sed -i 's/template-operator-misconfigured-regular/template-operator-misconfigured-1.1.1/g' ./template.yaml
kubectl get crds
Expand All @@ -221,11 +221,7 @@ runs:
security: sec-scanners-config.yaml
annotations:
operator.kyma-project.io/doc-url: https://kyma-project.io" >> module-config-no-cr.yaml
kyma alpha create module \
--module-config-file ./module-config-no-cr.yaml \
--path . \
--registry localhost:5111 \
--insecure
module create --module-config-file ./module-config-no-cr.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
sed -i 's/template-operator-regular/template-operator-1.0.0/g' ./template.yaml
kubectl get crds
Expand Down Expand Up @@ -273,7 +269,7 @@ runs:
shell: bash
run: |
make build-manifests
kyma alpha create module --module-config-file ./module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
kubectl apply -f template.yaml
kubectl apply -f module-release-meta.yaml
Expand Down
16 changes: 6 additions & 10 deletions .github/actions/deploy-template-operator/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
shell: bash
run: |
make build-manifests
kyma alpha create module --module-config-file ./module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
kubectl get crds
kubectl apply -f template.yaml
Expand Down Expand Up @@ -72,7 +72,7 @@ runs:
kustomize edit add patch --path warning_patch.yaml --kind Deployment
popd
make build-manifests
kyma alpha create module --module-config-file ./module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
kubectl get crds
kubectl apply -f template.yaml
Expand All @@ -93,7 +93,7 @@ runs:
kustomize edit add patch --path warning_patch.yaml --kind StatefulSet
popd
make build-statefulset-manifests
kyma alpha create module --module-config-file ./module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
kubectl get crds
kubectl apply -f template.yaml
Expand Down Expand Up @@ -125,7 +125,7 @@ runs:
kustomize edit add patch --path image_patch.yaml --kind Deployment
popd
make build-manifests
kyma alpha create module --module-config-file ./misconfigured-module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./misconfigured-module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
kubectl get crds
kubectl apply -f template.yaml
Expand All @@ -143,7 +143,7 @@ runs:
kustomize edit add patch --path image_patch.yaml --kind StatefulSet
popd
make build-statefulset-manifests
kyma alpha create module --module-config-file ./misconfigured-module-config.yaml --path . --registry localhost:5111 --insecure
module create --module-config-file ./misconfigured-module-config.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
kubectl get crds
kubectl apply -f template.yaml
Expand All @@ -160,11 +160,7 @@ runs:
security: sec-scanners-config.yaml
annotations:
operator.kyma-project.io/doc-url: https://kyma-project.io" >> module-config-no-cr.yaml
kyma alpha create module \
--module-config-file ./module-config-no-cr.yaml \
--path . \
--registry localhost:5111 \
--insecure
module create --module-config-file ./module-config-no-cr.yaml --registry localhost:5111 --insecure
sed -i 's/localhost:5111/k3d-kcp-registry.localhost:5000/g' ./template.yaml
kubectl get crds
kubectl apply -f template.yaml
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/get-configuration/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ outputs:
k3d_version:
description: The version of k3d to install. For example, 5.6.0.
value: ${{ steps.define-variables.outputs.k3d_version }}
modulectl_version:
description: The version of modulectl to install. For example, 1.0.0.
value: ${{ steps.define-variables.outputs.modulectl_version }}
cert_manager_version:
description: The version of cert-manager to deploy. For example, 1.13.3.
value: ${{ steps.define-variables.outputs.cert_manager_version }}
Expand All @@ -29,6 +32,7 @@ runs:
echo "k8s_version=${{ github.event.inputs.k8s_version || '1.30.3' }}" >> $GITHUB_OUTPUT
echo "istio_version=1.20.3" >> $GITHUB_OUTPUT
echo "k3d_version=5.7.4" >> $GITHUB_OUTPUT
echo "modulectl_version=1.0.0" >> $GITHUB_OUTPUT
echo "cert_manager_version=1.15.0" >> $GITHUB_OUTPUT
echo "klm_version_tag=PR-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
echo "klm_image_repo=dev" >> $GITHUB_OUTPUT
Expand Down
12 changes: 0 additions & 12 deletions .github/actions/install-kyma-cli/action.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/actions/install-modulectl/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Install modulectl
description: Downloads modulectl and installs it locally.
inputs:
modulectl_version:
description: The version of modulectl to install. For example, 1.0.0.
required: true
runs:
using: composite
steps:
- name: Install kyma-cli
shell: bash
run: |
wget https://github.com/kyma-project/modulectl/releases/download/${{ inputs.modulectl_version }}/modulectl-linux -O modulectl-linux
chmod +x modulectl-linux
mv modulectl-linux /usr/local/bin/modulectl
echo "PATH=/usr/local/bin/modulectl" >> $GITHUB_OUTPUT
ln -s /usr/local/bin/modulectl /usr/local/bin/module
7 changes: 6 additions & 1 deletion .github/actions/setup-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
k3d_version:
description: The version of k3d to install. For example, 5.6.0.
required: true
modulectl_version:
description: The version of modulectl to install. For example, 1.0.0.
required: true
go-version-file:
description: The path to the Go version file.
required: true
Expand All @@ -25,7 +28,9 @@ runs:
- uses: ./lifecycle-manager/.github/actions/install-istioctl
with:
istio_version: ${{ inputs.istio_version }}
- uses: ./lifecycle-manager/.github/actions/install-kyma-cli
- uses: ./lifecycle-manager/.github/actions/install-modulectl
with:
modulectl_version: ${{ inputs.modulectl_version }}
- uses: ./lifecycle-manager/.github/actions/install-cmctl
- uses: ./lifecycle-manager/.github/actions/install-k3d
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-e2e-with-modulereleasemeta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
k8s_version: ${{ steps.configuration.outputs.k8s_version }}
istio_version: ${{ steps.configuration.outputs.istio_version }}
k3d_version: ${{ steps.configuration.outputs.k3d_version }}
modulectl_version: ${{ steps.configuration.outputs.modulectl_version }}
go-version-file: lifecycle-manager/go.mod
cache-dependency-path: lifecycle-manager/go.sum

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
k8s_version: ${{ steps.configuration.outputs.k8s_version }}
istio_version: ${{ steps.configuration.outputs.istio_version }}
k3d_version: ${{ steps.configuration.outputs.k3d_version }}
modulectl_version: ${{ steps.configuration.outputs.modulectl_version }}
go-version-file: lifecycle-manager/go.mod
cache-dependency-path: lifecycle-manager/go.sum

Expand Down

0 comments on commit 2e7e9a9

Please sign in to comment.