From 98d9fbdc10a2539c3b0a6e15d5e640f8eb151799 Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Sun, 16 Jul 2023 11:11:17 +0100 Subject: [PATCH 1/9] Updated Docker login --- .github/workflows/pythonapp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index c3e5d31..68810c8 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -4,7 +4,7 @@ on: push: paths: - 'python/*' - + jobs: build: @@ -23,6 +23,6 @@ jobs: - name: Build & Push Image run: | cd ./python - echo "${{ secrets.DOCKERPW }}" | docker login -u "[your dockerhub login here]" --password-stdin - docker image build -t [your dockerhub username here]/gitops:hellov1.0 . - docker push [your docker hub username here]/gitops:hellov1.0 + echo "${{ secrets.DOCKERPW }}" | docker login -u "julianoalberto" --password-stdin + docker image build -t julianoalberto/gitops:hellov1.0 . + docker push julianoalberto/gitops:hellov1.0 From 8d1f61d008f1d938158765ac26e028f7b50f74b3 Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Sun, 16 Jul 2023 11:13:43 +0100 Subject: [PATCH 2/9] Updated message --- python/app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/app.py b/python/app.py index 358088e..e1d2092 100644 --- a/python/app.py +++ b/python/app.py @@ -1,9 +1,12 @@ from flask import Flask + app = Flask(__name__) + @app.route("/") def hello(): - return "Hello World!" + return "Hello from Juliano!" + if __name__ == "__main__": - app.run(host='0.0.0.0', port=8000) + app.run(host="0.0.0.0", port=8000) From 608b76bf821b94b54c8af2d0d65e7d3e3763ac6c Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Sun, 16 Jul 2023 11:18:06 +0100 Subject: [PATCH 3/9] Updated message again --- python/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/app.py b/python/app.py index e1d2092..740c661 100644 --- a/python/app.py +++ b/python/app.py @@ -5,7 +5,7 @@ @app.route("/") def hello(): - return "Hello from Juliano!" + return "Hello from Juliano again!" if __name__ == "__main__": From 1c4a3fe5b836a9532022998459e83e1b5b69bd7f Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Sun, 16 Jul 2023 11:22:53 +0100 Subject: [PATCH 4/9] Updated to pull request --- .github/workflows/pythonapp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 68810c8..6a48ae0 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -1,7 +1,7 @@ name: Python application on: - push: + pull_request: paths: - 'python/*' From ef89c2b4857b41f13c8f18d084eb68aa9ea2eaa9 Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Sun, 16 Jul 2023 11:30:22 +0100 Subject: [PATCH 5/9] Updated another time --- python/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/app.py b/python/app.py index 740c661..73974de 100644 --- a/python/app.py +++ b/python/app.py @@ -5,7 +5,7 @@ @app.route("/") def hello(): - return "Hello from Juliano again!" + return "Hello from Juliano again and again!" if __name__ == "__main__": From f52db949ea1624407e6a69f747fe0b1e2b900d22 Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Sun, 16 Jul 2023 11:35:13 +0100 Subject: [PATCH 6/9] Added hello deployment --- workloads/hello.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 workloads/hello.yaml diff --git a/workloads/hello.yaml b/workloads/hello.yaml new file mode 100644 index 0000000..c0e630a --- /dev/null +++ b/workloads/hello.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: hello + namespace: lasample + labels: + app: hello +spec: + selector: + matchLabels: + app: hello + template: + metadata: + labels: + app: hello + spec: + containers: + - name: hello + image: linuxacademycontent/gitops:hellov1.0 From dd4f96e1837daebc8865f772565c56f79a3c2612 Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Mon, 17 Jul 2023 13:34:16 +0100 Subject: [PATCH 7/9] Add QA --- .github/workflows/pythonapp.yml | 2 +- qa/hello.yaml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 qa/hello.yaml diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 6a48ae0..0140754 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -25,4 +25,4 @@ jobs: cd ./python echo "${{ secrets.DOCKERPW }}" | docker login -u "julianoalberto" --password-stdin docker image build -t julianoalberto/gitops:hellov1.0 . - docker push julianoalberto/gitops:hellov1.0 + docker push julianoalberto/gitops:hellov1.2 diff --git a/qa/hello.yaml b/qa/hello.yaml new file mode 100644 index 0000000..de9ff70 --- /dev/null +++ b/qa/hello.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: hello + namespace: lasample + labels: + app: hello +spec: + selector: + matchLabels: + app: hello + template: + metadata: + labels: + app: hello + spec: + containers: + - name: hello + image: linuxacademycontent/gitops:hellov1.1 From 90f13fc53fe967558bdce42a13857e5ee95dc1c9 Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Mon, 17 Jul 2023 13:50:53 +0100 Subject: [PATCH 8/9] Testing QA --- .github/workflows/pythonapp.yml | 2 +- python/app.py | 2 +- qa/hello.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 0140754..5a3df5d 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -24,5 +24,5 @@ jobs: run: | cd ./python echo "${{ secrets.DOCKERPW }}" | docker login -u "julianoalberto" --password-stdin - docker image build -t julianoalberto/gitops:hellov1.0 . + docker image build -t julianoalberto/gitops:hellov1.2 . docker push julianoalberto/gitops:hellov1.2 diff --git a/python/app.py b/python/app.py index 73974de..8388a3b 100644 --- a/python/app.py +++ b/python/app.py @@ -5,7 +5,7 @@ @app.route("/") def hello(): - return "Hello from Juliano again and again!" + return "Hello from QA!" if __name__ == "__main__": diff --git a/qa/hello.yaml b/qa/hello.yaml index de9ff70..337d579 100644 --- a/qa/hello.yaml +++ b/qa/hello.yaml @@ -16,4 +16,4 @@ spec: spec: containers: - name: hello - image: linuxacademycontent/gitops:hellov1.1 + image: linuxacademycontent/gitops:hellov1.2 From 6fd27118010d57701e2dd2bae89385274f843b46 Mon Sep 17 00:00:00 2001 From: Juliano Goncalves Date: Mon, 17 Jul 2023 14:48:21 +0100 Subject: [PATCH 9/9] Add prod --- production/hello.yaml | 19 +++++++++++++++++++ python/app.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 production/hello.yaml diff --git a/production/hello.yaml b/production/hello.yaml new file mode 100644 index 0000000..337d579 --- /dev/null +++ b/production/hello.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: hello + namespace: lasample + labels: + app: hello +spec: + selector: + matchLabels: + app: hello + template: + metadata: + labels: + app: hello + spec: + containers: + - name: hello + image: linuxacademycontent/gitops:hellov1.2 diff --git a/python/app.py b/python/app.py index 8388a3b..c6c628d 100644 --- a/python/app.py +++ b/python/app.py @@ -5,7 +5,7 @@ @app.route("/") def hello(): - return "Hello from QA!" + return "Hello from prod!" if __name__ == "__main__":