From b29ae5e4eb021e4b0caede818404167f54df9065 Mon Sep 17 00:00:00 2001
From: Piotr
Date: Fri, 6 Nov 2020 16:02:49 +0100
Subject: [PATCH] Reduce commerce mock image (#39)
* Reduce commerce mock image
* Reduce number of steps
---
.github/workflows/app-connector-e2e-gardener.yml | 3 ---
.github/workflows/app-connector-e2e-k3s.yml | 3 ---
.github/workflows/app-connector-e2e-kind.yml | 3 ---
.github/workflows/app-connector-e2e-minikube.yml | 3 ---
app-connector-example.sh | 9 ++++++---
commerce-mock.sh => commerce-mock.yaml | 10 +---------
6 files changed, 7 insertions(+), 24 deletions(-)
rename commerce-mock.sh => commerce-mock.yaml (79%)
mode change 100755 => 100644
diff --git a/.github/workflows/app-connector-e2e-gardener.yml b/.github/workflows/app-connector-e2e-gardener.yml
index 3e64832..3cebbbe 100644
--- a/.github/workflows/app-connector-e2e-gardener.yml
+++ b/.github/workflows/app-connector-e2e-gardener.yml
@@ -47,9 +47,6 @@ jobs:
- name: Install Commerce Mock
run: |
./commerce-mock.sh
- - name: Run End To End Test
- run: |
- ./app-connector-example.sh
- name: Uninstall Kyma
run: |
./uninstall-kyma.sh
diff --git a/.github/workflows/app-connector-e2e-k3s.yml b/.github/workflows/app-connector-e2e-k3s.yml
index 9175232..6ba4b82 100644
--- a/.github/workflows/app-connector-e2e-k3s.yml
+++ b/.github/workflows/app-connector-e2e-k3s.yml
@@ -34,9 +34,6 @@ jobs:
./install-kyma.sh
sudo cp kyma.crt /usr/local/share/ca-certificates
sudo update-ca-certificates
- - name: Install Commerce Mock
- run: |
- ./commerce-mock.sh
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Run End To End Test
diff --git a/.github/workflows/app-connector-e2e-kind.yml b/.github/workflows/app-connector-e2e-kind.yml
index 2396df5..eb1a280 100644
--- a/.github/workflows/app-connector-e2e-kind.yml
+++ b/.github/workflows/app-connector-e2e-kind.yml
@@ -38,9 +38,6 @@ jobs:
./install-kyma.sh
sudo cp kyma.crt /usr/local/share/ca-certificates
sudo update-ca-certificates
- - name: Install Commerce Mock
- run: |
- ./commerce-mock.sh
- name: Run End To End Test
run: |
./app-connector-example.sh
diff --git a/.github/workflows/app-connector-e2e-minikube.yml b/.github/workflows/app-connector-e2e-minikube.yml
index 9761142..fbaafc9 100644
--- a/.github/workflows/app-connector-e2e-minikube.yml
+++ b/.github/workflows/app-connector-e2e-minikube.yml
@@ -41,9 +41,6 @@ jobs:
./install-kyma.sh
sudo cp kyma.crt /usr/local/share/ca-certificates
sudo update-ca-certificates
- - name: Install Commerce Mock
- run: |
- ./commerce-mock.sh
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Run End To End Test
diff --git a/app-connector-example.sh b/app-connector-example.sh
index 4a1e3bd..146a432 100755
--- a/app-connector-example.sh
+++ b/app-connector-example.sh
@@ -1,3 +1,5 @@
+kubectl apply -f commerce-mock.yaml
+
MOCK_HOST=""
while [[ -z $MOCK_HOST ]]; do echo "waiting for mock host"; MOCK_HOST=$(kubectl get virtualservice -n mocks -ojsonpath='{.items[0].spec.hosts[0]}'); sleep 1; done
@@ -15,9 +17,7 @@ apiVersion: applicationconnector.kyma-project.io/v1alpha1
kind: ApplicationMapping
metadata:
name: commerce
-EOF
-
-cat <