From e30a1692bc3feddbdbb4c9315e122f3cb16ae468 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 Aug 2022 22:26:49 +0000 Subject: [PATCH] Initial commit --- Makefile | 31 +++++++++++++++++++++++++++++++ app1/deployment/echoserver.yaml | 19 +++++++++++++++++++ app1/kustomization.yaml | 4 ++++ app1/namespace/app1.yaml | 4 ++++ app2/deployment/echoserver.yaml | 19 +++++++++++++++++++ app2/kustomization.yaml | 4 ++++ app2/namespace/app2.yaml | 4 ++++ 7 files changed, 85 insertions(+) create mode 100644 Makefile create mode 100644 app1/deployment/echoserver.yaml create mode 100644 app1/kustomization.yaml create mode 100644 app1/namespace/app1.yaml create mode 100644 app2/deployment/echoserver.yaml create mode 100644 app2/kustomization.yaml create mode 100644 app2/namespace/app2.yaml diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..6586e070 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +all: + +setup: + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git checkout -B "$(FIXTURE_BRANCH)/main" + git add . + git commit -a -m "Initial commit" + git push origin -f "$(FIXTURE_BRANCH)/main" + +test1: + git checkout "$(FIXTURE_BRANCH)/main" + git checkout -b "$(FIXTURE_BRANCH)/test1" + sed -i -e 's/name: echoserver/name: echoserver-test1/g' app1/deployment/echoserver.yaml + git commit -a -m 'e2e-test: app1' + git push origin -f "$(FIXTURE_BRANCH)/test1" + gh pr create --base "$(FIXTURE_BRANCH)/main" --fill --body "$(PULL_REQUEST_BODY)" --label e2e-test + gh pr merge --squash + git checkout "$(FIXTURE_BRANCH)/main" + git pull origin "$(FIXTURE_BRANCH)/main" --ff-only + +test2: + git checkout "$(FIXTURE_BRANCH)/main" + git checkout -b "$(FIXTURE_BRANCH)/test2" + sed -i -e 's/app: echoserver/app: echoserver-test2/g' app2/deployment/echoserver.yaml + git commit -a -m 'e2e-test: app2' + git push origin -f "$(FIXTURE_BRANCH)/test2" + gh pr create --base "$(FIXTURE_BRANCH)/main" --fill --body "$(PULL_REQUEST_BODY)" --label e2e-test + gh pr merge --squash + git checkout "$(FIXTURE_BRANCH)/main" + git pull origin "$(FIXTURE_BRANCH)/main" --ff-only diff --git a/app1/deployment/echoserver.yaml b/app1/deployment/echoserver.yaml new file mode 100644 index 00000000..809a42fb --- /dev/null +++ b/app1/deployment/echoserver.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: echoserver +spec: + replicas: 1 + selector: + matchLabels: + app: echoserver + template: + metadata: + labels: + app: echoserver + spec: + containers: + - image: gcr.io/google_containers/echoserver:1.8 + name: echoserver + ports: + - containerPort: 8080 diff --git a/app1/kustomization.yaml b/app1/kustomization.yaml new file mode 100644 index 00000000..c3f77116 --- /dev/null +++ b/app1/kustomization.yaml @@ -0,0 +1,4 @@ +namespace: app1 +resources: + - namespace/app1.yaml + - deployment/echoserver.yaml diff --git a/app1/namespace/app1.yaml b/app1/namespace/app1.yaml new file mode 100644 index 00000000..f39399ba --- /dev/null +++ b/app1/namespace/app1.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: app1 diff --git a/app2/deployment/echoserver.yaml b/app2/deployment/echoserver.yaml new file mode 100644 index 00000000..809a42fb --- /dev/null +++ b/app2/deployment/echoserver.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: echoserver +spec: + replicas: 1 + selector: + matchLabels: + app: echoserver + template: + metadata: + labels: + app: echoserver + spec: + containers: + - image: gcr.io/google_containers/echoserver:1.8 + name: echoserver + ports: + - containerPort: 8080 diff --git a/app2/kustomization.yaml b/app2/kustomization.yaml new file mode 100644 index 00000000..dbcfd321 --- /dev/null +++ b/app2/kustomization.yaml @@ -0,0 +1,4 @@ +namespace: app2 +resources: + - namespace/app2.yaml + - deployment/echoserver.yaml diff --git a/app2/namespace/app2.yaml b/app2/namespace/app2.yaml new file mode 100644 index 00000000..b990c93e --- /dev/null +++ b/app2/namespace/app2.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: app2